SatAndLight  2.2.2-hubble
Simulation toolkit for space telescopes
SnlOpt Class Reference

Manage a SNL command line option. More...

#include <Options.h>

Public Member Functions

E_OPTIONS_ID GetId (void)
 Returns option ID. More...
 
double GetValueD (void)
 Returns the option value attribute (double). More...
 
int GetValueI (void)
 Returns the option value attribute (integer). More...
 
string GetValueS (void)
 Returns the option value attribute (string). More...
 
unsigned int GetValueUI (void)
 Returns the option value attribute (32-bit unsigned integer). More...
 
unsigned long int GetValueULI (void)
 Returns the option value attribute (64-bit unsigned integer). More...
 
void Print (void)
 Prints option in stderr. More...
 
void SetExtraDescription (const string aExtraDescription)
 Sets the option extra description attribute. More...
 
void SetValue (const string aValue)
 Sets the option value attribute. More...
 
Constructors and destructors
 SnlOpt (const E_OPTIONS_ID aId)
 Constructor of the SnlOpt class. More...
 
virtual ~SnlOpt (void)
 Destructor of the SnlOpt class. More...
 

Private Attributes

double dvalue
 double value. More...
 
string extra_description
 Extra description message. More...
 
E_OPTIONS_ID id
 ID. More...
 
int ivalue
 integer value. More...
 
string svalue
 string value. More...
 
unsigned int uivalue
 unsigned 32b integer value. More...
 
unsigned long int ulivalue
 unsigned 64b integer value. More...
 

Detailed Description

Manage a SNL command line option.

This class is designed to manage a single option parameter. An option is identified by an ID listed in _E_OPTIONS_ID. An option is identified by a keyword (OPTIONS_KEY), a value type (OPTIONS_TYPE) and a description (OPTIONS_DESC).

Then, option attributes can be specified:

See also
SnlProg
Authors
Florent Robinet, flore.nosp@m.nt.r.nosp@m.obine.nosp@m.t@ij.nosp@m.clab..nosp@m.in2p.nosp@m.3.fr

Constructor & Destructor Documentation

◆ SnlOpt()

SnlOpt::SnlOpt ( const E_OPTIONS_ID  aId)

Constructor of the SnlOpt class.

Default option attributes are set:

  • Extra description = ""
  • Value = 0
    Parameters
    [in]aIdOption ID
    See also
    _E_OPTIONS_ID

◆ ~SnlOpt()

SnlOpt::~SnlOpt ( void  )
virtual

Destructor of the SnlOpt class.

Member Function Documentation

◆ GetId()

E_OPTIONS_ID SnlOpt::GetId ( void  )
inline

Returns option ID.

◆ GetValueD()

double SnlOpt::GetValueD ( void  )
inline

Returns the option value attribute (double).

See also
_E_OPTIONS_TYPE.

◆ GetValueI()

int SnlOpt::GetValueI ( void  )
inline

Returns the option value attribute (integer).

See also
_E_OPTIONS_TYPE.

◆ GetValueS()

string SnlOpt::GetValueS ( void  )
inline

Returns the option value attribute (string).

See also
_E_OPTIONS_TYPE.

◆ GetValueUI()

unsigned int SnlOpt::GetValueUI ( void  )
inline

Returns the option value attribute (32-bit unsigned integer).

See also
_E_OPTIONS_TYPE.

◆ GetValueULI()

unsigned long int SnlOpt::GetValueULI ( void  )
inline

Returns the option value attribute (64-bit unsigned integer).

See also
_E_OPTIONS_TYPE.

◆ Print()

void SnlOpt::Print ( void  )

Prints option in stderr.

◆ SetExtraDescription()

void SnlOpt::SetExtraDescription ( const string  aExtraDescription)
inline

Sets the option extra description attribute.

Parameters
[in]aExtraDescriptionExtra description.
See also
OPTIONS_DESC

◆ SetValue()

void SnlOpt::SetValue ( const string  aValue)

Sets the option value attribute.

The input value is provided as a string variable. It is converted to the value type defined in _E_OPTIONS_TYPE.

Parameters
[in]aValueOption value.

Member Data Documentation

◆ dvalue

double SnlOpt::dvalue
private

double value.

◆ extra_description

string SnlOpt::extra_description
private

Extra description message.

◆ id

E_OPTIONS_ID SnlOpt::id
private

ID.

◆ ivalue

int SnlOpt::ivalue
private

integer value.

◆ svalue

string SnlOpt::svalue
private

string value.

◆ uivalue

unsigned int SnlOpt::uivalue
private

unsigned 32b integer value.

◆ ulivalue

unsigned long int SnlOpt::ulivalue
private

unsigned 64b integer value.


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