wxList< T > Class Reference

#include <wx/list.h>

List of all members.

Public Member Functions

 wxList ()
 wxList (size_t count, T *elements[])
 ~wxList ()
wxList< T >::compatibility_iterator Append (T *object)
void Clear ()
void DeleteContents (bool destroy)
bool DeleteNode (const compatibility_iterator &iter)
bool DeleteObject (T *object)
void Erase (const compatibility_iterator &iter)
wxList< T >::compatibility_iterator Find (T *object) const
size_t GetCount () const
wxList< T >::compatibility_iterator GetFirst () const
wxList< T >::compatibility_iterator GetLast () const
int IndexOf (T *obj) const
wxList< T >::compatibility_iterator Insert (T *object)
wxList< T >::compatibility_iterator Insert (size_t position, T *object)
wxList< T >::compatibility_iterator Insert (compatibility_iterator iter, T *object)
bool IsEmpty () const
wxList< T >::compatibility_iterator Item (size_t index) const
wxList< T >::compatibility_iterator Member (T *object) const
wxList< T >::compatibility_iterator Nth (int n) const
int Number () const
void Sort (wxSortCompareFunction compfunc)
void assign (const_iterator first, const const_iterator &last)
void assign (size_type n, const_reference v=value_type())
reference back ()
const_reference back () const
iterator begin ()
const_iterator begin () const
void clear ()
bool empty () const
const_iterator end () const
iterator end () const
iterator erase (const iterator &it)
iterator erase (const iterator &first, const iterator &last)
reference front () const
const_reference front () const
iterator insert (const iterator &it)
void insert (const iterator &it, size_type n)
void insert (const iterator &it, const_iterator first, const const_iterator &last)
size_type max_size () const
void pop_back ()
void pop_front ()
void push_back (const_reference v=value_type())
void push_front (const_reference v=value_type())
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
void remove (const_reference v)
reverse_iterator rend ()
const_reverse_iterator rend () const
void resize (size_type n, value_type v=value_type())
void reverse ()
size_type size () const


Constructor & Destructor Documentation

wxList< T >::wxList (  ) 

Default constructor.

wxList< T >::wxList ( size_t  count,
T *  elements[] 
)

Constructor which initialized the list with an array of count elements.

wxList< T >::~wxList (  ) 

Destroys the list, but does not delete the objects stored in the list unless you called DeleteContents(true ).


Member Function Documentation

wxList<T>::compatibility_iterator wxList< T >::Append ( T *  object  ) 

Appends the pointer to object to the list.

void wxList< T >::Clear (  ) 

Clears the list. Deletes the actual objects if DeleteContents( true ) was called previously.

void wxList< T >::DeleteContents ( bool  destroy  ) 

If destroy is true, instructs the list to call delete on objects stored in the list whenever they are removed. The default is false.

bool wxList< T >::DeleteNode ( const compatibility_iterator &  iter  ) 

Deletes the given element refered to by iter from the list if iter is a valid iterator. Returns true if successful.

Deletes the actual object if DeleteContents( true ) was called previously.

bool wxList< T >::DeleteObject ( T *  object  ) 

Finds the given object and removes it from the list, returning true if successful.

Deletes object if DeleteContents( true ) was called previously.

void wxList< T >::Erase ( const compatibility_iterator &  iter  ) 

Removes element refered to be iter.

Deletes the actualy object if DeleteContents( true ) was called previously.

wxList<T>::compatibility_iterator wxList< T >::Find ( T *  object  )  const

Returns the iterator refering to object or NULL if none found.

size_t wxList< T >::GetCount (  )  const

Returns the number of elements in the list.

wxList<T>::compatibility_iterator wxList< T >::GetFirst (  )  const

Returns the first iterator in the list (NULL if the list is empty).

wxList<T>::compatibility_iterator wxList< T >::GetLast (  )  const

Returns the last iterator in the list (NULL if the list is empty).

int wxList< T >::IndexOf ( T *  obj  )  const

Returns the index of obj within the list or wxNOT_FOUND if obj is not found in the list.

wxList<T>::compatibility_iterator wxList< T >::Insert ( T *  object  ) 

Inserts object at the beginning of the list.

wxList<T>::compatibility_iterator wxList< T >::Insert ( size_t  position,
T *  object 
)

Inserts object at position.

wxList<T>::compatibility_iterator wxList< T >::Insert ( compatibility_iterator  iter,
T *  object 
)

Inserts object before the object refered to be iter.

bool wxList< T >::IsEmpty (  )  const

Returns true if the list is empty, false otherwise.

wxList<T>::compatibility_iterator wxList< T >::Item ( size_t  index  )  const

Returns the iterator refering to the object at the given index in the list.

wxList<T>::compatibility_iterator wxList< T >::Member ( T *  object  )  const

Deprecated:
This function is deprecated, use Find() instead.

wxList<T>::compatibility_iterator wxList< T >::Nth ( int  n  )  const

Deprecated:
This function is deprecated, use Item() instead.

int wxList< T >::Number (  )  const

Deprecated:
This function is deprecated, use wxList::GetCount instead. Returns the number of elements in the list.

void wxList< T >::Sort ( wxSortCompareFunction  compfunc  ) 

Allows the sorting of arbitrary lists by giving a function to compare two list elements. We use the system qsort function for the actual sorting process.

void wxList< T >::assign ( const_iterator  first,
const const_iterator &  last 
)

Clears the list and item from first to last from another list to it.

void wxList< T >::assign ( size_type  n,
const_reference  v = value_type() 
)

Clears the list and adds n items with value v to it.

reference wxList< T >::back (  ) 

Returns the last item of the list.

const_reference wxList< T >::back (  )  const

Returns the last item of the list as a const reference.

iterator wxList< T >::begin (  ) 

Returns an iterator pointing to the beginning of the list.

const_iterator wxList< T >::begin (  )  const

Returns a const iterator pointing to the beginning of the list.

void wxList< T >::clear (  ) 

Removes all items from the list.

bool wxList< T >::empty (  )  const

Returns true if the list is empty.

const_iterator wxList< T >::end (  )  const

Returns a const iterator pointing at the end of the list.

iterator wxList< T >::end (  )  const

Returns a iterator pointing at the end of the list.

iterator wxList< T >::erase ( const iterator &  it  ) 

Erases the given item

iterator wxList< T >::erase ( const iterator &  first,
const iterator &  last 
)

Erases the items from first to last.

reference wxList< T >::front (  )  const

Returns the first item in the list.

const_reference wxList< T >::front (  )  const

Returns the first item in the list as a const reference.

iterator wxList< T >::insert ( const iterator &  it  ) 

Inserts an item at the head of the list

void wxList< T >::insert ( const iterator &  it,
size_type  n 
)

Inserts an item at the given position

void wxList< T >::insert ( const iterator &  it,
const_iterator  first,
const const_iterator &  last 
)

Inserts several items at the given position.

size_type wxList< T >::max_size (  )  const

Returns the largest possible size of the list.

void wxList< T >::pop_back (  ) 

Removes the last item from the list.

void wxList< T >::pop_front (  ) 

Removes the first item from the list.

void wxList< T >::push_back ( const_reference  v = value_type()  ) 

Adds an item to end of the list.

void wxList< T >::push_front ( const_reference  v = value_type()  ) 

Adds an item to the front of the list.

reverse_iterator wxList< T >::rbegin (  ) 

Returns a reverse iterator pointing to the beginning of the reversed list.

const_reverse_iterator wxList< T >::rbegin (  )  const

Returns a const reverse iterator pointing to the beginning of the reversed list.

void wxList< T >::remove ( const_reference  v  ) 

Removes an item from the list.

reverse_iterator wxList< T >::rend (  ) 

Returns a reverse iterator pointing to the end of the reversed list.

const_reverse_iterator wxList< T >::rend (  )  const

Returns a const reverse iterator pointing to the end of the reversed list.

void wxList< T >::resize ( size_type  n,
value_type  v = value_type() 
)

Resizes the list.

If the list is longer than n, then items are removed until the list becomes long n. If the list is shorter than n items with the value v are appended to the list until the list becomes long n.

void wxList< T >::reverse (  ) 

Reverses the list.

size_type wxList< T >::size (  )  const

Returns the size of the list.



wxWidgets logo

[ top ]