AAO DRAMA C++ Interface (Old style)
DRAMA C++, Depreciated, don't use for new code
|
A class which reads logical values from SDS argument structures. More...
#include <Git.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 | |
GitBool () | |
Simple constructor with a default value of false. | |
GitBool (const SdsId &Id, const char *const Name, const int Position, StatusType *const status, const bool Default=false, const int Flags=(Git::Upper|Git::Abbrev)) | |
Constructor with the initial value set from an SDS structure. | |
virtual | ~GitBool () |
Destructor. | |
virtual void | Get (const SdsId &Id, const char *const Name, const int Position, StatusType *const status, const bool Default=false, const int Flags=(Git::Upper|Git::Abbrev)) |
Get the value of the object from an SDS struture. | |
operator bool () const | |
Conversion operator - given GitBool, return a bool. | |
operator int () const | |
Conversion operator - given GitBool, return an int. | |
Protected Member Functions | |
virtual const GitLogStrType * | Lookup () |
Return a pointer to an array of enum strings equivalents. | |
A class which reads logical values from SDS argument structures.
This is C++ class which provides an interface to GitArgGetL(). It Implements a boolean type which includes the operation GotBool::Get , to fetch its value from an Sds structure.
By default, the string combinations "YES/NO" and "TRUE/FALSE" are accepted as boolean values, any input string being converted to upper case and abbreviations being accepted. There is also a constructor which does the Get operation.
By overriding the method GitEnum::Lookup in an inheriting class, you can supplied alternative lists of True/False strings - but WARNING, these alternatives are NOT available from the constructor, only from the Get() (since virtual functions are not invoked by the virtual pointer in a constructor). Also note that strings can be at most GIT_ARG_LMAX (20) characters long.
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 Dec 12 2024 23:07:38 for AAO DRAMA C++ Interface (Old style) by 1.9.8