![]() |
Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Base enumerated item metadata. More...
#include <bayeux/datatools/configuration/parameter_model.h>
Public Types | |
| enum | ctor_flags { CTOR_NO_GROUP_SUPPORT = datatools::bit_mask::bit00 } |
| Constructor flags. More... | |
| enum | rst_flags { PRINT_RST_NO_DOC = datatools::bit_mask::bit00 } |
| Restructured text formatting. More... | |
Public Types inherited from datatools::i_tree_dumpable | |
| enum | ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 } |
| Enumeration for standard output streams. More... | |
Public Member Functions | |
| base_enum_metadata (uint32_t flags_=0) | |
| Constructor. More... | |
| bool | has_documentation () const |
| Check if documentation is set. More... | |
| void | set_documentation (const std::string &) |
| Set documentation. More... | |
| const std::string & | get_documentation () const |
| Return documentation. More... | |
| bool | has_variants () const |
| Check is some variants are set. More... | |
| bool | has_variant (const std::string &variant_name_) const |
| Check is a variant is set, given its name. More... | |
| void | add_variant (const std::string &variant_name_) |
| Add a variant, given its name. More... | |
| void | remove_variant (const std::string &variant_name_) |
| Remove a variant, given its name. More... | |
| void | remove_variants () |
| Remove all variants. More... | |
| const std::set< std::string > & | get_variants () const |
| Return the set of variants. More... | |
| bool | has_group () const |
| Check if group is set. More... | |
| void | set_group (const std::string &group_name_) |
| Set group. More... | |
| const std::string & | get_group () const |
| Return the group. More... | |
| bool | match_group (const std::string &group_name_) const |
| Check if a group name matches the group set. More... | |
| void | initialize (const datatools::properties &config_, parameter_model &parmod_) |
| 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... | |
| void | print_rst (std::ostream &out_, const std::string &indent_="", const uint32_t flags_=0) const |
| Print in RestructuredText format. More... | |
| bool | has_group_support () const |
| Check if group support is set. More... | |
Public Member Functions inherited from datatools::i_tree_dumpable | |
| i_tree_dumpable () | |
| Constructor. More... | |
| virtual | ~i_tree_dumpable () |
| Destructor. More... | |
| virtual void | print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const |
| Main new interface method for printing. 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 |
Protected Attributes | |
| std::string | _documentation |
| Terse documentation string associated to the enumerated item. More... | |
| std::set< std::string > | _variants |
| Set of variants associated to /triggered by the value. More... | |
| std::string | _group |
| Group the value belongs to. More... | |
Additional Inherited Members | |
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_) |
Base enumerated item metadata.
This contains some metadata associated to an enumeration item. The item itself can be a single value or a set of values (i.e. interval).
| datatools::configuration::parameter_model::base_enum_metadata::base_enum_metadata | ( | uint32_t | flags_ = 0 | ) |
Constructor.
| void datatools::configuration::parameter_model::base_enum_metadata::add_variant | ( | const std::string & | variant_name_ | ) |
Add a variant, given its name.
| const std::string& datatools::configuration::parameter_model::base_enum_metadata::get_documentation | ( | ) | const |
Return documentation.
| const std::string& datatools::configuration::parameter_model::base_enum_metadata::get_group | ( | ) | const |
Return the group.
| const std::set<std::string>& datatools::configuration::parameter_model::base_enum_metadata::get_variants | ( | ) | const |
Return the set of variants.
| bool datatools::configuration::parameter_model::base_enum_metadata::has_documentation | ( | ) | const |
Check if documentation is set.
| bool datatools::configuration::parameter_model::base_enum_metadata::has_group | ( | ) | const |
Check if group is set.
| bool datatools::configuration::parameter_model::base_enum_metadata::has_group_support | ( | ) | const |
Check if group support is set.
| bool datatools::configuration::parameter_model::base_enum_metadata::has_variant | ( | const std::string & | variant_name_ | ) | const |
Check is a variant is set, given its name.
| bool datatools::configuration::parameter_model::base_enum_metadata::has_variants | ( | ) | const |
Check is some variants are set.
| void datatools::configuration::parameter_model::base_enum_metadata::initialize | ( | const datatools::properties & | config_, |
| parameter_model & | parmod_ | ||
| ) |
Initialization.
| bool datatools::configuration::parameter_model::base_enum_metadata::match_group | ( | const std::string & | group_name_ | ) | const |
Check if a group name matches the group set.
| void datatools::configuration::parameter_model::base_enum_metadata::print_rst | ( | std::ostream & | out_, |
| const std::string & | indent_ = "", |
||
| const uint32_t | flags_ = 0 |
||
| ) | const |
Print in RestructuredText format.
| void datatools::configuration::parameter_model::base_enum_metadata::remove_variant | ( | const std::string & | variant_name_ | ) |
Remove a variant, given its name.
| void datatools::configuration::parameter_model::base_enum_metadata::remove_variants | ( | ) |
Remove all variants.
| void datatools::configuration::parameter_model::base_enum_metadata::reset | ( | ) |
Reset.
| void datatools::configuration::parameter_model::base_enum_metadata::set_documentation | ( | const std::string & | ) |
Set documentation.
| void datatools::configuration::parameter_model::base_enum_metadata::set_group | ( | const std::string & | group_name_ | ) |
Set group.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
|
protected |
Terse documentation string associated to the enumerated item.
|
protected |
Group the value belongs to.
|
protected |
Set of variants associated to /triggered by the value.
1.8.15