AAO DRAMA C++ Interface (Old style)
DRAMA C++, Depreciated, don't use for new code
|
A class which reads Enumerated values from a SDS argument structures. More...
#include <gittpl.h>
Public Types | |
enum | { Upper =GIT_M_ARG_UPPER , Lower =GIT_M_ARG_LOWER , KeepErr =GIT_M_ARG_KEEPERR , Abbrev = GIT_M_ARG_ABBREV , LastBit =GIT_M_ARG_LASTBIT , KeepValErr =GIT_M_ARG_KEEPVALERR } |
Public Member Functions | |
Enum () | |
Default contructor for the object. | |
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. | |
Enum (EnumType InitialValue) | |
Constructor with initial value supplied. | |
virtual | ~Enum () |
Destructor. | |
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 const char * () const | |
Return the underlying value of this object as a string. | |
operator EnumType () const | |
Return the underlying value of this object. | |
A class which reads Enumerated values from a SDS argument structures.
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. |
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tony.farrell@mq.edu.au
Generated on Thu Jan 23 2025 07:03:27 for AAO DRAMA C++ Interface (Old style) by 1.9.8