AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
A class which reads Boolean values from SDS argument structures.
This is a C++ class which provides an interface to GitArgGetL(). It Implements a boolean type which includes the operation gitarg::Bool::Get , to fetch its value from an SDS structure.
By default, the string combinations "YES/NO" and "TRUE/FALSE" are accepted as Boolean values, with 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 Lookup() in a sub-class, you can supply 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.
#include "gitarg.hh"
Public Member Functions | |
Bool (bool initVal=false) | |
Simple constructor with a default value of false. | |
Bool (const sds::Id &Id, const std::string &Name="Argument1", const int Position=1, const bool Default=false, const Flags flags=(Flags::Upper|Flags::Abbrev|Flags::KeepErr)) | |
Constructor which constructs the value from an item in an SDS structure. | |
Bool (drama::thread::TAction *taction, const sds::Id &Id, const std::string &Name="Argument1", const int Position=1, const bool Default=false, const Flags flags=(Flags::Upper|Flags::Abbrev|Flags::KeepErr)) | |
Constructor which constructs the value from an item in an SDS structure. | |
virtual | ~Bool () |
Destructor. | |
virtual void | Get (const sds::Id &Id, const std::string &Name="Argument1", const int Position=1, const bool Default=false, const Flags flags=(Flags::Upper|Flags::Abbrev|Flags::KeepErr)) |
Get the value of the object from an SDS struture. | |
operator bool () const | |
Conversion operator - given gitarg::Bool, return a bool. | |
Bool | operator= (const bool src) |
Assign a bool to this gitarg::Bool item. | |
Protected Member Functions | |
virtual const GitLogStrType * | Lookup () |
Return a pointer to an array of enum strings equivalents. | |
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:35 for AAO DRAMA/DRAMA2 C++ Interface by 1.9.8