Vector< T > Class Template Reference

#include <Vector.hpp>

List of all members.

Public Member Functions

 Vector (UInt32 preferredAllocSize=defaultAllocChunkSize, UInt32 preferredAllocChunkSize=defaultAllocChunkSize)
 ~Vector ()
T & operator[] (UInt32 location)
void addData (T *dataToAdd, UInt32 count)
void setAllocChunkSize (UInt32 preferredAllocChunkSize)
UInt32 getStorageSize ()
UInt32 getSize ()
UInt32 setSize (UInt32 newSize)
void setStorageSize (UInt32 size)
UInt32 getStorage (T **storage)


Detailed Description

template<class T>
class Vector< T >

Class Vector, only provides basic functionaly to autmatically allocate more memory whenever required. At the time no advaced sort functions etc. required.


Constructor & Destructor Documentation

template<class T>
Vector< T >::Vector ( UInt32  preferredAllocSize = defaultAllocChunkSize,
UInt32  preferredAllocChunkSize = defaultAllocChunkSize 
) [inline]

Class constructor with preferred parameters

Parameters:
preferredAllocSize The allocation size initially
preferredAllocChunkSize The chunk size used for each re-allocation
Returns:

template<class T>
Vector< T >::~Vector (  )  [inline]

Class destructor


Member Function Documentation

template<class T>
void Vector< T >::addData ( T *  dataToAdd,
UInt32  count 
) [inline]

Add directly bytes of data provided into storage.

Parameters:
dataToAdd Address of location from where data is to be added
count Number of bytes to be added

template<class T>
UInt32 Vector< T >::getSize (  )  [inline]

Get the actualy size of stored data

template<class T>
UInt32 Vector< T >::getStorage ( T **  storage  )  [inline]

Return the actual storage area of data along with the size of the data contained.

Parameters:
storage Place where the addess of the storage is saved
Returns:
The data size in the storage

template<class T>
UInt32 Vector< T >::getStorageSize (  )  [inline]

Get the allocated size of memory allocated

template<class T>
T& Vector< T >::operator[] ( UInt32  location  )  [inline]

Access operator for both read and write operation.

Access operator for both read and write operation. Allocates more if access is out of bound No difference was observed specifying const qualifier for read operation, atleast MSVC cannot differentiate between the two.

Parameters:
location Where to read and/or write
Returns:
Return by reference where to read and/or write

template<class T>
void Vector< T >::setAllocChunkSize ( UInt32  preferredAllocChunkSize  )  [inline]

Set the preferred chunk allocation size

Parameters:
preferredAllocChunkSize The new preferred size of allocation

template<class T>
UInt32 Vector< T >::setSize ( UInt32  newSize  )  [inline]

Set the stored data size to new value

template<class T>
void Vector< T >::setStorageSize ( UInt32  size  )  [inline]

Set the storage size to a new value, more memory might be allocated in the process

Parameters:
size Required new size


The documentation for this class was generated from the following file:
Generated on Sun Aug 20 15:06:40 2006 for ISOCodec by  doxygen 1.4.7