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

GitBool Class Reference

#include <Git.h>

Inheritance diagram for GitBool:

Git List of all members.

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()


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 int () const
 Conversion operator - given GitBool, return an int.

 operator bool () const
 Conversion operator - given GitBool, return a bool.


Protected Member Functions

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


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:
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

virtual GitBool::~GitBool  )  [inline, virtual]
 

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)
[inline, virtual]
 

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:
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

virtual const GitLogStrType* GitBool::Lookup  )  [inline, protected, 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

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@aaoepp.aao.gov.au 

Generated on Wed Oct 8 15:56:36 2008 for AAO DRAMA C++ Interfaces by doxygen 1.3.5