HL::DynamicArray< ObjType > Class Template Reference

#include <dynarray.h>

List of all members.

Public Member Functions

 DynamicArray (void)
 ~DynamicArray (void)
void clear (void)
 Clear deletes everything in the array.
const ObjType & operator[] (int index) const
 Read-only access to an array element; asserts that index is in range.
ObjType & operator[] (int index)
 Access an array index by reference, growing the array if necessary.
void trim (int nelts)
 Trim informs the array that it is now only nelts long as far as the client is concerned.

Private Attributes

ObjType * internalArray
 The pointer to the current array.
int internalArrayLength
 The length of the internal array, in elements.

template<class ObjType>
class HL::DynamicArray< ObjType >


Constructor & Destructor Documentation

template<class ObjType >
HL::DynamicArray< ObjType >::DynamicArray ( void   )  [inline]
template<class ObjType >
HL::DynamicArray< ObjType >::~DynamicArray ( void   )  [inline]

Member Function Documentation

template<class ObjType >
void HL::DynamicArray< ObjType >::clear ( void   )  [inline]

Clear deletes everything in the array.

template<class ObjType >
ObjType& HL::DynamicArray< ObjType >::operator[] ( int  index  )  [inline]

Access an array index by reference, growing the array if necessary.

template<class ObjType >
const ObjType& HL::DynamicArray< ObjType >::operator[] ( int  index  )  const [inline]

Read-only access to an array element; asserts that index is in range.

template<class ObjType >
void HL::DynamicArray< ObjType >::trim ( int  nelts  )  [inline]

Trim informs the array that it is now only nelts long as far as the client is concerned.

This may trigger shrinking of the array.


Member Data Documentation

template<class ObjType >
ObjType* HL::DynamicArray< ObjType >::internalArray [private]

The pointer to the current array.

template<class ObjType >
int HL::DynamicArray< ObjType >::internalArrayLength [private]

The length of the internal array, in elements.


The documentation for this class was generated from the following file:
Generated on Tue Aug 2 11:51:31 2011 for Galois by  doxygen 1.6.3