Ares
Public Member Functions | Protected Attributes

VectorNames< T > Class Template Reference

#include <src/Utilities/Constructs.h>

List of all members.

Public Member Functions

char * operator[] (int Index)
T * FindItem (int Index)
const DynamicVectorClass< char * > & Entries () const
char ** ToString ()
int Count () const
 VectorNames (const char *Buf=NULL)
void Tokenize (const char *Buf=NULL)

Protected Attributes

DynamicVectorClass< char * > Strings
char * Buffer

template<class T>
class VectorNames< T >


Constructor & Destructor Documentation

template<class T>
VectorNames< T >::VectorNames ( const char *  Buf = NULL) [inline]
                                                {
                this->Buffer = _strdup(Buf);
        }

Member Function Documentation

template<class T>
int VectorNames< T >::Count ( ) const [inline]
                          {
                return this->Strings.Count;
        }
template<class T>
const DynamicVectorClass<char *>& VectorNames< T >::Entries ( ) const [inline]
                                                          {
                return this->Strings;
        }
template<class T>
T* VectorNames< T >::FindItem ( int  Index) [inline]
                                {
                return T::Find((*this)[Index]);
        }
template<class T>
char* VectorNames< T >::operator[] ( int  Index) [inline]
                                     {
                if(Index < 0 || Index > this->Strings.Count) {
                        return NULL;
                }
                return this->Strings.GetItem(Index);
        }
template<class T>
void VectorNames< T >::Tokenize ( const char *  Buf = NULL) [inline]
                                               {
                if(Buf) {
                        if(this->Buffer) {
                                free(this->Buffer);
                        }
                        this->Buffer = _strdup(Buf);
                }
                this->Strings.Clear();
                for(char * cur = strtok(this->Buffer, ","); cur && *cur; cur = strtok(NULL, ",")) {
                        this->Strings.AddItem(cur);
                }
        }
template<class T>
char** VectorNames< T >::ToString ( ) [inline]
                           {
                return this->Strings.Items;
        }

Member Data Documentation

template<class T>
char* VectorNames< T >::Buffer [protected]
template<class T>
DynamicVectorClass<char *> VectorNames< T >::Strings [protected]

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines