AAO DRAMA/DRAMA2 C++ Interface
|
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 method Get(), to fetch its value from an SDS structure. There is also a constructor which does the Get operation.
MinValue | The minimum value acceptable in a Get ( operation. Default is LONG_MIN (from limits.h) |
MaxValue | The maximum value acceptable in a Get operation. Default is LONG_MAX (from limits.h) |
DefaultVal | The default value for the item. This is NOT validated against the range and hence can be used to set it to a identifiable particular value, if desired. Defaults to zero. |
#include "gitarg.hh"
Public Member Functions | |
Int (const long def=DefaultVal) | |
Simple constructor with a default value specified. More... | |
Int (const sds::Id &Id, const std::string &Name="Argument1", const int Position=1, const long Default=DefaultVal, const Flags flags=Flags::KeepErr) | |
Constructor which contructs the value from an item in an SDS structure. More... | |
virtual void | Get (const sds::Id &Id, const std::string &Name="Argument1", const int Position=1, const long int Default=0, const Flags flags=Flags::KeepErr) |
Get the value of the object from an SDS structure. More... | |
operator long int () const | |
Conversion operator - given git::Int, return a long int. More... | |
|
inline |
Simple constructor with a default value specified.
def | The default value to use. If not specified, uses template argument "DefaultVal". |
|
inline |
Constructor which contructs the value from an item in an SDS structure.
The value is fetched from the named item (arg #2) within the SDS structure specified. or the Position (constructor arg #3) item in the structure if the item named does not exist. (
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. |
Default | The default value. If not specified, uses "DefaultVal". |
flags | Which GIT Flags to apply. If you specify KeepErr, then an exception is throw if the value in the SDS structure is invalid. If you don't specify KeepErr and and the SDS structure does not contain a value item, then the value is set to the supplied default. |
References drama::Default, and drama::gitarg::Int< MinVal, MaxVal, DefaultVal >::Get().
|
inlinevirtual |
Get the value of the object from an SDS structure.
The value is fetched from the named item (arg #2) within the SDS structure specified. or the Position (constructor arg #3) item in the structure if the item named does not exist.
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. |
Default | The default value. |
flags | Which GIT Flags to apply. If you specify KeepErr, then an exception is throw if the value in the SDS structure is invalid. If you don't specify KeepErr and and the SDS structure does not contain a value item, then the value is set to the supplied default. |
References drama::Default, and DramaTHROW.
Referenced by drama::gitarg::Int< MinVal, MaxVal, DefaultVal >::Int().
|
inline |
Conversion operator - given git::Int, return a long int.
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 15:57:53 for AAO DRAMA/DRAMA2 C++ Interface by