some control statements simply trigger a parameter value to be set to a certain value, this class handles this special case
More...
#include <MHO_ParameterConfigurator.hh>
|
| typedef ParamType | param_t |
| |
| enum class | ParamType {
config
, global
, station
, baseline
,
fit
, plot
, unknown
} |
| |
| typedef ParamValueType | paramv_t |
| |
| enum class | ParamValueType {
int_type
, real_type
, bool_type
, string_type
,
list_int_type
, list_real_type
, list_string_type
, compound_type
,
logical_intersection_list_string_type
, unknown
} |
| |
some control statements simply trigger a parameter value to be set to a certain value, this class handles this special case
- Date
- Mon Jun 12 12:51:32 2023 -0400
- Author
- J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
◆ param_t
◆ paramv_t
◆ ParamType
data
| Enumerator |
|---|
| config | |
| global | |
| station | |
| baseline | |
| fit | |
| plot | |
| unknown | |
◆ ParamValueType
| Enumerator |
|---|
| int_type | |
| real_type | |
| bool_type | |
| string_type | |
| list_int_type | |
| list_real_type | |
| list_string_type | |
| compound_type | |
| logical_intersection_list_string_type | |
| unknown | |
◆ MHO_ParameterConfigurator()
◆ ~MHO_ParameterConfigurator()
| virtual hops::MHO_ParameterConfigurator::~MHO_ParameterConfigurator |
( |
| ) |
|
|
inlinevirtual |
◆ Configure()
| bool hops::MHO_ParameterConfigurator::Configure |
( |
| ) |
|
|
virtual |
Configures parameter value by evaluating conditions and attributes.
- Returns
- bool indicating success (true) or failure (false)
- Note
- This is a virtual function.
◆ DetermineParamType()
Determines parameter type from string input.
- Parameters
-
| par_type | Input parameter type as string. |
- Returns
- Parameter type enum based on input string.
◆ DetermineParamValueType()
Determines the parameter value type from a given string representation.
- Parameters
-
| par_value_type | Input string representing the parameter value type. |
- Returns
- Enum value of ParamValueType corresponding to the input string.
◆ GetScalarParameter()
template<typename XValueType >
| void hops::MHO_ParameterConfigurator::GetScalarParameter |
( |
std::string |
path, |
|
|
XValueType & |
value |
|
) |
| |
|
protected |
Getter for scalar parameter.
Retrieves a scalar parameter value from the parameter store by its path.
- Template Parameters
-
| XValueType | Template parameter XValueType |
- Parameters
-
| path | Path to the parameter as a std::string |
| value | Reference to the scalar parameter value of type XValueType |
- Returns
- void, with success indicated by modifying 'value'
- Parameters
-
| path | The path to the desired parameter. |
| value | (XValueType&) |
- Returns
- void
◆ GetVectorParameter()
template<typename XValueType >
| void hops::MHO_ParameterConfigurator::GetVectorParameter |
( |
std::string |
path, |
|
|
std::vector< XValueType > & |
values |
|
) |
| |
|
protected |
Getter for vector parameter.
Retrieves a vector parameter from the parameter store using the given path.
- Template Parameters
-
| XValueType | Template parameter (used in std::vector< XValueType >&) |
- Parameters
-
| path | The path to the parameter in the parameter store. |
| values | (std::vector< XValueType )& |
- Returns
- void
- Template Parameters
-
| XValueType | Template parameter XValueType |
- Parameters
-
| path | The path to the desired parameter. |
| values | (std::vector< XValueType )& |
◆ LogicalIntersection()
| std::vector< std::string > hops::MHO_ParameterConfigurator::LogicalIntersection |
( |
std::vector< std::string > & |
values1, |
|
|
std::vector< std::string > & |
values2 |
|
) |
| const |
|
protected |
Calculates logical intersection of two sorted string vectors.
- Parameters
-
| values1 | First vector of strings to find intersection. |
| values2 | Second vector of strings to find intersection. |
- Returns
- Vector of strings representing the logical intersection.
◆ SetAttributes()
| virtual void hops::MHO_ParameterConfigurator::SetAttributes |
( |
const mho_json & |
attr | ) |
|
|
inlinevirtual |
Setter for (current) data attributes.
- Parameters
-
| attr | Input attribute object to set |
- Note
- This is a virtual function.
◆ SetCompoundParameter()
| void hops::MHO_ParameterConfigurator::SetCompoundParameter |
( |
std::string |
path, |
|
|
const mho_json & |
values |
|
) |
| |
|
protected |
Setter for compound parameter.
- Parameters
-
| path | Path to the compound parameter as a std::string. |
| values | JSON values to set for the compound parameter. |
◆ SetConditions()
| virtual void hops::MHO_ParameterConfigurator::SetConditions |
( |
const mho_json & |
cond | ) |
|
|
inlinevirtual |
set conditions for this parameter (parsed from the control file)
- Parameters
-
| cond | Input conditions of type mho_json |
- Note
- This is a virtual function.
◆ SetScalarParameter()
template<typename XValueType >
| void hops::MHO_ParameterConfigurator::SetScalarParameter |
( |
std::string |
path, |
|
|
const XValueType & |
value |
|
) |
| |
|
protected |
Setter for scalar parameter.
Sets a scalar parameter in the MHO_ParameterStore using a given path and value.
- Parameters
-
| path | Parameter path as std::string |
| value | Scalar value to set, type XValueType |
- Returns
- void
- Parameters
-
| path | The path to the parameter as a string. |
| value | The new value for the parameter of type XValueType. |
- Returns
- No return value (void).
◆ SetVectorParameter()
template<typename XValueType >
| void hops::MHO_ParameterConfigurator::SetVectorParameter |
( |
std::string |
path, |
|
|
const std::vector< XValueType > & |
values |
|
) |
| |
|
protected |
Setter for vector parameter.
Sets a vector parameter at the specified path in the parameter store.
- Template Parameters
-
| XValueType | Template parameter (used in std::vector< XValueType >&) |
- Parameters
-
| path | Parameter path as std::string |
| values | Vector of values to set at given path |
- Returns
- void
- Template Parameters
-
| XValueType | Template parameter XValueType |
- Parameters
-
| path | The path to set the vector parameter at. |
| values | A reference to the vector of XValueType values to be set. |
◆ fAttributes
| mho_json hops::MHO_ParameterConfigurator::fAttributes |
|
protected |
◆ fConditions
| mho_json hops::MHO_ParameterConfigurator::fConditions |
|
protected |
◆ fFormat
| mho_json hops::MHO_ParameterConfigurator::fFormat |
|
protected |
◆ fParameterStore
The documentation for this class was generated from the following files: