GClasses

GClasses::ArrayHolder< T > Class Template Reference

Just like Holder, except for arrays. More...

#include <GHolders.h>

List of all members.

Public Member Functions

 ArrayHolder (T *p=NULL)
 ArrayHolder (const ArrayHolder &other)
 ~ArrayHolder ()
 Deletes the array of objects being held.
const ArrayHolderoperator= (const ArrayHolder &other)
void reset (T *p=NULL)
 Deletes the array of objects being held and sets this holder to hold NULL.
T * get ()
 Returns a pointer to the first element of the array being held.
T * release ()
 Releases the array. (After calling this method, it is your job to delete the array.)
T & operator[] (size_t n)

Detailed Description

template<class T>
class GClasses::ArrayHolder< T >

Just like Holder, except for arrays.


Constructor & Destructor Documentation

template<class T >
GClasses::ArrayHolder< T >::ArrayHolder ( T *  p = NULL) [inline]
template<class T >
GClasses::ArrayHolder< T >::ArrayHolder ( const ArrayHolder< T > &  other) [inline]
template<class T >
GClasses::ArrayHolder< T >::~ArrayHolder ( ) [inline]

Deletes the array of objects being held.


Member Function Documentation

template<class T >
T* GClasses::ArrayHolder< T >::get ( ) [inline]

Returns a pointer to the first element of the array being held.

template<class T >
const ArrayHolder& GClasses::ArrayHolder< T >::operator= ( const ArrayHolder< T > &  other) [inline]
template<class T >
T& GClasses::ArrayHolder< T >::operator[] ( size_t  n) [inline]
template<class T >
T* GClasses::ArrayHolder< T >::release ( ) [inline]

Releases the array. (After calling this method, it is your job to delete the array.)

template<class T >
void GClasses::ArrayHolder< T >::reset ( T *  p = NULL) [inline]

Deletes the array of objects being held and sets this holder to hold NULL.