|
OSFI-C++
3.9.2
OpenSF Integration Library
|
#include <Parameter.h>
Public Types | |
| using | ElementType = osfi::confm::ElementType |
Public Member Functions | |
| Parameter (string aName, string aDescription, string aType, ArrayNode root, string aUnits, string aMin, string aMax, vector< int > dims) | |
| Parameter (string aName, string aDescription, string aType, string aValue) | |
| Parameter (string aName, string aDescription, string aType, string aValue, string aUnits, string aMin, string aMax, vector< int > dims) | |
| Parameter (string aName, string aMin, string aMax) | |
| Parameter () | |
| void | print () const |
| virtual string | getValue () |
| string | getRawValue () const |
| int | getIntValue () const |
| double | getDoubleValue () const |
| bool | getBooleanValue () const |
| string | getStringValue () const |
| osfi::confm::TimeValue | getTimeValue () const |
| vector< string > | getVectorString () const |
| vector< string > | getVectorFile () const |
| vector< double > | getVectorDouble () const |
| vector< int > | getVectorInt () const |
| vector< bool > | getVectorBoolean () const |
| vector< osfi::confm::TimeValue > | getVectorTime () const |
| DynamicArray< double > | getMatrixDouble () const |
| DynamicArray< int > | getMatrixInt () const |
| DynamicArray< string > | getMatrixString () const |
| DynamicArray< string > | getMatrixFile () const |
| DynamicArray< bool > | fileExist () const |
| DynamicArray< bool > | getMatrixBoolean () const |
| DynamicArray< osfi::confm::TimeValue > | getMatrixTime () const |
| string | getFileValue () const |
| void | setValue (string aValue) |
| int | getNdims () const |
| const vector< int > & | getDims () const |
| string | getName () |
| string | getLocalName () const |
| string | getPath () const |
| string | getDescription () const |
| string | getUnits () const |
| string | getMax () const |
| string | getMin () const |
| string | getType () const |
| int | getParamType () |
| ElementType | getElementType () const |
| virtual bool | isArray () const |
| const ArrayNode & | getRootNode () const |
| const ArrayNode & | getNode (const vector< int > &indexs) const |
| vector< bool > | getVectorBoolean (const vector< int > &indexs) const |
| vector< string > | getVectorString (const vector< int > &indexs) const |
| vector< string > | getVectorFile (const vector< int > &indexs) const |
| vector< double > | getVectorDouble (const vector< int > &indexs) const |
| vector< int > | getVectorInt (const vector< int > &indexs) const |
| vector< osfi::confm::TimeValue > | getVectorTime (const vector< int > &indexs) const |
| int | getDims (const vector< int > &indexs) const |
| bool | isLeaf (const vector< int > &indexs) const |
Static Public Attributes | |
| static const string | delimitier |
| static const string | stringDelimitier |
Protected Member Functions | |
| string | getFileFormattedValue (string file) const |
| bool | FileExists (const string &strFilename) const |
Protected Attributes | |
| string | name |
| string | description |
| ElementType | elType |
| string | value_ |
| string | units |
| string | min |
| string | max |
| vector< int > | dims |
| ArrayNode | root_ |
| bool | isArrayParam = false |
This class encapsulates every element of information from the configuration file.
A parameter is a self-describing element that couples a name and a value, describing its contents and adding sintactic and semantic constraints.
Parameter types described in the E2E-ICD Issue 1 Rev 2.2 section 2.2.6.2. Note that only element types are included; ARRAY and MATRIX types are detected and their element type is parsed.
| Parameter::Parameter | ( | string | aName, |
| string | aDescription, | ||
| string | aType, | ||
| ArrayNode | root, | ||
| string | aUnits, | ||
| string | aMin, | ||
| string | aMax, | ||
| vector< int > | dims | ||
| ) |
Constructor for ARRAY-type parameters.
| Parameter::Parameter | ( | string | aName, |
| string | aDescription, | ||
| string | aType, | ||
| string | aValue | ||
| ) |
Minimal constructor.
| aName | Name. |
| aDescription | Description. |
| aType | Type. One of the names from ElementType |
| aValue | Value. |
| Parameter::Parameter | ( | string | aName, |
| string | aDescription, | ||
| string | aType, | ||
| string | aValue, | ||
| string | aUnits, | ||
| string | aMin, | ||
| string | aMax, | ||
| vector< int > | dims | ||
| ) |
Complete constructor.
| aName | Name. |
| aDescription | Description. |
| aType | Type. One of the names from ElementType |
| aValue | Value. |
| aUnits | Units. Blank or "-" for unitless parameters. |
| aMin | Minimum valid value. |
| aMax | Maximum valid value. |
| dims | Dimensions sizes, can be empty for a scalar |
| Parameter::Parameter | ( | string | aName, |
| string | aMin, | ||
| string | aMax | ||
| ) |
"Range" Constructor. Creates a parameter instance defining only its name and values range.
| aName | Name. |
| aMin | Minimum valid value. |
| aMax | Maximum value value. |
| Parameter::Parameter | ( | ) |
Void constructor.
| DynamicArray<bool> Parameter::fileExist | ( | ) | const |
Check the existence of the files specified within a FILE parameter
|
protected |
Checks if a file is found within the file system
| strFilename |
| bool Parameter::getBooleanValue | ( | ) | const |
Gets the value of the parameter as a boolean type.
| string Parameter::getDescription | ( | ) | const |
Gets a brief description of the parameters.
| const vector<int>& Parameter::getDims | ( | ) | const |
Gets a vector with the size of the dimensions.
| double Parameter::getDoubleValue | ( | ) | const |
Gets the value of the parameter as a double type.
| ElementType Parameter::getElementType | ( | ) | const |
Returns the data type of the elements in this parameter
|
protected |
Gets the value of the parameter as an array of characters.
Checks the file validity
| file | String where file path name is stored |
| string Parameter::getFileValue | ( | ) | const |
Gets the value of the parameter as an array of characters.
Checks the file validity
| int Parameter::getIntValue | ( | ) | const |
Gets the value of the parameter as an integer type.
| string Parameter::getLocalName | ( | ) | const |
Gets the local name of the parameter.
| DynamicArray<bool> Parameter::getMatrixBoolean | ( | ) | const |
Gets the value of the parameter as a dynamic matrix of boolean values.
| DynamicArray<double> Parameter::getMatrixDouble | ( | ) | const |
Gets the value of the parameter as a dynamic matrix of double values.
| DynamicArray<string> Parameter::getMatrixFile | ( | ) | const |
Gets the value of the parameter as a dynamic matrix of file name values.
| DynamicArray<int> Parameter::getMatrixInt | ( | ) | const |
Gets the value of the parameter as a dynamic matrix of integer values.
| DynamicArray<string> Parameter::getMatrixString | ( | ) | const |
Gets the value of the parameter as a dynamic matrix of string values.
| DynamicArray<osfi::confm::TimeValue> Parameter::getMatrixTime | ( | ) | const |
Gets the value of the parameter as a dynamic matrix of time code values.
| string Parameter::getMax | ( | ) | const |
Gets the maximum value of the parameters.
| string Parameter::getMin | ( | ) | const |
Gets the minimum value of the parameters.
| string Parameter::getName | ( | ) |
Gets the name of the parameter.
| int Parameter::getNdims | ( | ) | const |
Gets the number of dimensions.
| const ArrayNode& Parameter::getNode | ( | const vector< int > & | indexs | ) | const |
| std::out_of_range | for invalid indices, or if too many indices are given. |
| int Parameter::getParamType | ( | ) |
Gets the type of the parameter.
| string Parameter::getPath | ( | ) | const |
Gets the full path of the parameter.
| string Parameter::getRawValue | ( | ) | const |
Returns the unparsed parameter value as a string.
| const ArrayNode& Parameter::getRootNode | ( | ) | const |
If this parameter is of type ARRAY, returns the root node.
| string Parameter::getStringValue | ( | ) | const |
Gets the value of the parameter as a string type.
| osfi::confm::TimeValue Parameter::getTimeValue | ( | ) | const |
Gets the value of the parameter as time code.
| string Parameter::getType | ( | ) | const |
Gets the type of the parameter.
| string Parameter::getUnits | ( | ) | const |
Gets the units of the parameters.
|
virtual |
| vector<bool> Parameter::getVectorBoolean | ( | ) | const |
Gets the value of the parameter as a vector of booleans.
| vector<bool> Parameter::getVectorBoolean | ( | const vector< int > & | indexs | ) | const |
Equivalent to calling ArrayNode::getVectorBoolean() on the result of getNode()
| vector<double> Parameter::getVectorDouble | ( | ) | const |
Gets the value of the parameter as a vector of double values.
| vector<double> Parameter::getVectorDouble | ( | const vector< int > & | indexs | ) | const |
Equivalent to calling ArrayNode::getVectorDouble() on the result of getNode()
| vector<string> Parameter::getVectorFile | ( | ) | const |
Gets the value of the parameter as a vector of file names.
| vector<string> Parameter::getVectorFile | ( | const vector< int > & | indexs | ) | const |
Equivalent to calling ArrayNode::getVectorFile() on the result of getNode()
| vector<int> Parameter::getVectorInt | ( | ) | const |
Gets the value of the parameter as a vector of integer values.
| vector<int> Parameter::getVectorInt | ( | const vector< int > & | indexs | ) | const |
Equivalent to calling ArrayNode::getVectorInt() on the result of getNode()
| vector<string> Parameter::getVectorString | ( | ) | const |
Gets the value of the parameter as a vector of strings.
| vector<string> Parameter::getVectorString | ( | const vector< int > & | indexs | ) | const |
Equivalent to calling ArrayNode::getVectorString() on the result of getNode()
| vector<osfi::confm::TimeValue> Parameter::getVectorTime | ( | ) | const |
Gets the value of the parameter as a vector of time codes.
| vector<osfi::confm::TimeValue> Parameter::getVectorTime | ( | const vector< int > & | indexs | ) | const |
Equivalent to calling ArrayNode::getVectorTime() on the result of getNode()
|
virtual |
Returns true if this parameter is of type ARRAY, and thus user code should call getNode and/or the getX(indices) family of functions to access the data.
| void Parameter::print | ( | ) | const |
Prints out to standard output a textual description of the parameter.
| void Parameter::setValue | ( | string | aValue | ) |
Sets the parameter value as a string.
| aValue | Parameter value. |
|
static |
Character for delimiting parameter values and dimensions.
|
protected |
Brief description of the parameter, detailing its purpose and giving hints of its contents.
|
protected |
Size of every dimension.
Examples:
|
protected |
Data type of the elements of this parameter.
|
protected |
Maximum value.
|
protected |
Minimum value.
|
protected |
Name of the parameter.
Will not accept non-alphanumeric characters.
|
protected |
Data contents, if this parameter is of type ARRAY.
|
static |
Character for delimiting string and file parameter values.
|
protected |
Units of measurement of the parameter value.
Unitless parameters can specify blank units or "-" units.
|
protected |
Parameter's value.