AAO DRAMA C++ Interface (Old style)
DRAMA C++, Depreciated, don't use for new code
Public Types | 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 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

 GitReal (const double def=0.0)
 Simple constructor with a default value specified.
 
 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.
 
virtual ~GitReal ()
 Destructor.
 
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.
 
 operator double () const
 Conversion operators - given GitReal, return a double.
 
 operator float () const
 Conversion operators - given GitReal, return a float.
 

Protected Member Functions

virtual const double * Range ()
 Method which returns sets the range.
 

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 a sub-class class, you can supply range limits for the value.ange in an inheriting class, you can supply range limits for the value. (BUT THIS ONLY WORKS IF YOU DO AN EXPLICT Get(), not when using the constructor implicit Get(). This is because the constructor of the base class can't invoke a method in a sub-class even when virtual (C++ standard).

See also
GitArgGetD()

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