ES3D::List< T > Class Template Reference

#include <List.h>

List of all members.

Public Member Functions

 List ()
virtual ~List ()
GLvoid add (GLint index, T value)
GLvoid add (T value)
GLvoid clear (GLvoid)
GLboolean contains (T value)
T & get (GLint index)
GLint indexOf (T value)
GLvoid remove (GLint index)
GLvoid removeElement (T value)
GLvoid set (GLint index, T value)
GLuint size (GLvoid)
GLvoid trimToSize (GLvoid)
T & operator[] (GLint index)


Detailed Description

template<class T>
class ES3D::List< T >

Simple List. Similar to the Java or STL implementation.


Constructor & Destructor Documentation

template<class T>
ES3D::List< T >::List (  )  [inline]

Constructor for the list.

template<class T>
virtual ES3D::List< T >::~List (  )  [inline, virtual]

Destructor of the list.


Member Function Documentation

template<class T>
GLvoid ES3D::List< T >::add ( value  )  [inline]

Adds a element at the end of the list.

Parameters:
value the value to add

template<class T>
GLvoid ES3D::List< T >::add ( GLint  index,
value 
) [inline]

Adds an element to the list. If needed the array is enlarged.

Parameters:
index the position where to add
value the value to be inserted

template<class T>
GLvoid ES3D::List< T >::clear ( GLvoid   )  [inline]

Clears and empties the list.

template<class T>
GLboolean ES3D::List< T >::contains ( value  )  [inline]

Returns, if the lement is in the list.

Parameters:
value the element to look for
Returns:
true, if the element is in the list

template<class T>
T& ES3D::List< T >::get ( GLint  index  )  [inline]

Returns the reference of the nth element.

Parameters:
index the nth element
Returns:
reference to the element in the list

template<class T>
GLint ES3D::List< T >::indexOf ( value  )  [inline]

Returns the position of an element in the list.

Parameters:
value the element to search for
Returns:
the index of the element. -1 if not found

template<class T>
T& ES3D::List< T >::operator[] ( GLint  index  )  [inline]

Returns the nth element out of the dynamic array.

Parameters:
index the nth element
Returns:
reference to the element

template<class T>
GLvoid ES3D::List< T >::remove ( GLint  index  )  [inline]

Removes an element at the given position.

Parameters:
index the position

template<class T>
GLvoid ES3D::List< T >::removeElement ( value  )  [inline]

Removes the given element from the list.

Parameters:
value te element to be removed

template<class T>
GLvoid ES3D::List< T >::set ( GLint  index,
value 
) [inline]

Sets a value at the given position. The old value is overwritten.

Parameters:
index the psoition where to put the element
value the element itself

template<class T>
GLuint ES3D::List< T >::size ( GLvoid   )  [inline]

Returns the size of the list.

Returns:
the size

template<class T>
GLvoid ES3D::List< T >::trimToSize ( GLvoid   )  [inline]

Trims the list with capacity equals size.


The documentation for this class was generated from the following file:
Generated on Sat May 10 16:30:55 2008 for ES 3D Game SDK Documentation by  doxygen 1.4.7