Classes | Public Member Functions

List< T > Class Template Reference

template list class More...

#include <mlist.h>

Inheritance diagram for List< T >:
Queue< T >

List of all members.

Classes

class  const_iterator
 list const iterator More...
class  iterator
 list iterator More...
class  node
 node of a list More...

Public Member Functions

 List ()
 default constructors
 List (const T &val)
 one-element constructor
 List (const List< T > &l)
 copy constructor (reverse order)
List< T > & operator= (const List< T > &l)
 assignment operator
 ~List ()
 destructor
clsize size () const
 number of elements of the list
bool size_greater (clsize m) const
 number of elements of the list
bool size_greater_or_equal (clsize m) const
 number of elements of the list
bool empty () const
 tests if the list has one element
bool single () const
 tests if the list has two elements
bool pair () const
 tests if the list has three elements
bool triple () const
 tests if the list has more than three elements
const T first () const
 first element accessor
T & first ()
 first element accessor
const T second () const
 second element accessor
T & second ()
 second element accessor
const T third () const
 third element accessor
T & third ()
 third element accessor
bool firsts (T &t1, T &t2) const
 get the first two elements
bool firsts (T &t1, T &t2, T &t3) const
 get the first three elements
const T top () const
 first element accessor
T & top ()
 first element accessor
void clear ()
 destructor
bool empty ()
 emptyness test
const_iterator cfind (const T &val) const
 membership test
iterator find (const T &val)
 membership test
iterator find (const T &val, iterator &lst)
 membership test (return also the last pointer for eventual remotion)
clsize pos (const T &val) const
 membership test
const_iterator min_val () const
 get the minimal element
iterator min_val ()
 get the minimal element
const_iterator max_val () const
 get the maximal element
iterator max_val ()
 get the maximal element
clsize replace (const T &old_val, const T &new_val)
 replacing the elements of a list
void push_front (const T &val)
 insertion at the beginning
iterator push_after (const T &val, iterator i=begin())
 insertion in the middle
iterator push_back (const T &val)
 insertion at the end
void insert (const T &val)
 insertion
void push (const T &val)
 insertion
bool insert_unique (const T &val)
 insertion without duplicates
void insert (const List< T > &l)
 list insertion (reverse, at the begining)
void insert_unique (const List< T > &l)
 list insertion without duplicates (reverse, at the begining)
void insert_ordered (const List< T > &l)
 list insertion (ordered)
void insert_and_clear (List< T > &l)
 copy a list and clear its content
void remove_first ()
 removing the first element of the list
void pop ()
 removing the first element of the list
void remove_next (iterator &prev)
 removing elements from the list
bool remove (T &val)
 removing elements from the list
clsize remove_all (const T &val)
 removing elements from the list
void get_array (T *a, clsize sz)
 array transform
T * get_array (clsize sz)
 array transform
void set_array (clsize sz=0, const T *a=(const T *) NULL)
 array read
void sort (int compare(const void *, const void *))
 sort
const_iterator cbegin () const
 iterator creation
const_iterator cend () const
 iterator end
iterator begin ()
 iterator creation
iterator end ()
 iterator end
iterator last ()
 last position

Detailed Description

template<typename T>
class List< T >

template list class


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Defines