Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

RayGina::CORE::RList< T > Class Template Reference

#include <RList.hxx>

List of all members.

Public Member Functions

 RList ()
 RList (const RUInt newCapacity)
 ~RList ()
getElement (const RUInt elementNumber) const
const RUInt getSize () const
const RBool isEmpty () const
const RUInt getCapacity () const
const RStatus clear ()
const RStatus setSize (const RUInt newSize)
const RStatus setCapacity (const RUInt newCapacity)
const RUInt getFreeElements () const
const RUInt addElement (T newElement)
T & operator[] (const RUInt n)
T & operator[] (const RUInt n) const
const RStatus pack (const RUInt freeElements=0)
void iterate (T(*iterationFunction)(const RUInt elementNumber, T inputValue))
void readOnlyIterate (void(*iterationFunction)(const RUInt elementNumber, T inputValue))

Private Attributes

T * _data
 the pointer containing the data
RUInt _size
 the current size
RUInt _capacity
 the current capacity

template<typename T>
class RayGina::CORE::RList< T >


Constructor & Destructor Documentation

template<typename T>
RayGina::CORE::RList< T >::RList  )  [inline]
 

creates an empty RList with NO capacity

template<typename T>
RayGina::CORE::RList< T >::RList const RUInt  newCapacity  )  [inline]
 

creates an empty RList with a given capacity

template<typename T>
RayGina::CORE::RList< T >::~RList  )  [inline]
 

destructor


Member Function Documentation

template<typename T>
const RUInt RayGina::CORE::RList< T >::addElement newElement  )  [inline]
 

adds an element at the end of the list

Definition at line 169 of file RList.hxx.

template<typename T>
const RStatus RayGina::CORE::RList< T >::clear  )  [inline]
 

clears the list

Definition at line 88 of file RList.hxx.

template<typename T>
const RUInt RayGina::CORE::RList< T >::getCapacity  )  const [inline]
 

returns the capacity of the list

Definition at line 81 of file RList.hxx.

template<typename T>
T RayGina::CORE::RList< T >::getElement const RUInt  elementNumber  )  const [inline]
 

returns the n-the element in the list

Definition at line 54 of file RList.hxx.

template<typename T>
const RUInt RayGina::CORE::RList< T >::getFreeElements  )  const [inline]
 

return the number of elements that can be inserted without resizing

Definition at line 162 of file RList.hxx.

template<typename T>
const RUInt RayGina::CORE::RList< T >::getSize  )  const [inline]
 

returns the number of elements in the list

Definition at line 67 of file RList.hxx.

template<typename T>
const RBool RayGina::CORE::RList< T >::isEmpty  )  const [inline]
 

returns the number of elements in the list

Definition at line 74 of file RList.hxx.

template<typename T>
void RayGina::CORE::RList< T >::iterate T(*)(const RUInt elementNumber, T inputValue)  iterationFunction  )  [inline]
 

Definition at line 228 of file RList.hxx.

template<typename T>
T& RayGina::CORE::RList< T >::operator[] const RUInt  n  )  const [inline]
 

operate to access the n-th element

Definition at line 205 of file RList.hxx.

template<typename T>
T& RayGina::CORE::RList< T >::operator[] const RUInt  n  )  [inline]
 

operate to access the n-th element

Definition at line 187 of file RList.hxx.

template<typename T>
const RStatus RayGina::CORE::RList< T >::pack const RUInt  freeElements = 0  )  [inline]
 

set the capacity to the current size of the list This will remove space for adding new elements. It's for calling after you know the list does not change anymore and you want a optimal memory use!

The optional freeElements parameter specifices how many free elements should be kept. (Default 0)

Definition at line 221 of file RList.hxx.

template<typename T>
void RayGina::CORE::RList< T >::readOnlyIterate void(*)(const RUInt elementNumber, T inputValue)  iterationFunction  )  [inline]
 

Definition at line 239 of file RList.hxx.

template<typename T>
const RStatus RayGina::CORE::RList< T >::setCapacity const RUInt  newCapacity  )  [inline]
 

changes the capacity of the list, is there are more elements in the list than the new capacity they will be deleted

Definition at line 113 of file RList.hxx.

template<typename T>
const RStatus RayGina::CORE::RList< T >::setSize const RUInt  newSize  )  [inline]
 

changes the capacity and the size to the given value if the given value is bigger than the current size the value is undifined of the enrties bigger than the current size

Definition at line 104 of file RList.hxx.


Member Data Documentation

template<typename T>
RUInt RayGina::CORE::RList< T >::_capacity [private]
 

the current capacity

Definition at line 255 of file RList.hxx.

template<typename T>
T* RayGina::CORE::RList< T >::_data [private]
 

the pointer containing the data

Definition at line 249 of file RList.hxx.

template<typename T>
RUInt RayGina::CORE::RList< T >::_size [private]
 

the current size

Definition at line 252 of file RList.hxx.


The documentation for this class was generated from the following file:
Generated on Sun Dec 2 17:01:09 2007 for rayGina by  doxygen 1.3.9.1