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
GitReal Class Reference

A class which reads real values from an SDS argument structure. More...

#include <Git.h>

Inheritance diagram for GitReal:
Git GitTpl::Real< MinVal, MaxVal, DefaultVal >

Public Member Functions

 GitReal (const double def=0.0)
 Simple constructor with a default value specified. More...
 
 GitReal (const SdsId &Id, const char *const Name, const int Position, StatusType *const status, const double Default=0.0, const int Flags=0)
 Constructor with the initial value set from an SDS structure. More...
 
virtual ~GitReal ()
 Destructor. More...
 
virtual void Get (const SdsId &Id, const char *const Name, const int Position, StatusType *const status, const double Default=0.0, const int Flags=0)
 Get the value of the object from an SDS struture. More...
 
 operator double () const
 Conversion operators - given GitReal, return a double. More...
 
 operator float () const
 Conversion operators - given GitReal, return a float. More...
 

Protected Member Functions

virtual const double * Range ()
 Function which returns sets the range. 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 real values from an SDS argument structure.

A C++ class which provides an interface to GitArgGetD() . It Implements a double type which includes the operation Get, to fetch its value from an SDS structure. There is also a constructor which does the Get operation.

By overriding the function Range in an inheriting class, you can supply range limits for the value.

See also
GitArgGetD()

Constructor & Destructor Documentation

GitReal::GitReal ( const double  def = 0.0)
inline

Simple constructor with a default value specified.

Parameters
defThe default value to use.
GitReal::GitReal ( const SdsId Id,
const char *const  Name,
const int  Position,
StatusType *const  status,
const double  Default = 0.0,
const int  Flags = 0 
)
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 GitReal::~GitReal ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void GitReal::Get ( const SdsId Id,
const char *const  Name,
const int  Position,
StatusType *const  status,
const double  Default = 0.0,
const int  Flags = 0 
)
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

Referenced by GitTpl::Real< MinVal, MaxVal, DefaultVal >::Real().

GitReal::operator double ( ) const
inline

Conversion operators - given GitReal, return a double.

GitReal::operator float ( ) const
inline

Conversion operators - given GitReal, return a float.

virtual const double* GitReal::Range ( )
inlineprotectedvirtual

Function which returns sets the range.

This method can be overriden by inherited to set the range. If not overriden, then any value is ok.

Returns
The address of a two element array of double. The first element contains the minimum and the second the maximum.

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