AAO DRAMA C++ Interface (Old style)
DRAMA C++, Depreciated, don't use for new code
Public Types | Public Member Functions | List of all members
GitTpl::Int< MinVal, MaxVal, DefaultVal > Class Template Reference

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

#include <gittpl.h>

Inheritance diagram for GitTpl::Int< MinVal, MaxVal, DefaultVal >:
GitInt Git

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

 Int (const long def=DefaultVal)
 Simple constructor with a default value specified.
 
 Int (const SdsId &Id, const char *const Name, const int Position, StatusType *const status, const long Default=DefaultVal, const int Flags=Git::KeepErr)
 Constructor with the initial value set from an SDS structure.
 
virtual void Get (const SdsId &Id, const char *const Name, const int Position, StatusType *const status, const long int Default=0, const int Flags=0)
 Get the value of the object from an SDS struture.
 
 operator long int () const
 Conversion operator - given GitInt, return a long int.
 

Detailed Description

template<long int MinVal = LONG_MIN, long int MaxVal = LONG_MAX, long int DefaultVal = 0>
class GitTpl::Int< MinVal, MaxVal, DefaultVal >

A class which reads integer values from an SDS argument structure.

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

This class inherits GitInt and uses template arguments to specify the range.

See also
GitArgGetI()
Parameters
MinValueThe minimum value acceptable in a Get operation. Default is LONG_MIN (from limits.h)
MaxValueThe maximum value acceptable in a Get operation. Default is LONG_MAX (from limits.h)
DefaultValThe default value for the item. This is NOT validated against the range and hence can be used to set it to a identifible particular value, if desired. Defaults to zero.

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