Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Description/model of a configuration parameter. More...
#include <bayeux/datatools/configuration/parameter_model.h>
Classes | |
struct | base_enum_metadata |
Base enumerated item metadata. More... | |
struct | boolean_enum_value_metadata |
Boolean enumeration support. More... | |
struct | integer_enum_value_metadata |
Integer enumeration support. More... | |
struct | integer_range_enum_metadata |
Integer range support. More... | |
struct | real_enum_value_metadata |
Real enumeration support. More... | |
struct | real_range_enum_metadata |
Real range support. More... | |
struct | string_enum_value_metadata |
String enumeration support. More... | |
Public Member Functions | |
virtual bool | is_name_valid (const std::string &name_) const |
Check if a name is valid. More... | |
parameter_model () | |
Constructor. More... | |
virtual | ~parameter_model () |
Destructor. More... | |
bool | has_documentation () const |
Check if the documentation is empty. More... | |
void | set_documentation (const std::string &documentation_) |
Set the documentation. More... | |
const std::string & | get_documentation () const |
Return the documentation. More... | |
bool | has_type () const |
Check if type is defined. More... | |
void | set_type (const basic_type type_) |
Set the type of the parameter. More... | |
basic_type | get_type () const |
Return the type of the parameter. More... | |
bool | is_boolean () const |
Check boolean type. More... | |
bool | is_integer () const |
Check integer type. More... | |
bool | is_real () const |
Check real type. More... | |
bool | is_string () const |
Check string type. More... | |
bool | is_path () const |
Check path string. More... | |
void | set_path (const bool is_path_) |
Set the path flag. More... | |
void | reset_path () |
Reset the path flag. More... | |
bool | has_path_io () const |
Check if path I/O mode is defined. More... | |
void | set_path_io (const path_io_type path_io_) |
Set the path I/O. More... | |
bool | is_path_input () const |
Check path input flag. More... | |
bool | is_path_output () const |
Check path output flag. More... | |
bool | is_path_input_output () const |
Check path output flag. More... | |
void | set (const basic_type type_, const variable_mode_type variable_mode_) |
Set the type and variable mode of the parameter. More... | |
bool | has_variable_mode () const |
Check if variable mode is defined. More... | |
void | set_variable_mode (const variable_mode_type variable_mode_) |
Set the mode of the parameter. More... | |
variable_mode_type | get_variable_mode () const |
Return the mode of the parameter. More... | |
bool | has_mutability () const |
Check mutability. More... | |
void | set_mutability (const mutability_type mutability_) |
Set the mutability trait. More... | |
mutability_type | get_mutability () const |
Get mutability. More... | |
bool | is_fixed () const |
Check fixed trait. More... | |
bool | is_variable () const |
Check mutability trait. More... | |
bool | has_fixed_value () const |
Check fixed value. More... | |
bool | get_fixed_boolean () const |
Return the fixed boolean. More... | |
int | get_fixed_integer () const |
Return the fixed integer. More... | |
double | get_fixed_real () const |
Return the fixed real. More... | |
const std::string & | get_fixed_string () const |
Return the fixed string. More... | |
void | set_fixed_boolean (const bool value_) |
Set fixed boolean value. More... | |
void | set_fixed_integer (const int value_) |
Set fixed integer value. More... | |
void | set_fixed_real (const double value_) |
Set fixed real value. More... | |
void | set_fixed_string (const std::string &value_) |
Set fixed string value. More... | |
bool | is_free () const |
Check free mode. More... | |
bool | is_interval () const |
Check interval mode. More... | |
bool | is_enumeration () const |
Check enumeration mode. More... | |
bool | has_integer_domain () const |
Check the integer domain. More... | |
void | set_integer_domain (const integer_range &ir_) |
Set integer interval. More... | |
const integer_range & | get_integer_domain () const |
Return the integer domain. More... | |
bool | has_real_domain () const |
Check the real domain. More... | |
void | set_real_domain (const real_range &ir_) |
const real_range & | get_real_domain () const |
Return the real domain. More... | |
bool | has_default_value () const |
Check default value. More... | |
void | reset_default_value () |
Reset the default value. More... | |
void | set_default_boolean (const bool value_) |
Set default boolean value. More... | |
bool | get_default_boolean () const |
Return the default boolean. More... | |
void | set_default_integer (const int value_) |
Set default integer value. More... | |
int | get_default_integer () const |
Return the default integer. More... | |
bool | has_real_precision () const |
Check the real precision. More... | |
void | set_real_precision (const double prec_) |
Set the real precision. More... | |
void | reset_real_precision () |
Reset the real precision. More... | |
double | get_real_precision () const |
Return the real precision. More... | |
double | get_real_effective_precision () const |
Return the real effective precision. More... | |
void | set_default_real (const double value_) |
Set default real value. More... | |
double | get_default_real () const |
Return the default real. More... | |
void | set_default_string (const std::string &value_) |
Set default string value. More... | |
const std::string & | get_default_string () const |
Return the default string. More... | |
bool | has_real_unit_label () const |
Check the real unit label. More... | |
void | set_real_unit_label (const std::string &unit_label_) |
Set the unit label. More... | |
const std::string & | get_real_unit_label () const |
Return the unit label. More... | |
bool | has_real_preferred_unit () const |
Check the real unit symbol. More... | |
void | set_real_preferred_unit (const std::string &value_) |
Set the unit symbol. More... | |
const std::string & | get_real_preferred_unit () const |
Return the unit symbol. More... | |
bool | fetch_real_display_unit (std::string &display_unit_symbol_, double &unit_value_) const |
Fetch the display unit symbol. More... | |
void | set_enumerated_boolean_value_metadata (const bool value_, const boolean_enum_value_metadata &metadata_) |
Set the metadata associated to a boolean value. More... | |
const boolean_enum_value_metadata & | get_enumerated_boolean_value_metadata (const bool value_) const |
Return the metadata associated to a boolean value. More... | |
boolean_enum_value_metadata & | grab_enumerated_boolean_value_metadata (const bool value_) |
Return the metadata associated to a boolean value. More... | |
bool | enumerated_boolean_value_has_group (const bool value_) const |
Check if an enumerated boolean value has a group. More... | |
const std::string & | get_enumerated_boolean_value_group (const bool value_) const |
Return the group associated to an enumerated boolean value. More... | |
void | build_list_of_enumerated_boolean_groups (std::set< std::string > &groups_) const |
Build the list of groups associated to enumerated boolean value. More... | |
void | build_list_of_enumerated_boolean_values_in_group (const std::string &group_, std::set< bool > &values_) const |
Build the list of enumerated boolean values associated to a given group. More... | |
void | build_list_of_enumerated_boolean_values (std::set< bool > &values_) const |
Build the list of enumerated boolean values. More... | |
void | add_enumerated_integer_value (const int value_, const integer_enum_value_metadata &metadata, const bool default_=false) |
Add an enumerated integer value. More... | |
void | add_enumerated_integer_value (const int value_, const bool default_=false) |
Add an enumerated integer value with its metadata. More... | |
bool | has_enumerated_integer_value (const int value_) const |
Check enumerated integer value. More... | |
void | fetch_integer_enumeration (std::vector< int > &values_) const |
Fetch the list of enumerated integer values. More... | |
bool | enumerated_integer_value_has_group (const int value_) const |
Check if an enumerated integer value has a group. More... | |
const std::string & | get_enumerated_integer_value_group (const int value_) const |
Return the group associated to an enumerated integer value. More... | |
const integer_enum_value_metadata & | get_enumerated_integer_value_metadata (const int value_) const |
Return the metadata associated to an enumerated integer value. More... | |
integer_enum_value_metadata & | grab_enumerated_integer_value_metadata (const int value_) |
Return the metadata associated to an enumerated integer value. More... | |
void | build_list_of_enumerated_integer_groups (std::set< std::string > &groups_) const |
Build the list of groups associated to enumerated integer value. More... | |
void | build_list_of_enumerated_integer_values_in_group (const std::string &group_, std::set< int > &values_) const |
Build the list of enumerated integer values associated to a given group. More... | |
void | build_list_of_enumerated_integer_values (std::set< int > &values_) const |
Build the list of enumerated integer values. More... | |
bool | has_enumerated_real_value (const double value_) const |
Check enumerated real value. More... | |
bool | find_enumerated_real_value (const double value_, double &enum_value_) const |
Find the matching enumerated real value taking into account the precision if any. More... | |
void | add_enumerated_real_value (const double value_, const real_enum_value_metadata &metadata_, const bool default_=false) |
Add an enumerated real value with its metadata. More... | |
void | add_enumerated_real_value (const double value_, const bool default_=false) |
Add an enumerated real value. More... | |
bool | enumerated_real_value_has_group (const double value_) const |
Check if an enumerated real value has a group. More... | |
const std::string & | get_enumerated_real_value_group (const double value_) const |
Return the group associated to an enumerated real value. More... | |
const real_enum_value_metadata & | get_enumerated_real_value_metadata (const double value_) const |
Return the metadata associated to an enumerated real value. More... | |
real_enum_value_metadata & | grab_enumerated_real_value_metadata (const double value_) |
Return the metadata associated to an enumerated real value. More... | |
void | fetch_real_enumeration (std::vector< double > &values_) const |
Fetch the list of enumerated real values. More... | |
void | build_list_of_enumerated_real_groups (std::set< std::string > &groups_) const |
Build the list of groups associated to enumerated reals. More... | |
void | build_list_of_enumerated_real_values_in_group (const std::string &group_, std::set< double > &values_) const |
Build the list of enumerated real values associated to a given group. More... | |
void | build_list_of_enumerated_real_values (std::set< double > &values_) const |
Build the list of enumerated integer values. More... | |
bool | has_enumerated_string_value (const std::string &value_) const |
Check enumerated string value. More... | |
void | add_enumerated_string_value (const std::string &value_, const string_enum_value_metadata &metadata_, const bool default_=false) |
Add an enumerated string value with its metadata. More... | |
bool | enumerated_string_value_has_group (const std::string &value_) const |
Check if an enumerated string value has a group. More... | |
const std::string & | get_enumerated_string_value_group (const std::string &value_) const |
Return the group associated to an enumerated string value. More... | |
void | add_enumerated_string_value (const std::string &value_, const bool default_=false) |
Add an enumerated string value. More... | |
const string_enum_value_metadata & | get_enumerated_string_value_metadata (const std::string &value_) const |
Return the metadata associated to an enumerated string value. More... | |
string_enum_value_metadata & | grab_enumerated_string_value_metadata (const std::string &value_) |
Return the metadata associated to an enumerated string value. More... | |
void | build_list_of_enumerated_string_groups (std::set< std::string > &groups_) const |
Build the list of groups associated to enumerated strings. More... | |
void | build_list_of_enumerated_string_values_in_group (const std::string &group_, std::set< std::string > &values_) const |
Build the list of enumerated string values associated to a given group. More... | |
void | build_list_of_enumerated_string_values (std::set< std::string > &values_) const |
Build the list of enumerated string values. More... | |
bool | has_groups () const |
Check if groups are defines. More... | |
bool | has_group (const std::string &group_name_) const |
Check if a group exists. More... | |
void | add_group (const std::string &group_name_, const std::string &doc_="") |
Add a group. More... | |
void | build_set_of_groups (std::set< std::string > &group_) const |
Build the list of groups. More... | |
bool | has_variant (const std::string &variant_name_) const |
Check if a variant exists. More... | |
void | add_variant (const std::string &variant_name_, const vm_handle_type &variant_model_handle_, const std::string &description_="") |
Add a variant with its model and description string. More... | |
void | remove_variant (const std::string &variant_name_) |
Remove a variant. More... | |
const std::string & | get_variant_description (const std::string &variant_name_) const |
Return a description string associated to a given variant. More... | |
const variant_model & | get_variant_model (const std::string &variant_name_) const |
Return a const reference to a variant model associated to a given variant. More... | |
vm_handle_type | get_variant_model_handle (const std::string &variant_name_) const |
Return a variant model handle associated to a given variant. More... | |
void | associate_variant_to_boolean (const bool value_, const std::string &variant_name_) |
Associate a variant to an enumerated boolean value. More... | |
void | associate_variant_to_integer (const int value_, const std::string &variant_name_) |
Associate a variant to an enumerated integer value. More... | |
void | associate_variant_to_real (const double value_, const std::string &variant_name_) |
Associate a variant to an enumerated real value. More... | |
void | associate_variant_to_string (const std::string &value_, const std::string &variant_name_) |
Associate a variant to an enumerated string value. More... | |
bool | is_initialized () const |
Check initialization status. More... | |
void | initialize (const properties &setup_, model_item_dict_type &items_) |
Initialization from properties and a dictionary of configuration items. More... | |
void | initialize_standalone (const properties &) |
Initialization from properties only. More... | |
void | initialize_simple () |
Bare initialization. More... | |
void | reset () |
Reset. More... | |
virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
Smart print. More... | |
bool | is_boolean_valid (const bool) const |
Check if a boolean value is valid. More... | |
bool | is_integer_valid (const int) const |
Check if an integer value is valid. More... | |
bool | is_real_valid (const double) const |
Check if a real value is valid. More... | |
bool | is_string_valid (const std::string &) const |
Check if a string value is valid. More... | |
const variant_dict_type & | get_variants () const |
Return a reference to the list of variants. More... | |
bool | find_variants_associated_to_boolean (const bool value_, std::set< std::string > &variants_) const |
Find the set of variants associated to a given boolean value. More... | |
bool | find_variants_associated_to_integer (const int value_, std::set< std::string > &variants_) const |
Find the set of variants associated to a given integer value. More... | |
bool | find_variants_associated_to_real (const double value_, std::set< std::string > &variants_) const |
Find the name of the variant associated to a given real value. More... | |
bool | find_variants_associated_to_string (const std::string &value_, std::set< std::string > &variants_) const |
Find the name of the variant associated to a given string value. More... | |
void | associate_variant_to_integer_range (const integer_range &range_, const std::string &variant_name_) |
Associate a variant to an integer range. More... | |
void | associate_variant_to_real_range (const real_range &range_, const std::string &variant_name_) |
Associate a variant to an real range. More... | |
void | add_integer_range (const integer_range &, const integer_range_enum_metadata &) |
Add a integer range. More... | |
void | add_real_range (const real_range &, const real_range_enum_metadata &) |
Add a real range. More... | |
const integer_range_enum_dict_type & | get_integer_ranges () const |
Return the dictionary of integer ranges. More... | |
const real_range_enum_dict_type & | get_real_ranges () const |
Return the dictionary ofreal ranges. More... | |
void | print_rst (std::ostream &out_, const std::string &indent_="", const uint32_t flags_=0) const |
Print in ReST format. More... | |
Public Member Functions inherited from datatools::enriched_base | |
enriched_base () | |
Default constructor. More... | |
enriched_base (const std::string &name_, const std::string &display_name_="", const std::string &terse_description_="", logger::priority lp_=logger::PRIO_FATAL) | |
Constructor. More... | |
virtual | ~enriched_base () |
Destructor. More... | |
bool | has_name () const |
Check if the name is not empty. More... | |
void | set_name (const std::string &name_) |
Set the name. More... | |
enriched_base & | set_name_c (const std::string &name_) |
Set the name. More... | |
const std::string & | get_name () const |
Return the name. More... | |
void | reset_name () |
Reset the name. More... | |
bool | has_display_name () const |
Check if the display name is empty. More... | |
void | set_display_name (const std::string &display_name_) |
Set the display name. More... | |
enriched_base & | set_display_name_c (const std::string &display_name_) |
Set the display name. More... | |
const std::string & | get_display_name () const |
Return the display name. More... | |
bool | has_terse_description () const |
Check if the description is empty. More... | |
void | set_terse_description (const std::string &terse_description_) |
Set the description. More... | |
enriched_base & | set_terse_description_c (const std::string &terse_description_) |
Set the description. More... | |
const std::string & | get_terse_description () const |
Return the description. More... | |
bool | has_auxiliaries () const |
Check if the container of auxiliary properties is empty. More... | |
const datatools::properties & | get_auxiliaries () const |
Return a reference to the non mutable container of auxiliary properties. More... | |
datatools::properties & | grab_auxiliaries () |
Return a reference to the mutable container of auxiliary properties. More... | |
void | reset_auxiliaries () |
Remove all auxiliary properties. More... | |
bool | is_debug () const |
Check the debug status. More... | |
void | set_logging_priority (logger::priority lp_) |
Set the logging priority threshold. More... | |
enriched_base & | set_logging_priority_c (logger::priority lp_) |
Set the logging priority threshold. More... | |
void | set_logging (const std::string &label_) |
Set the logging priority threshold from a string. More... | |
logger::priority | get_logging_priority () const |
Return the logging priority threshold. More... | |
void | clear () |
Clear. More... | |
void | reset () |
Clear. More... | |
void | print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const override |
Smart print. More... | |
void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const override |
Smart print. More... | |
void | initialize (const datatools::properties &config_, bool clear_=false) |
Initialization from a container of properties. More... | |
void | export_to_config (datatools::properties &config_, uint32_t flags_=EXPORT_CONFIG_DEFAULT, const std::string &prefix_="") const |
Export to a container of properties. More... | |
Public Member Functions inherited from datatools::i_serializable | |
i_serializable () | |
Default constructor. More... | |
virtual | ~i_serializable () |
Destructor. More... | |
virtual const std::string & | get_serial_tag () const =0 |
Return the serialization string identifier of the class. More... | |
Public Member Functions inherited from datatools::i_tree_dumpable | |
i_tree_dumpable () | |
Constructor. More... | |
virtual | ~i_tree_dumpable () |
Destructor. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const |
Printing with jsonized options. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const |
Printing with jsonized options. More... | |
void | tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const |
void | tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const |
void | smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const |
Static Public Member Functions | |
static std::string | label_from_mutability (const mutability_type) |
Return the label associated to the mutability. More... | |
static mutability_type | mutability_from_label (const std::string &) |
Return the mutability associated to the mutability label. More... | |
static std::string | label_from_variable_mode (const variable_mode_type) |
Return the label associated to a variable mode. More... | |
static variable_mode_type | variable_mode_from_label (const std::string &) |
Return the variable mode associated to a label. More... | |
static const std::string & | aux_prefix () |
Return the prefix for auxialiary properties. More... | |
static std::string | label_from_path_io (const path_io_type) |
Return the label associated to a path I/O mode. More... | |
static path_io_type | path_io_from_label (const std::string &) |
Return the path I/O mode associated to a label. More... | |
static void | init_ocd (datatools::object_configuration_description &) |
OCD support. More... | |
Static Public Member Functions inherited from datatools::enriched_base | |
static bool | validate_name (const std::string &candidate_name_) |
Validate a name. More... | |
static logger::priority | default_logging_priority () |
Return the default logging priority threshold. More... | |
static void | init_ocd (datatools::object_configuration_description &) |
OCD support. More... | |
Static Public Member Functions inherited from datatools::i_tree_dumpable | |
static const boost::property_tree::ptree & | empty_options () |
static boost::property_tree::ptree | make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false) |
static std::ostream & | last_skip_tag (std::ostream &out_) |
static std::ostream & | skip_tag (std::ostream &out_) |
static std::ostream & | last_tag (std::ostream &out_) |
static std::ostream & | tag (std::ostream &out_) |
Protected Member Functions | |
void | _set_variable_mode (const variable_mode_type) |
Set the mode. More... | |
void | _set_default () |
Set default values. More... | |
void | _parse_string_enumeration_from_csv_file (const std::string &csv_filename_, const char csv_separator_=':', const char csv_subseparator_=';', const std::string &value_regex_="", const std::string &group_regex_="") |
Description/model of a configuration parameter.
typedef std::map<std::string, std::string> datatools::configuration::parameter_model::group_dict_type |
Dictionary of groups.
typedef std::map<int, integer_enum_value_metadata> datatools::configuration::parameter_model::integer_enum_dict_type |
typedef std::map<integer_range, integer_range_enum_metadata> datatools::configuration::parameter_model::integer_range_enum_dict_type |
typedef std::map<double, real_enum_value_metadata> datatools::configuration::parameter_model::real_enum_dict_type |
typedef std::map<real_range, real_range_enum_metadata> datatools::configuration::parameter_model::real_range_enum_dict_type |
typedef std::map<std::string, string_enum_value_metadata> datatools::configuration::parameter_model::string_enum_dict_type |
typedef std::map<std::string, variant_physical> datatools::configuration::parameter_model::variant_dict_type |
Dictionary of variant physicals.
Parameter variable mode.
datatools::configuration::parameter_model::parameter_model | ( | ) |
Constructor.
|
virtual |
Destructor.
|
protected |
Load a list of strings (in enumeration variable mode) from a file using a CSV format:
|
protected |
Set default values.
|
protected |
Set the mode.
void datatools::configuration::parameter_model::add_enumerated_integer_value | ( | const int | value_, |
const integer_enum_value_metadata & | metadata, | ||
const bool | default_ = false |
||
) |
Add an enumerated integer value.
void datatools::configuration::parameter_model::add_enumerated_integer_value | ( | const int | value_, |
const bool | default_ = false |
||
) |
Add an enumerated integer value with its metadata.
void datatools::configuration::parameter_model::add_enumerated_real_value | ( | const double | value_, |
const real_enum_value_metadata & | metadata_, | ||
const bool | default_ = false |
||
) |
Add an enumerated real value with its metadata.
void datatools::configuration::parameter_model::add_enumerated_real_value | ( | const double | value_, |
const bool | default_ = false |
||
) |
Add an enumerated real value.
void datatools::configuration::parameter_model::add_enumerated_string_value | ( | const std::string & | value_, |
const string_enum_value_metadata & | metadata_, | ||
const bool | default_ = false |
||
) |
Add an enumerated string value with its metadata.
void datatools::configuration::parameter_model::add_enumerated_string_value | ( | const std::string & | value_, |
const bool | default_ = false |
||
) |
Add an enumerated string value.
void datatools::configuration::parameter_model::add_group | ( | const std::string & | group_name_, |
const std::string & | doc_ = "" |
||
) |
Add a group.
void datatools::configuration::parameter_model::add_integer_range | ( | const integer_range & | , |
const integer_range_enum_metadata & | |||
) |
Add a integer range.
void datatools::configuration::parameter_model::add_real_range | ( | const real_range & | , |
const real_range_enum_metadata & | |||
) |
Add a real range.
void datatools::configuration::parameter_model::add_variant | ( | const std::string & | variant_name_, |
const vm_handle_type & | variant_model_handle_, | ||
const std::string & | description_ = "" |
||
) |
Add a variant with its model and description string.
void datatools::configuration::parameter_model::associate_variant_to_boolean | ( | const bool | value_, |
const std::string & | variant_name_ | ||
) |
Associate a variant to an enumerated boolean value.
void datatools::configuration::parameter_model::associate_variant_to_integer | ( | const int | value_, |
const std::string & | variant_name_ | ||
) |
Associate a variant to an enumerated integer value.
void datatools::configuration::parameter_model::associate_variant_to_integer_range | ( | const integer_range & | range_, |
const std::string & | variant_name_ | ||
) |
Associate a variant to an integer range.
void datatools::configuration::parameter_model::associate_variant_to_real | ( | const double | value_, |
const std::string & | variant_name_ | ||
) |
Associate a variant to an enumerated real value.
void datatools::configuration::parameter_model::associate_variant_to_real_range | ( | const real_range & | range_, |
const std::string & | variant_name_ | ||
) |
Associate a variant to an real range.
void datatools::configuration::parameter_model::associate_variant_to_string | ( | const std::string & | value_, |
const std::string & | variant_name_ | ||
) |
Associate a variant to an enumerated string value.
|
static |
Return the prefix for auxialiary properties.
void datatools::configuration::parameter_model::build_list_of_enumerated_boolean_groups | ( | std::set< std::string > & | groups_ | ) | const |
Build the list of groups associated to enumerated boolean value.
void datatools::configuration::parameter_model::build_list_of_enumerated_boolean_values | ( | std::set< bool > & | values_ | ) | const |
Build the list of enumerated boolean values.
void datatools::configuration::parameter_model::build_list_of_enumerated_boolean_values_in_group | ( | const std::string & | group_, |
std::set< bool > & | values_ | ||
) | const |
Build the list of enumerated boolean values associated to a given group.
void datatools::configuration::parameter_model::build_list_of_enumerated_integer_groups | ( | std::set< std::string > & | groups_ | ) | const |
Build the list of groups associated to enumerated integer value.
void datatools::configuration::parameter_model::build_list_of_enumerated_integer_values | ( | std::set< int > & | values_ | ) | const |
Build the list of enumerated integer values.
void datatools::configuration::parameter_model::build_list_of_enumerated_integer_values_in_group | ( | const std::string & | group_, |
std::set< int > & | values_ | ||
) | const |
Build the list of enumerated integer values associated to a given group.
void datatools::configuration::parameter_model::build_list_of_enumerated_real_groups | ( | std::set< std::string > & | groups_ | ) | const |
Build the list of groups associated to enumerated reals.
void datatools::configuration::parameter_model::build_list_of_enumerated_real_values | ( | std::set< double > & | values_ | ) | const |
Build the list of enumerated integer values.
void datatools::configuration::parameter_model::build_list_of_enumerated_real_values_in_group | ( | const std::string & | group_, |
std::set< double > & | values_ | ||
) | const |
Build the list of enumerated real values associated to a given group.
void datatools::configuration::parameter_model::build_list_of_enumerated_string_groups | ( | std::set< std::string > & | groups_ | ) | const |
Build the list of groups associated to enumerated strings.
void datatools::configuration::parameter_model::build_list_of_enumerated_string_values | ( | std::set< std::string > & | values_ | ) | const |
Build the list of enumerated string values.
void datatools::configuration::parameter_model::build_list_of_enumerated_string_values_in_group | ( | const std::string & | group_, |
std::set< std::string > & | values_ | ||
) | const |
Build the list of enumerated string values associated to a given group.
void datatools::configuration::parameter_model::build_set_of_groups | ( | std::set< std::string > & | group_ | ) | const |
Build the list of groups.
bool datatools::configuration::parameter_model::enumerated_boolean_value_has_group | ( | const bool | value_ | ) | const |
Check if an enumerated boolean value has a group.
bool datatools::configuration::parameter_model::enumerated_integer_value_has_group | ( | const int | value_ | ) | const |
Check if an enumerated integer value has a group.
bool datatools::configuration::parameter_model::enumerated_real_value_has_group | ( | const double | value_ | ) | const |
Check if an enumerated real value has a group.
bool datatools::configuration::parameter_model::enumerated_string_value_has_group | ( | const std::string & | value_ | ) | const |
Check if an enumerated string value has a group.
void datatools::configuration::parameter_model::fetch_integer_enumeration | ( | std::vector< int > & | values_ | ) | const |
Fetch the list of enumerated integer values.
bool datatools::configuration::parameter_model::fetch_real_display_unit | ( | std::string & | display_unit_symbol_, |
double & | unit_value_ | ||
) | const |
Fetch the display unit symbol.
void datatools::configuration::parameter_model::fetch_real_enumeration | ( | std::vector< double > & | values_ | ) | const |
Fetch the list of enumerated real values.
bool datatools::configuration::parameter_model::find_enumerated_real_value | ( | const double | value_, |
double & | enum_value_ | ||
) | const |
Find the matching enumerated real value taking into account the precision if any.
bool datatools::configuration::parameter_model::find_variants_associated_to_boolean | ( | const bool | value_, |
std::set< std::string > & | variants_ | ||
) | const |
Find the set of variants associated to a given boolean value.
bool datatools::configuration::parameter_model::find_variants_associated_to_integer | ( | const int | value_, |
std::set< std::string > & | variants_ | ||
) | const |
Find the set of variants associated to a given integer value.
bool datatools::configuration::parameter_model::find_variants_associated_to_real | ( | const double | value_, |
std::set< std::string > & | variants_ | ||
) | const |
Find the name of the variant associated to a given real value.
bool datatools::configuration::parameter_model::find_variants_associated_to_string | ( | const std::string & | value_, |
std::set< std::string > & | variants_ | ||
) | const |
Find the name of the variant associated to a given string value.
bool datatools::configuration::parameter_model::get_default_boolean | ( | ) | const |
Return the default boolean.
int datatools::configuration::parameter_model::get_default_integer | ( | ) | const |
Return the default integer.
double datatools::configuration::parameter_model::get_default_real | ( | ) | const |
Return the default real.
const std::string& datatools::configuration::parameter_model::get_default_string | ( | ) | const |
Return the default string.
const std::string& datatools::configuration::parameter_model::get_documentation | ( | ) | const |
Return the documentation.
const std::string& datatools::configuration::parameter_model::get_enumerated_boolean_value_group | ( | const bool | value_ | ) | const |
Return the group associated to an enumerated boolean value.
const boolean_enum_value_metadata& datatools::configuration::parameter_model::get_enumerated_boolean_value_metadata | ( | const bool | value_ | ) | const |
Return the metadata associated to a boolean value.
const std::string& datatools::configuration::parameter_model::get_enumerated_integer_value_group | ( | const int | value_ | ) | const |
Return the group associated to an enumerated integer value.
const integer_enum_value_metadata& datatools::configuration::parameter_model::get_enumerated_integer_value_metadata | ( | const int | value_ | ) | const |
Return the metadata associated to an enumerated integer value.
const std::string& datatools::configuration::parameter_model::get_enumerated_real_value_group | ( | const double | value_ | ) | const |
Return the group associated to an enumerated real value.
const real_enum_value_metadata& datatools::configuration::parameter_model::get_enumerated_real_value_metadata | ( | const double | value_ | ) | const |
Return the metadata associated to an enumerated real value.
const std::string& datatools::configuration::parameter_model::get_enumerated_string_value_group | ( | const std::string & | value_ | ) | const |
Return the group associated to an enumerated string value.
const string_enum_value_metadata& datatools::configuration::parameter_model::get_enumerated_string_value_metadata | ( | const std::string & | value_ | ) | const |
Return the metadata associated to an enumerated string value.
bool datatools::configuration::parameter_model::get_fixed_boolean | ( | ) | const |
Return the fixed boolean.
int datatools::configuration::parameter_model::get_fixed_integer | ( | ) | const |
Return the fixed integer.
double datatools::configuration::parameter_model::get_fixed_real | ( | ) | const |
Return the fixed real.
const std::string& datatools::configuration::parameter_model::get_fixed_string | ( | ) | const |
Return the fixed string.
const integer_range& datatools::configuration::parameter_model::get_integer_domain | ( | ) | const |
Return the integer domain.
const integer_range_enum_dict_type& datatools::configuration::parameter_model::get_integer_ranges | ( | ) | const |
Return the dictionary of integer ranges.
mutability_type datatools::configuration::parameter_model::get_mutability | ( | ) | const |
Get mutability.
const real_range& datatools::configuration::parameter_model::get_real_domain | ( | ) | const |
Return the real domain.
double datatools::configuration::parameter_model::get_real_effective_precision | ( | ) | const |
Return the real effective precision.
double datatools::configuration::parameter_model::get_real_precision | ( | ) | const |
Return the real precision.
const std::string& datatools::configuration::parameter_model::get_real_preferred_unit | ( | ) | const |
Return the unit symbol.
const real_range_enum_dict_type& datatools::configuration::parameter_model::get_real_ranges | ( | ) | const |
Return the dictionary ofreal ranges.
const std::string& datatools::configuration::parameter_model::get_real_unit_label | ( | ) | const |
Return the unit label.
basic_type datatools::configuration::parameter_model::get_type | ( | ) | const |
Return the type of the parameter.
variable_mode_type datatools::configuration::parameter_model::get_variable_mode | ( | ) | const |
Return the mode of the parameter.
const std::string& datatools::configuration::parameter_model::get_variant_description | ( | const std::string & | variant_name_ | ) | const |
Return a description string associated to a given variant.
const variant_model& datatools::configuration::parameter_model::get_variant_model | ( | const std::string & | variant_name_ | ) | const |
Return a const reference to a variant model associated to a given variant.
vm_handle_type datatools::configuration::parameter_model::get_variant_model_handle | ( | const std::string & | variant_name_ | ) | const |
Return a variant model handle associated to a given variant.
const variant_dict_type& datatools::configuration::parameter_model::get_variants | ( | ) | const |
Return a reference to the list of variants.
boolean_enum_value_metadata& datatools::configuration::parameter_model::grab_enumerated_boolean_value_metadata | ( | const bool | value_ | ) |
Return the metadata associated to a boolean value.
integer_enum_value_metadata& datatools::configuration::parameter_model::grab_enumerated_integer_value_metadata | ( | const int | value_ | ) |
Return the metadata associated to an enumerated integer value.
real_enum_value_metadata& datatools::configuration::parameter_model::grab_enumerated_real_value_metadata | ( | const double | value_ | ) |
Return the metadata associated to an enumerated real value.
string_enum_value_metadata& datatools::configuration::parameter_model::grab_enumerated_string_value_metadata | ( | const std::string & | value_ | ) |
Return the metadata associated to an enumerated string value.
bool datatools::configuration::parameter_model::has_default_value | ( | ) | const |
Check default value.
bool datatools::configuration::parameter_model::has_documentation | ( | ) | const |
Check if the documentation is empty.
bool datatools::configuration::parameter_model::has_enumerated_integer_value | ( | const int | value_ | ) | const |
Check enumerated integer value.
bool datatools::configuration::parameter_model::has_enumerated_real_value | ( | const double | value_ | ) | const |
Check enumerated real value.
bool datatools::configuration::parameter_model::has_enumerated_string_value | ( | const std::string & | value_ | ) | const |
Check enumerated string value.
bool datatools::configuration::parameter_model::has_fixed_value | ( | ) | const |
Check fixed value.
bool datatools::configuration::parameter_model::has_group | ( | const std::string & | group_name_ | ) | const |
Check if a group exists.
bool datatools::configuration::parameter_model::has_groups | ( | ) | const |
Check if groups are defines.
bool datatools::configuration::parameter_model::has_integer_domain | ( | ) | const |
Check the integer domain.
bool datatools::configuration::parameter_model::has_mutability | ( | ) | const |
Check mutability.
bool datatools::configuration::parameter_model::has_path_io | ( | ) | const |
Check if path I/O mode is defined.
bool datatools::configuration::parameter_model::has_real_domain | ( | ) | const |
Check the real domain.
bool datatools::configuration::parameter_model::has_real_precision | ( | ) | const |
Check the real precision.
bool datatools::configuration::parameter_model::has_real_preferred_unit | ( | ) | const |
Check the real unit symbol.
bool datatools::configuration::parameter_model::has_real_unit_label | ( | ) | const |
Check the real unit label.
bool datatools::configuration::parameter_model::has_type | ( | ) | const |
Check if type is defined.
bool datatools::configuration::parameter_model::has_variable_mode | ( | ) | const |
Check if variable mode is defined.
bool datatools::configuration::parameter_model::has_variant | ( | const std::string & | variant_name_ | ) | const |
Check if a variant exists.
|
static |
OCD support.
void datatools::configuration::parameter_model::initialize | ( | const properties & | setup_, |
model_item_dict_type & | items_ | ||
) |
Initialization from properties and a dictionary of configuration items.
void datatools::configuration::parameter_model::initialize_simple | ( | ) |
Bare initialization.
void datatools::configuration::parameter_model::initialize_standalone | ( | const properties & | ) |
Initialization from properties only.
bool datatools::configuration::parameter_model::is_boolean | ( | ) | const |
Check boolean type.
bool datatools::configuration::parameter_model::is_boolean_valid | ( | const bool | ) | const |
Check if a boolean value is valid.
bool datatools::configuration::parameter_model::is_enumeration | ( | ) | const |
Check enumeration mode.
bool datatools::configuration::parameter_model::is_fixed | ( | ) | const |
Check fixed trait.
bool datatools::configuration::parameter_model::is_free | ( | ) | const |
Check free mode.
bool datatools::configuration::parameter_model::is_initialized | ( | ) | const |
Check initialization status.
bool datatools::configuration::parameter_model::is_integer | ( | ) | const |
Check integer type.
bool datatools::configuration::parameter_model::is_integer_valid | ( | const int | ) | const |
Check if an integer value is valid.
bool datatools::configuration::parameter_model::is_interval | ( | ) | const |
Check interval mode.
|
virtual |
Check if a name is valid.
Reimplemented from datatools::enriched_base.
bool datatools::configuration::parameter_model::is_path | ( | ) | const |
Check path string.
bool datatools::configuration::parameter_model::is_path_input | ( | ) | const |
Check path input flag.
bool datatools::configuration::parameter_model::is_path_input_output | ( | ) | const |
Check path output flag.
bool datatools::configuration::parameter_model::is_path_output | ( | ) | const |
Check path output flag.
bool datatools::configuration::parameter_model::is_real | ( | ) | const |
Check real type.
bool datatools::configuration::parameter_model::is_real_valid | ( | const double | ) | const |
Check if a real value is valid.
bool datatools::configuration::parameter_model::is_string | ( | ) | const |
Check string type.
bool datatools::configuration::parameter_model::is_string_valid | ( | const std::string & | ) | const |
Check if a string value is valid.
bool datatools::configuration::parameter_model::is_variable | ( | ) | const |
Check mutability trait.
|
static |
Return the label associated to the mutability.
|
static |
Return the label associated to a path I/O mode.
|
static |
Return the label associated to a variable mode.
|
static |
Return the mutability associated to the mutability label.
|
static |
Return the path I/O mode associated to a label.
void datatools::configuration::parameter_model::print_rst | ( | std::ostream & | out_, |
const std::string & | indent_ = "" , |
||
const uint32_t | flags_ = 0 |
||
) | const |
Print in ReST format.
void datatools::configuration::parameter_model::remove_variant | ( | const std::string & | variant_name_ | ) |
Remove a variant.
void datatools::configuration::parameter_model::reset | ( | ) |
Reset.
void datatools::configuration::parameter_model::reset_default_value | ( | ) |
Reset the default value.
void datatools::configuration::parameter_model::reset_path | ( | ) |
Reset the path flag.
void datatools::configuration::parameter_model::reset_real_precision | ( | ) |
Reset the real precision.
void datatools::configuration::parameter_model::set | ( | const basic_type | type_, |
const variable_mode_type | variable_mode_ | ||
) |
Set the type and variable mode of the parameter.
void datatools::configuration::parameter_model::set_default_boolean | ( | const bool | value_ | ) |
Set default boolean value.
void datatools::configuration::parameter_model::set_default_integer | ( | const int | value_ | ) |
Set default integer value.
void datatools::configuration::parameter_model::set_default_real | ( | const double | value_ | ) |
Set default real value.
void datatools::configuration::parameter_model::set_default_string | ( | const std::string & | value_ | ) |
Set default string value.
void datatools::configuration::parameter_model::set_documentation | ( | const std::string & | documentation_ | ) |
Set the documentation.
void datatools::configuration::parameter_model::set_enumerated_boolean_value_metadata | ( | const bool | value_, |
const boolean_enum_value_metadata & | metadata_ | ||
) |
Set the metadata associated to a boolean value.
void datatools::configuration::parameter_model::set_fixed_boolean | ( | const bool | value_ | ) |
Set fixed boolean value.
void datatools::configuration::parameter_model::set_fixed_integer | ( | const int | value_ | ) |
Set fixed integer value.
void datatools::configuration::parameter_model::set_fixed_real | ( | const double | value_ | ) |
Set fixed real value.
void datatools::configuration::parameter_model::set_fixed_string | ( | const std::string & | value_ | ) |
Set fixed string value.
void datatools::configuration::parameter_model::set_integer_domain | ( | const integer_range & | ir_ | ) |
Set integer interval.
void datatools::configuration::parameter_model::set_mutability | ( | const mutability_type | mutability_ | ) |
Set the mutability trait.
void datatools::configuration::parameter_model::set_path | ( | const bool | is_path_ | ) |
Set the path flag.
void datatools::configuration::parameter_model::set_path_io | ( | const path_io_type | path_io_ | ) |
Set the path I/O.
void datatools::configuration::parameter_model::set_real_domain | ( | const real_range & | ir_ | ) |
void datatools::configuration::parameter_model::set_real_precision | ( | const double | prec_ | ) |
Set the real precision.
void datatools::configuration::parameter_model::set_real_preferred_unit | ( | const std::string & | value_ | ) |
Set the unit symbol.
void datatools::configuration::parameter_model::set_real_unit_label | ( | const std::string & | unit_label_ | ) |
Set the unit label.
void datatools::configuration::parameter_model::set_type | ( | const basic_type | type_ | ) |
Set the type of the parameter.
void datatools::configuration::parameter_model::set_variable_mode | ( | const variable_mode_type | variable_mode_ | ) |
Set the mode of the parameter.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
|
static |
Return the variable mode associated to a label.