lang::Array< T > Class Template Reference

The Array class. More...

#include <Array.h>

List of all members.

Public Member Functions

 Array ()
 Array (const Array< T > &in)
virtual ~Array ()
uint32 getLength () const
uint32 getSize () const
void reserve (uint32 number)
void free ()
void clear ()
void add (const T elem)
void remove (int32 i)
void remove (int32 i, int32 n)
const T & operator[] (int32 i) const
T & operator[] (int32 i)
void operator= (const Array< T > &in)
void operator+= (Array< T > &in)
const char * toString ()


Detailed Description

template<class T>
class lang::Array< T >

The Array class.

Constructor & Destructor Documentation

template<class T>
lang::Array< T >::Array (  )  [inline]

Constructor

template<class T>
lang::Array< T >::Array ( const Array< T > &  in  )  [inline]

Copy Constructor

Parameters:
in The array reference

template<class T>
lang::Array< T >::~Array (  )  [inline, virtual]

Destructor


Member Function Documentation

template<class T>
uint32 lang::Array< T >::getLength (  )  const [inline]

Get the length

Returns:
Return the array length

template<class T>
uint32 lang::Array< T >::getSize (  )  const [inline]

Get the size in bytes

Returns:
Return the array size

template<class T>
void lang::Array< T >::reserve ( uint32  number  )  [inline]

Reserve the required amount of space for the array

Parameters:
n The desired size of memory

template<class T>
void lang::Array< T >::free (  )  [inline]

Free all the space

template<class T>
void lang::Array< T >::clear (  )  [inline]

Clear the whole array, but keep the memory space

template<class T>
void lang::Array< T >::add ( const T  elem  )  [inline]

Add a new element to the end of the array, automatically allocating more space, if needed

Parameters:
elem The item to be inserted

template<class T>
void lang::Array< T >::remove ( int32  i  )  [inline]

Remove the element in the given position

Parameters:
i The index

template<class T>
void lang::Array< T >::remove ( int32  i,
int32  n 
) [inline]

Remove 'n' elements in the given position

Parameters:
i The index
n The number

template<class T>
const T & lang::Array< T >::operator[] ( int32  i  )  const [inline]

Indexing operator returning const

Parameters:
i The index
Returns:
Return the object const reference

template<class T>
T & lang::Array< T >::operator[] ( int32  i  )  [inline]

Indexing operator

Parameters:
i The index
Returns:
Return the object reference

template<class T>
void lang::Array< T >::operator= ( const Array< T > &  in  )  [inline]

Copy Constructor

Parameters:
in The object reference

template<class T>
void lang::Array< T >::operator+= ( Array< T > &  in  )  [inline]

Adds another array to the end of current array

Parameters:
in The object reference

template<class T>
const char * lang::Array< T >::toString (  )  [inline]


The documentation for this class was generated from the following file:

Generated on Mon Mar 3 10:53:09 2008 for Aika by  doxygen 1.5.5