A class which reads Enumerated values from a SDS argument structures. More...
#include <Git.h>
Public Member Functions | |
virtual | ~GitEnum () |
Destructor. More... | |
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) |
Get the value of the object from an SDS struture. More... | |
Protected Member Functions | |
virtual void | SetValue (const unsigned int)=0 |
Set the value of the object. More... | |
virtual const char *const * | Lookup ()=0 |
Return a pointer to an array of enum strings equivalents. More... | |
Additional Inherited Members | |
![]() | |
enum | { Upper =GIT_M_ARG_UPPER, Lower =GIT_M_ARG_UPPER, KeepErr =GIT_M_ARG_KEEPERR, Abbrev = GIT_M_ARG_ABBREV, LastBit =GIT_M_ARG_LASTBIT } |
A class which reads Enumerated values from a SDS argument structures.
This is an abstract class used for cases where we want to fetch a STRING action argument which must then be converted to an enum type.
This is a virtual class - the user must provide a class which inherits this class and provides an implementation of the GitEnum::SetValue and GitEnum::Lookup functions.
|
inlinevirtual |
Destructor.
|
inline |
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.
Id | The SDS structure. |
Name | The name of the item within the structure. |
Position | If the item does not exist by the name, then presume this position. |
status | Inherited status |
Default | The default value. |
Flags | Which GIT Flags to apply |
Referenced by GitResetType::GitResetType().
|
protectedpure virtual |
Return a pointer to an array of enum strings equivalents.
The integer index of the string in this array is passed to GitEnum::SetValue when the value is set
|
protectedpure virtual |
Set the value of the object.
This function must be provided by inheritors. It is invoked when GitEnum:: wants to set the value of the object using an integer of the index of the string in the look up array. It should set the object value to the enum equivalent of this value or an invalid value if the value is invalid.
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tjf@aao.gov.au Generated on Mon Feb 22 2016 13:58:31 for AAO DRAMA C++ Interfaces by