![]() |
GWOLLUM 4.2.0
Tools for gravitational-wave analyses
|
Single option. More...
#include <GwollumOptions.h>
Public Member Functions | |
| void | Add (const double aValue) |
| Adds the option value (double). | |
| void | Add (const int aValue) |
| Adds an option value (int). | |
| void | Add (const string aValue) |
| Adds the option value (string). | |
| void | Add (const unsigned int aValue) |
| Adds the option value (unsigned int). | |
| double | GetDefaultD (void) |
| Returns the option default value (double). | |
| int | GetDefaultI (void) |
| Returns the option default value (int). | |
| string | GetDefaultS (void) |
| Returns the option default value (string). | |
| unsigned int | GetDefaultU (void) |
| Returns the option default value (unsigned int). | |
| string | GetKey (void) |
| Returns the option key. | |
| unsigned int | GetNumberOfValues (void) |
| Returns the number of values. | |
| string | GetOptionName (const unsigned int aValIndex) |
| Returns a codified option name. | |
| unsigned int | GetSize (void) |
| Returns the option size. | |
| string | GetTag (void) |
| Returns the option tag. | |
| char | GetType (void) |
| Returns the option type. | |
| double | GetValueD (const unsigned int aValIndex=0) |
| Returns the option value (double). | |
| bool | GetValueD (double &aValue, const unsigned int aValIndex) |
| Returns the option value (double). | |
| int | GetValueI (const unsigned int aValIndex=0) |
| Returns the option value (int). | |
| bool | GetValueI (int &aValue, const unsigned int aValIndex) |
| Returns the option value (int). | |
| string | GetValueS (const unsigned int aValIndex=0) |
| Returns the option value (string). | |
| bool | GetValueS (string &aValue, const unsigned int aValIndex) |
| Returns the option value (string). | |
| vector< double > | GetValuesD (void) |
| Returns the list of option values (double). | |
| vector< int > | GetValuesI (void) |
| Returns the list of option values (int). | |
| vector< string > | GetValuesS (void) |
| Returns the list of option values (string). | |
| vector< unsigned int > | GetValuesU (void) |
| Returns the list of option values (unsigned int). | |
| unsigned int | GetValueU (const unsigned int aValIndex=0) |
| Returns the option value (unsigned int). | |
| bool | GetValueU (unsigned int &aValue, const unsigned int aValIndex) |
| Returns the option value (unsigned int). | |
| bool | IsProvided (void) |
| Tests whether an option value was provided. | |
| void | Reset (void) |
| Resets the option. | |
| void | Set (const unsigned int aValIndex, const double aValue) |
| Updates an option value (double). | |
| void | Set (const unsigned int aValIndex, const int aValue) |
| Updates an option value (int). | |
| void | Set (const unsigned int aValIndex, const string aValue) |
| Updates an option value (string). | |
| void | Set (const unsigned int aValIndex, const unsigned int aValue) |
| Updates an option value (unsigned int). | |
| void | SetDefault (void) |
| Set option to default values. | |
Constructors and destructors | |
| GwollumOption (const string aTag, const string aKey, const int aDefaultValue, const unsigned int aSize=0) | |
| Constructor of the GwollumOption class (int). | |
| GwollumOption (const string aTag, const string aKey, const unsigned int aDefaultValue, const unsigned int aSize=0) | |
| Constructor of the GwollumOption class (unsigned int). | |
| GwollumOption (const string aTag, const string aKey, const double aDefaultValue, const unsigned int aSize=0) | |
| Constructor of the GwollumOption class (double). | |
| GwollumOption (const string aTag, const string aKey, const string aDefaultValue, const unsigned int aSize=0) | |
| Constructor of the GwollumOption class (string). | |
| virtual | ~GwollumOption (void) |
| Destructor of the GwollumOption class. | |
Private Attributes | |
| double | ddef |
| Option double default value. | |
| vector< double > | dvec |
| Option double vector. | |
| int | idef |
| Option integer default value. | |
| vector< int > | ivec |
| Option integer vector. | |
| string | key |
| Option key. | |
| unsigned int | osize |
| Option size (number of fixed values). | |
| bool | provided |
| Set to true if the option was explicitly given. | |
| string | sdef |
| Option string default value. | |
| vector< string > | svec |
| Option string vector. | |
| string | tag |
| Option tag. | |
| unsigned int | udef |
| Option unsigned integer default value. | |
| vector< unsigned int > | uvec |
| Option unsigned integer vector. | |
| char | valtype |
| Option value type. | |
Single option.
A single option is defined by:
| GwollumOption::GwollumOption | ( | const string | aTag, |
| const string | aKey, | ||
| const int | aDefaultValue, | ||
| const unsigned int | aSize = 0 |
||
| ) |
Constructor of the GwollumOption class (int).
The option is uniquely identified by a TAG and a KEY string. It is given a default value. It is possible to fix the number of values for the option. If the size is equal to 0, the number of values is not fixed.
| [in] | aTag | Option tag. Do not use "_"; they will be removed. |
| [in] | aKey | Option aKey. Do not use "_"; they will be removed. |
| [in] | aDefaultValue | Default value. |
| [in] | aSize | Number of values for this option. Use 0 for a variable size. |
| GwollumOption::GwollumOption | ( | const string | aTag, |
| const string | aKey, | ||
| const unsigned int | aDefaultValue, | ||
| const unsigned int | aSize = 0 |
||
| ) |
Constructor of the GwollumOption class (unsigned int).
The option is uniquely identified by a TAG and a KEY string. It is given a default value. It is possible to fix the number of values for the option. If the size is equal to 0, the number of values is not fixed.
| [in] | aTag | Option tag. Do not use "_"; they will be removed. |
| [in] | aKey | Option aKey. Do not use "_"; they will be removed. |
| [in] | aDefaultValue | Default value. |
| [in] | aSize | Number of values for this option. Use 0 for a variable size. |
| GwollumOption::GwollumOption | ( | const string | aTag, |
| const string | aKey, | ||
| const double | aDefaultValue, | ||
| const unsigned int | aSize = 0 |
||
| ) |
Constructor of the GwollumOption class (double).
The option is uniquely identified by a TAG and a KEY string. It is given a default value. It is possible to fix the number of values for the option. If the size is equal to 0, the number of values is not fixed.
| [in] | aTag | Option tag. Do not use "_"; they will be removed. |
| [in] | aKey | Option aKey. Do not use "_"; they will be removed. |
| [in] | aDefaultValue | Default value. |
| [in] | aSize | Number of values for this option. Use 0 for a variable size. |
| GwollumOption::GwollumOption | ( | const string | aTag, |
| const string | aKey, | ||
| const string | aDefaultValue, | ||
| const unsigned int | aSize = 0 |
||
| ) |
Constructor of the GwollumOption class (string).
The option is uniquely identified by a TAG and a KEY string. It is given a default value. It is possible to fix the number of values for the option. If the size is equal to 0, the number of values is not fixed.
| [in] | aTag | Option tag. Do not use "_"; they will be removed. |
| [in] | aKey | Option aKey. Do not use "_"; they will be removed. |
| [in] | aDefaultValue | Default value. |
| [in] | aSize | Number of values for this option. Use 0 for a variable size. |
|
virtual |
Destructor of the GwollumOption class.
|
inline |
Adds the option value (double).
Appends the value to the list of option values.
| [in] | aValue | Option value. |
|
inline |
Adds an option value (int).
Appends the value to the list of option values.
| [in] | aValue | Option value. |
|
inline |
Adds the option value (string).
Appends the value to the list of option values.
| [in] | aValue | Option value. |
|
inline |
Adds the option value (unsigned int).
Appends the value to the list of option values.
| [in] | aValue | Option value. |
|
inline |
Returns the option default value (double).
|
inline |
Returns the option default value (int).
|
inline |
Returns the option default value (string).
|
inline |
Returns the option default value (unsigned int).
|
inline |
Returns the option key.
|
inline |
Returns the number of values.
| string GwollumOption::GetOptionName | ( | const unsigned int | aValIndex | ) |
Returns a codified option name.
The option name is codified: [TAG]_[KEY]_[INDEX]_[SIZE]:
[TAG]: option tag word.[KEY]: option key word.[INDEX]: option value index.[SIZE]: option size (0 for variable option).| [in] | aValIndex | Option value index. |
|
inline |
Returns the option size.
|
inline |
Returns the option tag.
|
inline |
Returns the option type.
|
inline |
Returns the option value (double).
double options! | [in] | aValIndex | Option index. |
|
inline |
Returns the option value (double).
double options! | [out] | aValue | Returned value. |
| [in] | aValIndex | Value index. |
|
inline |
Returns the option value (int).
int options! | [in] | aValIndex | Value index. |
|
inline |
Returns the option value (int).
int options! | [out] | aValue | Returned value. |
| [in] | aValIndex | Value index. |
|
inline |
Returns the option value (string).
string options! | [in] | aValIndex | Option index. |
|
inline |
Returns the option value (string).
string options! | [out] | aValue | Returned value. |
| [in] | aValIndex | Value index. |
|
inline |
Returns the list of option values (double).
double options!
|
inline |
Returns the list of option values (int).
int options!
|
inline |
Returns the list of option values (string).
string options!
|
inline |
Returns the list of option values (unsigned int).
unsigned int options!
|
inline |
Returns the option value (unsigned int).
unsigned int options! | [in] | aValIndex | Option index. |
|
inline |
Returns the option value (unsigned int).
unsigned int options! | [out] | aValue | Returned value. |
| [in] | aValIndex | Value index. |
|
inline |
| void GwollumOption::Reset | ( | void | ) |
Resets the option.
All the option values are removed. Fixed-size option values are set to default. Variable-size options are simply empty.
|
inline |
Updates an option value (double).
| [in] | aValIndex | Option index. |
| [in] | aValue | Option value. |
|
inline |
Updates an option value (int).
| [in] | aValIndex | Option index. |
| [in] | aValue | Option value. |
|
inline |
Updates an option value (string).
| [in] | aValIndex | Option index. |
| [in] | aValue | Option value. |
|
inline |
Updates an option value (unsigned int).
| [in] | aValIndex | Option index. |
| [in] | aValue | Option value. |
| void GwollumOption::SetDefault | ( | void | ) |
Set option to default values.
For fixed-size options, all values are set to default. For variable-size options, the option is given one single value set to default.
|
private |
Option double default value.
|
private |
Option double vector.
|
private |
Option integer default value.
|
private |
Option integer vector.
|
private |
Option key.
|
private |
Option size (number of fixed values).
|
private |
Set to true if the option was explicitly given.
|
private |
Option string default value.
|
private |
Option string vector.
|
private |
Option tag.
|
private |
Option unsigned integer default value.
|
private |
Option unsigned integer vector.
|
private |
Option value type.