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

GitTpl::Real< MinVal, MaxVal, DefaultVal > Class Template Reference

#include <gittpl.h>

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

GitReal Git List of all members.

Detailed Description

template<long int MinVal, long int MaxVal, long int DefaultVal = 0>
class GitTpl::Real< MinVal, MaxVal, DefaultVal >

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.

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

It should be noted that as templates don't access double arguments, the template parameters which specify the range must be long ints, limiting the range you can use. If you need a greater range or non-integer range limits, you must use GitReal directly, but in many cases this verison will probably suffice.

See also:
GitArgGetD()
Parameters:
MinValue  The minimum value acceptable in a Get operation.
MaxValue  The maximum value acceptable in a Get operation.
DefaultVal  The 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.


Public Methods

 Real (const double def=(double) DefaultVal)
 Simple constructor with a default value specified.

 Real (const SdsId &Id, const char *const Name, const int Position, StatusType *const status, const double Default=(double) DefaultVal, const int Flags=Git::KeepErr)
 Constructor with the initial value set from an SDS structure.


Constructor & Destructor Documentation

template<long int MinVal, long int MaxVal, long int DefaultVal = 0>
GitTpl::Real< MinVal, MaxVal, DefaultVal >::Real const double    def = (double)DefaultVal [inline]
 

Simple constructor with a default value specified.

Parameters:
def  The default value to use. If not specified, uses "DefaultVal"

template<long int MinVal, long int MaxVal, long int DefaultVal = 0>
GitTpl::Real< MinVal, MaxVal, DefaultVal >::Real const SdsId   Id,
const char *const    Name,
const int    Position,
StatusType *const    status,
const double    Default = (double)DefaultVal,
const int    Flags = Git::KeepErr
[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. If not specified, uses "DefaultVal".
Flags  Which GIT Flags to apply. If not specified, Git::KeepErr is used.


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 Tue Nov 3 09:09:56 2009 for AAO DRAMA C++ Interfaces by doxygen 1.2.18