Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Types | Public Member Functions | Protected Attributes | List of all members
datatools::configuration::parameter_model::base_enum_metadata Struct Reference

Base enumerated item metadata. More...

#include <bayeux/datatools/configuration/parameter_model.h>

Inheritance diagram for datatools::configuration::parameter_model::base_enum_metadata:
datatools::i_tree_dumpable datatools::configuration::parameter_model::boolean_enum_value_metadata datatools::configuration::parameter_model::integer_enum_value_metadata datatools::configuration::parameter_model::integer_range_enum_metadata datatools::configuration::parameter_model::real_enum_value_metadata datatools::configuration::parameter_model::real_range_enum_metadata datatools::configuration::parameter_model::string_enum_value_metadata

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_)
 

Detailed Description

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).

Member Enumeration Documentation

◆ ctor_flags

Constructor flags.

Enumerator
CTOR_NO_GROUP_SUPPORT 

No group support bit.

◆ rst_flags

Restructured text formatting.

Enumerator
PRINT_RST_NO_DOC 

Constructor & Destructor Documentation

◆ base_enum_metadata()

datatools::configuration::parameter_model::base_enum_metadata::base_enum_metadata ( uint32_t  flags_ = 0)

Constructor.

Member Function Documentation

◆ add_variant()

void datatools::configuration::parameter_model::base_enum_metadata::add_variant ( const std::string &  variant_name_)

Add a variant, given its name.

◆ get_documentation()

const std::string& datatools::configuration::parameter_model::base_enum_metadata::get_documentation ( ) const

Return documentation.

◆ get_group()

const std::string& datatools::configuration::parameter_model::base_enum_metadata::get_group ( ) const

Return the group.

◆ get_variants()

const std::set<std::string>& datatools::configuration::parameter_model::base_enum_metadata::get_variants ( ) const

Return the set of variants.

◆ has_documentation()

bool datatools::configuration::parameter_model::base_enum_metadata::has_documentation ( ) const

Check if documentation is set.

◆ has_group()

bool datatools::configuration::parameter_model::base_enum_metadata::has_group ( ) const

Check if group is set.

◆ has_group_support()

bool datatools::configuration::parameter_model::base_enum_metadata::has_group_support ( ) const

Check if group support is set.

◆ has_variant()

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.

◆ has_variants()

bool datatools::configuration::parameter_model::base_enum_metadata::has_variants ( ) const

Check is some variants are set.

◆ initialize()

void datatools::configuration::parameter_model::base_enum_metadata::initialize ( const datatools::properties config_,
parameter_model parmod_ 
)

Initialization.

◆ match_group()

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.

◆ print_rst()

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.

◆ remove_variant()

void datatools::configuration::parameter_model::base_enum_metadata::remove_variant ( const std::string &  variant_name_)

Remove a variant, given its name.

◆ remove_variants()

void datatools::configuration::parameter_model::base_enum_metadata::remove_variants ( )

Remove all variants.

◆ reset()

void datatools::configuration::parameter_model::base_enum_metadata::reset ( )

Reset.

◆ set_documentation()

void datatools::configuration::parameter_model::base_enum_metadata::set_documentation ( const std::string &  )

Set documentation.

◆ set_group()

void datatools::configuration::parameter_model::base_enum_metadata::set_group ( const std::string &  group_name_)

Set group.

◆ tree_dump()

virtual void datatools::configuration::parameter_model::base_enum_metadata::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from datatools::i_tree_dumpable.

Member Data Documentation

◆ _documentation

std::string datatools::configuration::parameter_model::base_enum_metadata::_documentation
protected

Terse documentation string associated to the enumerated item.

◆ _group

std::string datatools::configuration::parameter_model::base_enum_metadata::_group
protected

Group the value belongs to.

◆ _variants

std::set<std::string> datatools::configuration::parameter_model::base_enum_metadata::_variants
protected

Set of variants associated to /triggered by the value.


The documentation for this struct was generated from the following file: