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

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_recordregistry_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 &registry_rule_)
 Add the configuration of a variant registry in the variant repository. More...
 
void add_registry_dependency (const std::string &registry_dependency_rule_)
 Add a dependency to a variant registry in the variant repository. More...
 
bool has_registry_record (const std::string &registry_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_repositorygrab_repository ()
 Return a handle to the variant repository. More...
 
const variant_repositoryget_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...
 

Detailed Description

Variant user interface service.

Member Typedef Documentation

◆ registry_record_dict_type

Type alias for a dictionary of registry records.

Member Enumeration Documentation

◆ config_flags

Special flags to publish variant related program options.

Enumerator
NO_LABEL 
NO_LOGGING 
NO_CONFIG_FILENAME 
NO_REGISTRY_RULES 
NO_REGISTRY_DEPENDENCIES 
NO_PROFILE_LOAD 
PROFILE_LOAD_DONT_IGNORE_UNKNOWN 
NO_SETTINGS 
NO_PROFILE_STORE 
NO_GUI 
NO_TUI 
NO_REPORTING 

Constructor & Destructor Documentation

◆ variant_service()

datatools::configuration::variant_service::variant_service ( uint32_t  flags_ = 0)

◆ ~variant_service()

datatools::configuration::variant_service::~variant_service ( )

Member Function Documentation

◆ add_registry_dependency()

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.

◆ add_registry_rule()

void datatools::configuration::variant_service::add_registry_rule ( const std::string &  registry_rule_)

Add the configuration of a variant registry in the variant repository.

◆ apply_setting()

void datatools::configuration::variant_service::apply_setting ( const std::string &  setting_)

Return a handle to the variant repository.

Apply a setting

  • setting_ avariant parameter setting directive Supported format is : "foo:param0/var0/key0=value"

◆ configure()

void datatools::configuration::variant_service::configure ( const config cfg_,
bool  lock_ = true 
)

Configure the service with a set of parameters.

◆ get_label()

const std::string& datatools::configuration::variant_service::get_label ( ) const

Return the label.

◆ get_max_rank()

int32_t datatools::configuration::variant_service::get_max_rank ( ) const

Return the max rank for registries.

◆ get_next_rank()

int32_t datatools::configuration::variant_service::get_next_rank ( ) const

Return the next available rank for registries.

◆ get_repository()

const variant_repository& datatools::configuration::variant_service::get_repository ( ) const

◆ grab_repository()

variant_repository& datatools::configuration::variant_service::grab_repository ( )

Return a handle to the variant repository.

◆ has_registry_record()

bool datatools::configuration::variant_service::has_registry_record ( const std::string &  registry_name_) const

Check if an additional variant registry is defined.

◆ has_reporting_file()

bool datatools::configuration::variant_service::has_reporting_file ( ) const

Check for a usage reporting filename.

◆ init_options()

static void datatools::configuration::variant_service::init_options ( boost::program_options::options_description &  opts_,
config cfg_,
uint32_t  flags_ = 0 
)
static

Initialize options description associated to a config structure.

◆ is_reporting()

bool datatools::configuration::variant_service::is_reporting ( ) const

Check is reporting is used.

◆ is_started()

bool datatools::configuration::variant_service::is_started ( ) const

Check started flag.

◆ set_dont_ignore_unknown_at_load()

void datatools::configuration::variant_service::set_dont_ignore_unknown_at_load ( bool  )

Set the ignore unknown at load flag.

◆ set_input_profile()

void datatools::configuration::variant_service::set_input_profile ( const std::string &  ip_)

Set the optional input variant profile filename.

◆ set_label()

void datatools::configuration::variant_service::set_label ( const std::string &  )

Set the label.

◆ set_logging()

void datatools::configuration::variant_service::set_logging ( datatools::logger::priority  )

Set the logging priority thresold.

◆ set_output_profile()

void datatools::configuration::variant_service::set_output_profile ( const std::string &  op_)

Set the optional output variant profile filename.

◆ set_reporting_file()

void datatools::configuration::variant_service::set_reporting_file ( const std::string &  urf_)

Set the usage reporting filename.

◆ set_repository_config()

void datatools::configuration::variant_service::set_repository_config ( const std::string &  config_)

Set the main configuration file for the variant repository.

◆ set_settings()

void datatools::configuration::variant_service::set_settings ( const std::vector< std::string > &  setting_)

Set the setting rules for variant parameters.

◆ set_tui()

void datatools::configuration::variant_service::set_tui ( bool  )

Activate the variant TUI editor.

◆ start()

void datatools::configuration::variant_service::start ( )

Run startup operations at application startup.

◆ stop()

void datatools::configuration::variant_service::stop ( )

Run termination at application stop.


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