![]() |
Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Host a register of static and/or dynamic informations about libraries or software components. More...
#include <bayeux/datatools/library_info.h>
Classes | |
| struct | keys |
| Library/software component description property keys. More... | |
Public Member Functions | |
| library_info () | |
| Constructor. More... | |
| virtual | ~library_info () |
| Destructor. More... | |
| logger::priority | get_logging () const |
| Return the logging priority of the library info register. More... | |
| void | set_logging (logger::priority) |
| Set the logging priority of the library info register. More... | |
| void | names (std::vector< std::string > &) const |
| Build a list of currently registered library names. More... | |
| void | aliases (std::vector< std::string > &) const |
| Build a list of currently defined library aliases. More... | |
| void | add_alias (const std::string &library_alias_, const std::string &library_name_) |
| Add alias. More... | |
| void | remove_alias (const std::string &library_alias_) |
| Remove alias. More... | |
| bool | resolve_path (const std::string &path_, std::string &resolved_path_, std::string &error_msg_) const |
| void | path_registration (const std::string &library_name_, const std::string &topic_, const std::string &path_, bool overwrite_=false) |
| Register a path associated to a library/app name. More... | |
| void | path_unregistration (const std::string &library_name_, const std::string &topic_) |
| Unregister a path associated to a library/app name. More... | |
| properties & | registration (const std::string &library_name_, const std::string &library_desc_="", const std::string &library_version_="", const std::string &install_prefix_="", const std::string &install_lib_path_="", const std::string &install_resource_path_="") |
| Register basic infos for a given library. More... | |
| void | unregistration (const std::string &library_name_) |
| Unregister a given library. More... | |
| bool | has (const std::string &library_key_) const |
| Check if some infos about a given library exist (by name or alias) More... | |
| bool | is_library (const std::string &library_name_) const |
| Check if a given library exist (by name) More... | |
| bool | is_alias (const std::string &library_key_) const |
| Check if an alias is defined. More... | |
| std::string | resolve (const std::string &library_key_, bool check_=false) const |
| Resolve the true name of the library. More... | |
| void | update (const std::string &library_name_, const std::string &info_key_, const std::string &info_value_, const std::string &info_type_="", bool locked_=true) |
| Update. More... | |
| void | erase (const std::string &library_name_, const std::string &info_key_) |
| Erase a library info from the register. More... | |
| void | clear () |
| Clear all library infos from the register. More... | |
| void | print (const std::string &library_name_, std::ostream &out_=std::clog) const |
| Print the library infos from the register. More... | |
| void | initialize () |
| Initialize the library info register. More... | |
| void | reset () |
| Terminate the library info register. More... | |
| bool | is_initialized () |
| Check the library info register initialization status. More... | |
| const properties & | get (const std::string &library_key_) const |
| Return a non-mutable reference to the library infos container. More... | |
| properties & | grab (const std::string &library_key_) |
| Return a mutable reference to the library infos container. More... | |
| void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
| Smart print. 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 |
Static Public Member Functions | |
| static const std::set< std::string > & | topic_labels () |
| static std::string | default_topic_label () |
| static std::string | topic_label_to_install_key (const std::string &label_) |
| static std::string | topic_label_to_env_key (const std::string &label_) |
| static bool | parse_path_registration_directive (const std::string &rule_, std::string &library_name_, std::string &topic_, std::string &path_, std::string &error_msg_) |
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_) |
Additional Inherited Members | |
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... | |
Host a register of static and/or dynamic informations about libraries or software components.
| datatools::library_info::library_info | ( | ) |
Constructor.
|
virtual |
Destructor.
| void datatools::library_info::add_alias | ( | const std::string & | library_alias_, |
| const std::string & | library_name_ | ||
| ) |
Add alias.
| void datatools::library_info::aliases | ( | std::vector< std::string > & | ) | const |
Build a list of currently defined library aliases.
| void datatools::library_info::clear | ( | ) |
Clear all library infos from the register.
|
static |
| void datatools::library_info::erase | ( | const std::string & | library_name_, |
| const std::string & | info_key_ | ||
| ) |
Erase a library info from the register.
| const properties& datatools::library_info::get | ( | const std::string & | library_key_ | ) | const |
Return a non-mutable reference to the library infos container.
| logger::priority datatools::library_info::get_logging | ( | ) | const |
Return the logging priority of the library info register.
| properties& datatools::library_info::grab | ( | const std::string & | library_key_ | ) |
Return a mutable reference to the library infos container.
| bool datatools::library_info::has | ( | const std::string & | library_key_ | ) | const |
Check if some infos about a given library exist (by name or alias)
| void datatools::library_info::initialize | ( | ) |
Initialize the library info register.
| bool datatools::library_info::is_alias | ( | const std::string & | library_key_ | ) | const |
Check if an alias is defined.
| bool datatools::library_info::is_initialized | ( | ) |
Check the library info register initialization status.
| bool datatools::library_info::is_library | ( | const std::string & | library_name_ | ) | const |
Check if a given library exist (by name)
| void datatools::library_info::names | ( | std::vector< std::string > & | ) | const |
Build a list of currently registered library names.
|
static |
Parse of a path registration directive
Format is :
where:
| void datatools::library_info::path_registration | ( | const std::string & | library_name_, |
| const std::string & | topic_, | ||
| const std::string & | path_, | ||
| bool | overwrite_ = false |
||
| ) |
Register a path associated to a library/app name.
| void datatools::library_info::path_unregistration | ( | const std::string & | library_name_, |
| const std::string & | topic_ | ||
| ) |
Unregister a path associated to a library/app name.
| void datatools::library_info::print | ( | const std::string & | library_name_, |
| std::ostream & | out_ = std::clog |
||
| ) | const |
Print the library infos from the register.
| properties& datatools::library_info::registration | ( | const std::string & | library_name_, |
| const std::string & | library_desc_ = "", |
||
| const std::string & | library_version_ = "", |
||
| const std::string & | install_prefix_ = "", |
||
| const std::string & | install_lib_path_ = "", |
||
| const std::string & | install_resource_path_ = "" |
||
| ) |
Register basic infos for a given library.
| void datatools::library_info::remove_alias | ( | const std::string & | library_alias_ | ) |
Remove alias.
| void datatools::library_info::reset | ( | ) |
Terminate the library info register.
| std::string datatools::library_info::resolve | ( | const std::string & | library_key_, |
| bool | check_ = false |
||
| ) | const |
Resolve the true name of the library.
| bool datatools::library_info::resolve_path | ( | const std::string & | path_, |
| std::string & | resolved_path_, | ||
| std::string & | error_msg_ | ||
| ) | const |
Resolve a path with the syntax:
with TOPIC chosen among "resources" (default), "data", "libraries", "plugins"...
| void datatools::library_info::set_logging | ( | logger::priority | ) |
Set the logging priority of the library info register.
|
static |
|
static |
|
static |
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
| void datatools::library_info::unregistration | ( | const std::string & | library_name_ | ) |
Unregister a given library.
| void datatools::library_info::update | ( | const std::string & | library_name_, |
| const std::string & | info_key_, | ||
| const std::string & | info_value_, | ||
| const std::string & | info_type_ = "", |
||
| bool | locked_ = true |
||
| ) |
Update.
1.8.15