Bayeux  3.4.1
Core Foundation library for SuperNEMO
Classes | Public Types | Public Member Functions | List of all members
datatools::configuration::variant_record Class Reference

Variant registry record node. More...

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

Classes

class  daughter_type
 

Public Types

typedef std::map< std::string, daughter_typedaughter_dict_type
 Array of pointers to daughter records. More...
 

Public Member Functions

 variant_record ()
 Default constructor. More...
 
virtual ~variant_record ()
 Destructor. More...
 
datatools::logger::priority get_logging () const
 Return the logging priority threshold. More...
 
void set_logging (const datatools::logger::priority)
 Set the logging priority threshold. More...
 
bool is_valid () const
 Check if the record is valid. More...
 
bool has_path () const
 Check if the path is defined. More...
 
void set_path (const std::string &)
 Set the path. More...
 
const std::string & get_path () const
 Return the path. More...
 
void set_base_name (const std::string &)
 Set the base name. More...
 
const std::string & get_base_name () const
 Return the base name. More...
 
void set_indexes (const std::vector< uint32_t > &)
 Set the vector of indexes. More...
 
const std::vector< uint32_t > & get_indexes () const
 Return the vector of indexes. More...
 
std::size_t get_occurrence_dimension () const
 Return the dimension of the occurence. More...
 
void set_with_update (bool)
 Set with update. More...
 
bool has_with_update () const
 Check if the with update flag is set. More...
 
std::string get_leaf_name () const
 Return the leaf name. More...
 
std::string get_parent_name () const
 Return the parent name. More...
 
bool has_parent_registry () const
 Check if the parent registry handle is set. More...
 
void set_parent_registry (const variant_registry &rep_)
 Set the parent registry handle. More...
 
const variant_registryget_parent_registry () const
 Return the parent registry handle. More...
 
bool has_parent_repository () const
 Check if the parent repository. More...
 
const variant_repositoryget_parent_repository () const
 Return the parent repository. More...
 
bool is_top_variant () const
 Check if the record is a top variant. More...
 
bool has_parent () const
 Check if the record has a parent. More...
 
void set_parent (variant_record &parent_, const std::string &daughter_name_, int rank_=-1)
 Set the parent record and register itself as a daughter of the parent record. More...
 
const variant_recordget_parent () const
 Return the parent. More...
 
variant_recordgrab_parent ()
 Return the parent. More...
 
bool has_daughters () const
 Check if the variant record has daughter records. More...
 
daughter_dict_typegrab_daughters ()
 Return the dictionary of daughter records. More...
 
const daughter_dict_typeget_daughters () const
 Return the dictionary of daughter records. More...
 
const variant_recordget_daughter (const std::string &) const
 Return a daughter record given its name. More...
 
variant_recordgrab_daughter (const std::string &)
 Return a daughter record given its name. More...
 
bool has_parameter_model () const
 Check if the record is associated to a parameter model. More...
 
void set_parameter_model (const parameter_model &)
 Set the parameter model associated to the record. More...
 
const parameter_modelget_parameter_model () const
 Return the parameter model associated to the record. More...
 
bool has_variant_model () const
 Check if the record is associated to a variant model. More...
 
void set_variant_model (const variant_model &)
 Set the variant model associated to the record. More...
 
const variant_modelget_variant_model () const
 Return the variant model associated to the record. More...
 
bool is_variant () const
 Check if record is a variant. More...
 
bool is_parameter () const
 Check if record is a parameter. More...
 
bool is_fixed_parameter () const
 Check if record is fixed (parameter) More...
 
void set_active (bool active_)
 Set the active flag. More...
 
bool is_active () const
 Check if record is active (parameter or variant) More...
 
bool value_is_set () const
 Check if a parameter value is set. More...
 
bool default_value_is_set () const
 Check if a parameter value is set to default. More...
 
bool check_enabled_parameter () const
 Check if a parameter is enabled. More...
 
bool check_enabled_value (const parameter_value_type &value_) const
 Check if a value is enabled. More...
 
bool check_enabled_group (const std::string &group_name_) const
 Check is a group is enabled. More...
 
command::returned_info set_default_value ()
 Set default value. More...
 
command::returned_info set_fixed_value ()
 Set fixed value. More...
 
bool is_boolean_valid (const bool) const
 Validate boolean value. More...
 
command::returned_info set_boolean_value (bool)
 Set boolean value. More...
 
bool is_integer_valid (const int) const
 Validate integer value. More...
 
command::returned_info set_integer_value (int)
 Set integer value. More...
 
bool is_real_valid (const double) const
 Validate real value. More...
 
command::returned_info set_real_value (double)
 Set real value. More...
 
bool is_string_valid (const std::string &) const
 Validate string value. More...
 
command::returned_info set_string_value (const std::string &)
 Set string value. More...
 
command::returned_info unset_value ()
 Unset a parameter value. More...
 
command::returned_info value_is_set (bool &) const
 Check set value. More...
 
command::returned_info get_boolean_value (bool &) const
 Get boolean value. More...
 
command::returned_info get_integer_value (int &) const
 Get integer value. More...
 
command::returned_info get_real_value (double &) const
 Get real value. More...
 
command::returned_info get_string_value (std::string &) const
 Get string value. More...
 
command::returned_info value_to_string (std::string &format_) const
 Build a formatted string from the value. More...
 
command::returned_info string_to_value (const std::string &format_)
 Set the value from a formatted string. More...
 
void build ()
 Build and finalize the internals of the record. More...
 
void build_list_of_ranked_parameter_records (std::vector< std::string > &ranked_) const
 
void reset ()
 Reset the record. 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 update ()
 Update. More...
 
void forced_update ()
 Force update. More...
 

Detailed Description

Variant registry record node.

Member Typedef Documentation

◆ daughter_dict_type

Array of pointers to daughter records.

Constructor & Destructor Documentation

◆ variant_record()

datatools::configuration::variant_record::variant_record ( )

Default constructor.

◆ ~variant_record()

virtual datatools::configuration::variant_record::~variant_record ( )
virtual

Destructor.

Member Function Documentation

◆ build()

void datatools::configuration::variant_record::build ( )

Build and finalize the internals of the record.

◆ build_list_of_ranked_parameter_records()

void datatools::configuration::variant_record::build_list_of_ranked_parameter_records ( std::vector< std::string > &  ranked_) const

Build the list of effectively ranked parameters The explicitely ranked params are listed first, then come unranked params in arbitrary order

◆ check_enabled_group()

bool datatools::configuration::variant_record::check_enabled_group ( const std::string &  group_name_) const

Check is a group is enabled.

◆ check_enabled_parameter()

bool datatools::configuration::variant_record::check_enabled_parameter ( ) const

Check if a parameter is enabled.

◆ check_enabled_value()

bool datatools::configuration::variant_record::check_enabled_value ( const parameter_value_type value_) const

Check if a value is enabled.

◆ default_value_is_set()

bool datatools::configuration::variant_record::default_value_is_set ( ) const

Check if a parameter value is set to default.

◆ forced_update()

void datatools::configuration::variant_record::forced_update ( )

Force update.

◆ get_base_name()

const std::string& datatools::configuration::variant_record::get_base_name ( ) const

Return the base name.

◆ get_boolean_value()

command::returned_info datatools::configuration::variant_record::get_boolean_value ( bool &  ) const

Get boolean value.

◆ get_daughter()

const variant_record& datatools::configuration::variant_record::get_daughter ( const std::string &  ) const

Return a daughter record given its name.

◆ get_daughters()

const daughter_dict_type& datatools::configuration::variant_record::get_daughters ( ) const

Return the dictionary of daughter records.

◆ get_indexes()

const std::vector<uint32_t>& datatools::configuration::variant_record::get_indexes ( ) const

Return the vector of indexes.

◆ get_integer_value()

command::returned_info datatools::configuration::variant_record::get_integer_value ( int &  ) const

Get integer value.

◆ get_leaf_name()

std::string datatools::configuration::variant_record::get_leaf_name ( ) const

Return the leaf name.

◆ get_logging()

datatools::logger::priority datatools::configuration::variant_record::get_logging ( ) const

Return the logging priority threshold.

◆ get_occurrence_dimension()

std::size_t datatools::configuration::variant_record::get_occurrence_dimension ( ) const

Return the dimension of the occurence.

◆ get_parameter_model()

const parameter_model& datatools::configuration::variant_record::get_parameter_model ( ) const

Return the parameter model associated to the record.

◆ get_parent()

const variant_record& datatools::configuration::variant_record::get_parent ( ) const

Return the parent.

◆ get_parent_name()

std::string datatools::configuration::variant_record::get_parent_name ( ) const

Return the parent name.

◆ get_parent_registry()

const variant_registry& datatools::configuration::variant_record::get_parent_registry ( ) const

Return the parent registry handle.

◆ get_parent_repository()

const variant_repository& datatools::configuration::variant_record::get_parent_repository ( ) const

Return the parent repository.

◆ get_path()

const std::string& datatools::configuration::variant_record::get_path ( ) const

Return the path.

◆ get_real_value()

command::returned_info datatools::configuration::variant_record::get_real_value ( double &  ) const

Get real value.

◆ get_string_value()

command::returned_info datatools::configuration::variant_record::get_string_value ( std::string &  ) const

Get string value.

◆ get_variant_model()

const variant_model& datatools::configuration::variant_record::get_variant_model ( ) const

Return the variant model associated to the record.

◆ grab_daughter()

variant_record& datatools::configuration::variant_record::grab_daughter ( const std::string &  )

Return a daughter record given its name.

◆ grab_daughters()

daughter_dict_type& datatools::configuration::variant_record::grab_daughters ( )

Return the dictionary of daughter records.

◆ grab_parent()

variant_record& datatools::configuration::variant_record::grab_parent ( )

Return the parent.

◆ has_daughters()

bool datatools::configuration::variant_record::has_daughters ( ) const

Check if the variant record has daughter records.

◆ has_parameter_model()

bool datatools::configuration::variant_record::has_parameter_model ( ) const

Check if the record is associated to a parameter model.

◆ has_parent()

bool datatools::configuration::variant_record::has_parent ( ) const

Check if the record has a parent.

◆ has_parent_registry()

bool datatools::configuration::variant_record::has_parent_registry ( ) const

Check if the parent registry handle is set.

◆ has_parent_repository()

bool datatools::configuration::variant_record::has_parent_repository ( ) const

Check if the parent repository.

◆ has_path()

bool datatools::configuration::variant_record::has_path ( ) const

Check if the path is defined.

◆ has_variant_model()

bool datatools::configuration::variant_record::has_variant_model ( ) const

Check if the record is associated to a variant model.

◆ has_with_update()

bool datatools::configuration::variant_record::has_with_update ( ) const

Check if the with update flag is set.

◆ is_active()

bool datatools::configuration::variant_record::is_active ( ) const

Check if record is active (parameter or variant)

◆ is_boolean_valid()

bool datatools::configuration::variant_record::is_boolean_valid ( const bool  ) const

Validate boolean value.

◆ is_fixed_parameter()

bool datatools::configuration::variant_record::is_fixed_parameter ( ) const

Check if record is fixed (parameter)

◆ is_integer_valid()

bool datatools::configuration::variant_record::is_integer_valid ( const int  ) const

Validate integer value.

◆ is_parameter()

bool datatools::configuration::variant_record::is_parameter ( ) const

Check if record is a parameter.

◆ is_real_valid()

bool datatools::configuration::variant_record::is_real_valid ( const double  ) const

Validate real value.

◆ is_string_valid()

bool datatools::configuration::variant_record::is_string_valid ( const std::string &  ) const

Validate string value.

◆ is_top_variant()

bool datatools::configuration::variant_record::is_top_variant ( ) const

Check if the record is a top variant.

◆ is_valid()

bool datatools::configuration::variant_record::is_valid ( ) const

Check if the record is valid.

◆ is_variant()

bool datatools::configuration::variant_record::is_variant ( ) const

Check if record is a variant.

◆ reset()

void datatools::configuration::variant_record::reset ( )

Reset the record.

◆ set_active()

void datatools::configuration::variant_record::set_active ( bool  active_)

Set the active flag.

◆ set_base_name()

void datatools::configuration::variant_record::set_base_name ( const std::string &  )

Set the base name.

◆ set_boolean_value()

command::returned_info datatools::configuration::variant_record::set_boolean_value ( bool  )

Set boolean value.

◆ set_default_value()

command::returned_info datatools::configuration::variant_record::set_default_value ( )

Set default value.

◆ set_fixed_value()

command::returned_info datatools::configuration::variant_record::set_fixed_value ( )

Set fixed value.

◆ set_indexes()

void datatools::configuration::variant_record::set_indexes ( const std::vector< uint32_t > &  )

Set the vector of indexes.

◆ set_integer_value()

command::returned_info datatools::configuration::variant_record::set_integer_value ( int  )

Set integer value.

◆ set_logging()

void datatools::configuration::variant_record::set_logging ( const datatools::logger::priority  )

Set the logging priority threshold.

◆ set_parameter_model()

void datatools::configuration::variant_record::set_parameter_model ( const parameter_model )

Set the parameter model associated to the record.

◆ set_parent()

void datatools::configuration::variant_record::set_parent ( variant_record parent_,
const std::string &  daughter_name_,
int  rank_ = -1 
)

Set the parent record and register itself as a daughter of the parent record.

◆ set_parent_registry()

void datatools::configuration::variant_record::set_parent_registry ( const variant_registry rep_)

Set the parent registry handle.

◆ set_path()

void datatools::configuration::variant_record::set_path ( const std::string &  )

Set the path.

◆ set_real_value()

command::returned_info datatools::configuration::variant_record::set_real_value ( double  )

Set real value.

◆ set_string_value()

command::returned_info datatools::configuration::variant_record::set_string_value ( const std::string &  )

Set string value.

◆ set_variant_model()

void datatools::configuration::variant_record::set_variant_model ( const variant_model )

Set the variant model associated to the record.

◆ set_with_update()

void datatools::configuration::variant_record::set_with_update ( bool  )

Set with update.

◆ string_to_value()

command::returned_info datatools::configuration::variant_record::string_to_value ( const std::string &  format_)

Set the value from a formatted string.

◆ tree_dump()

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

Smart print.

◆ unset_value()

command::returned_info datatools::configuration::variant_record::unset_value ( )

Unset a parameter value.

◆ update()

void datatools::configuration::variant_record::update ( )

Update.

◆ value_is_set() [1/2]

bool datatools::configuration::variant_record::value_is_set ( ) const

Check if a parameter value is set.

◆ value_is_set() [2/2]

command::returned_info datatools::configuration::variant_record::value_is_set ( bool &  ) const

Check set value.

◆ value_to_string()

command::returned_info datatools::configuration::variant_record::value_to_string ( std::string &  format_) const

Build a formatted string from the value.


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