VarList< T > Class Template Reference

#include <VarList.h>

List of all members.


Detailed Description

template<class T>
class VarList< T >

Variable length simple list.

Definition at line 68 of file VarList.h.

Public Member Functions

 VarList (void)
 VarList (int l,...)
 ~VarList (void)
const T * GetDataPtr ()
int Length ()
T & operator[] (const int i)

Protected Attributes

T * data
int length


Constructor & Destructor Documentation

template<class T>
VarList< T >::VarList void   )  [inline]
 

Definition at line 76 of file VarList.h.

00077     {
00078         data = 0;
00079     }

template<class T>
VarList< T >::VarList int  l,
  ...
[inline, explicit]
 

Definition at line 82 of file VarList.h.

00083     {
00084         length = l;
00085         data = new T[length];
00086         
00087         va_list argptr;
00088         va_start(argptr, l);
00089         for(int i=0; i<length; i++)
00090         {
00091             data[i] = va_arg(argptr, T);
00092         }
00093         va_end(argptr);
00094     }

template<class T>
VarList< T >::~VarList void   )  [inline]
 

Definition at line 96 of file VarList.h.

00097     {
00098         delete [] data;
00099     }


Member Function Documentation

template<class T>
const T* VarList< T >::GetDataPtr  )  [inline]
 

Definition at line 101 of file VarList.h.

00102     {
00103         return data;
00104     }

template<class T>
int VarList< T >::Length  )  [inline]
 

Definition at line 107 of file VarList.h.

00108     {
00109         return length;
00110     }

template<class T>
T& VarList< T >::operator[] const int  i  )  [inline]
 

Definition at line 112 of file VarList.h.

00113     {
00114         return data[i];
00115     }


Member Data Documentation

template<class T>
T* VarList< T >::data [protected]
 

Definition at line 71 of file VarList.h.

template<class T>
int VarList< T >::length [protected]
 

Definition at line 72 of file VarList.h.


The documentation for this class was generated from the following file:
CIMPL 0.1 Code Reference. Copyright © 2004, Baris Sumengen. All rights reserved.