DRAMA C++ Intro   Class Hierarchy   Alphabetical List of types   List of Classes   File List   Class Member Index   File Members Index   Related Pages  

Public Member Functions | Protected Member Functions | List of all members
GitBool Class Reference

A class which reads logical values from SDS argument structures. More...

#include <Git.h>

Inheritance diagram for GitBool:
Git

Public Member Functions

 GitBool ()
 Simple constructor with a default value of false. More...
 
 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. More...
 
virtual ~GitBool ()
 Destructor. More...
 
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. More...
 
 operator int () const
 Conversion operator - given GitBool, return an int. More...
 
 operator bool () const
 Conversion operator - given GitBool, return a bool. More...
 

Protected Member Functions

virtual const GitLogStrTypeLookup ()
 Return a pointer to an array of enum strings equivalents. More...
 

Additional Inherited Members

- Public Types inherited from Git
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
}
 

Detailed Description

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.

See also
GitArgGetL()

Constructor & Destructor Documentation

GitBool::GitBool ( )
inline

Simple constructor with a default value of false.

GitBool::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) 
)
inline

Constructor with the initial value set from an SDS structure.

Parameters
IdThe SDS structure.
NameThe name of the item within the structure.
PositionIf the item does not exist by the name, then presume this position.
statusInherited status
DefaultThe default value.
FlagsWhich GIT Flags to apply
virtual GitBool::~GitBool ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void GitBool::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) 
)
inlinevirtual

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.

Parameters
IdThe SDS structure.
NameThe name of the item within the structure.
PositionIf the item does not exist by the name, then presume this position.
statusInherited status
DefaultThe default value.
FlagsWhich GIT Flags to apply
virtual const GitLogStrType* GitBool::Lookup ( )
inlineprotectedvirtual

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

Returns
a pointer to a array of pointer to GitLogStrType, which contains pointers to pairs of true/false values. The last entry in the array must contain a pair of null pointers to terminate the array.
GitBool::operator bool ( ) const
inline

Conversion operator - given GitBool, return a bool.

GitBool::operator int ( ) const
inline

Conversion operator - given GitBool, return an int.


The documentation for this class was generated from the following file:

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 doxygen 1.8.10