Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Variant user interface service. More...
#include <bayeux/datatools/configuration/variant_service.h>
Classes | |
struct | config |
Variant service configuration parameters. More... | |
struct | registry_record |
Record for an additional registry. More... | |
class | variant_exception |
Exception for variant related error. More... | |
Public Types | |
enum | config_flags { NO_LABEL = datatools::bit_mask::bit00, NO_LOGGING = datatools::bit_mask::bit01, NO_CONFIG_FILENAME = datatools::bit_mask::bit02, NO_REGISTRY_RULES = datatools::bit_mask::bit03, NO_REGISTRY_DEPENDENCIES = datatools::bit_mask::bit04, NO_PROFILE_LOAD = datatools::bit_mask::bit05, PROFILE_LOAD_DONT_IGNORE_UNKNOWN = datatools::bit_mask::bit06, NO_SETTINGS = datatools::bit_mask::bit07, NO_PROFILE_STORE = datatools::bit_mask::bit08, NO_GUI = datatools::bit_mask::bit09, NO_TUI = datatools::bit_mask::bit10, NO_REPORTING = datatools::bit_mask::bit11 } |
Special flags to publish variant related program options. More... | |
typedef std::map< std::string, registry_record > | registry_record_dict_type |
Type alias for a dictionary of registry records. More... | |
Public Member Functions | |
variant_service (uint32_t flags_=0) | |
~variant_service () | |
void | set_label (const std::string &) |
Set the label. More... | |
const std::string & | get_label () const |
Return the label. More... | |
void | set_logging (datatools::logger::priority) |
Set the logging priority thresold. More... | |
void | set_repository_config (const std::string &config_) |
Set the main configuration file for the variant repository. More... | |
void | add_registry_rule (const std::string ®istry_rule_) |
Add the configuration of a variant registry in the variant repository. More... | |
void | add_registry_dependency (const std::string ®istry_dependency_rule_) |
Add a dependency to a variant registry in the variant repository. More... | |
bool | has_registry_record (const std::string ®istry_name_) const |
Check if an additional variant registry is defined. More... | |
void | set_input_profile (const std::string &ip_) |
Set the optional input variant profile filename. More... | |
void | set_dont_ignore_unknown_at_load (bool) |
Set the ignore unknown at load flag. More... | |
void | set_settings (const std::vector< std::string > &setting_) |
Set the setting rules for variant parameters. More... | |
void | set_output_profile (const std::string &op_) |
Set the optional output variant profile filename. More... | |
bool | is_reporting () const |
Check is reporting is used. More... | |
bool | has_reporting_file () const |
Check for a usage reporting filename. More... | |
void | set_reporting_file (const std::string &urf_) |
Set the usage reporting filename. More... | |
void | configure (const config &cfg_, bool lock_=true) |
Configure the service with a set of parameters. More... | |
int32_t | get_max_rank () const |
Return the max rank for registries. More... | |
int32_t | get_next_rank () const |
Return the next available rank for registries. More... | |
void | set_tui (bool) |
Activate the variant TUI editor. More... | |
bool | is_started () const |
Check started flag. More... | |
void | start () |
Run startup operations at application startup. More... | |
void | stop () |
Run termination at application stop. More... | |
void | apply_setting (const std::string &setting_) |
Return a handle to the variant repository. More... | |
variant_repository & | grab_repository () |
Return a handle to the variant repository. More... | |
const variant_repository & | get_repository () const |
Static Public Member Functions | |
static void | init_options (boost::program_options::options_description &opts_, config &cfg_, uint32_t flags_=0) |
Initialize options description associated to a config structure. More... | |
Variant user interface service.
typedef std::map<std::string, registry_record> datatools::configuration::variant_service::registry_record_dict_type |
Type alias for a dictionary of registry records.
datatools::configuration::variant_service::variant_service | ( | uint32_t | flags_ = 0 | ) |
datatools::configuration::variant_service::~variant_service | ( | ) |
void datatools::configuration::variant_service::add_registry_dependency | ( | const std::string & | registry_dependency_rule_ | ) |
Add a dependency to a variant registry in the variant repository.
void datatools::configuration::variant_service::add_registry_rule | ( | const std::string & | registry_rule_ | ) |
Add the configuration of a variant registry in the variant repository.
void datatools::configuration::variant_service::apply_setting | ( | const std::string & | setting_ | ) |
Return a handle to the variant repository.
Apply a setting
void datatools::configuration::variant_service::configure | ( | const config & | cfg_, |
bool | lock_ = true |
||
) |
Configure the service with a set of parameters.
const std::string& datatools::configuration::variant_service::get_label | ( | ) | const |
Return the label.
int32_t datatools::configuration::variant_service::get_max_rank | ( | ) | const |
Return the max rank for registries.
int32_t datatools::configuration::variant_service::get_next_rank | ( | ) | const |
Return the next available rank for registries.
const variant_repository& datatools::configuration::variant_service::get_repository | ( | ) | const |
variant_repository& datatools::configuration::variant_service::grab_repository | ( | ) |
Return a handle to the variant repository.
bool datatools::configuration::variant_service::has_registry_record | ( | const std::string & | registry_name_ | ) | const |
Check if an additional variant registry is defined.
bool datatools::configuration::variant_service::has_reporting_file | ( | ) | const |
Check for a usage reporting filename.
|
static |
Initialize options description associated to a config structure.
bool datatools::configuration::variant_service::is_reporting | ( | ) | const |
Check is reporting is used.
bool datatools::configuration::variant_service::is_started | ( | ) | const |
Check started flag.
void datatools::configuration::variant_service::set_dont_ignore_unknown_at_load | ( | bool | ) |
Set the ignore unknown at load flag.
void datatools::configuration::variant_service::set_input_profile | ( | const std::string & | ip_ | ) |
Set the optional input variant profile filename.
void datatools::configuration::variant_service::set_label | ( | const std::string & | ) |
Set the label.
void datatools::configuration::variant_service::set_logging | ( | datatools::logger::priority | ) |
Set the logging priority thresold.
void datatools::configuration::variant_service::set_output_profile | ( | const std::string & | op_ | ) |
Set the optional output variant profile filename.
void datatools::configuration::variant_service::set_reporting_file | ( | const std::string & | urf_ | ) |
Set the usage reporting filename.
void datatools::configuration::variant_service::set_repository_config | ( | const std::string & | config_ | ) |
Set the main configuration file for the variant repository.
void datatools::configuration::variant_service::set_settings | ( | const std::vector< std::string > & | setting_ | ) |
Set the setting rules for variant parameters.
void datatools::configuration::variant_service::set_tui | ( | bool | ) |
Activate the variant TUI editor.
void datatools::configuration::variant_service::start | ( | ) |
Run startup operations at application startup.
void datatools::configuration::variant_service::stop | ( | ) |
Run termination at application stop.