#include <gittpl.h>
Inheritance diagram for GitTpl::Enum< LookupClass, EnumType >:

This is an template class used for cases where we want to fetch a STRING action argument which must then be converted to an enum type.
This is an alternative approach to GitEnum. GitTpl::Enum is a template class. Two template arguments are required - "LookupClass" and "EnumType". The former must be a sub-class of Git::EnumLookupClass. The later is a normally simple enum type - it mus be possible to cast this class from an integer and cast back to an integer from this class.
| LookupClass | A sub-class of GitTpl::EnumLookupClass with GetMaxValue() and GetStringArray() implemented. |
| EnumType | The underlyting enumerated value. Must be possible to cast to and from an int. Must have values for 0 through to LookupClass->GetMaxValue()+1 inclusive. |
Public Methods | |
| Enum () | |
| Default contructor for the object. | |
| Enum (EnumType InitialValue) | |
| Constructor with initial value supplied. | |
| Enum (const SdsId &Id, const char *const Name, const int Position, StatusType *status, const char *Default=0, const int Flags=Git::Upper|Git::Abbrev) | |
| Constructor which contructs the values from an SDS type. | |
| void | Get (const SdsId &Id, const char *const Name, const int Position, StatusType *status, const char *Default=0, const int Flags=Git::Upper|Git::Abbrev|Git::KeepErr) |
| Get the value of the object from an SDS struture. | |
| operator EnumType () const | |
| Return the underlying value of this object. | |
| operator const char * () const | |
| Return the underlying value of this object as a string. | |
| virtual | ~Enum () |
| Destructor. | |
|
|||||||||
|
Default contructor for the object. This will set the value of the object to be the invalid value, obtained by setting the value to the lookup class's GetMaxValue() value + 1. |
|
||||||||||
|
Constructor with initial value supplied. The initial value must be one of the values in the enum type.
|
|
||||||||||||||||||||||||||||||||
|
Constructor which contructs the values from an SDS type.
|
|
|||||||||
|
Destructor.
|
|
||||||||||||||||||||||||||||||||
|
Get the value of the object from an SDS struture. This is the function which is used to set the value of the object. It is passed an SDS structure and looks for the item within that structure.
|
|
|||||||||
|
Return the underlying value of this object as a string.
|
|
|||||||||
|
Return the underlying value of this object.
|
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tjf@aaoepp.aao.gov.au Generated on Tue Nov 3 09:09:56 2009 for AAO DRAMA C++ Interfaces by
1.2.18