Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
#include <bayeux/geomtools/id_mgr.h>
Public Member Functions | |
bool | has_subaddress (const std::string &a_label, int a_count=1) const |
Check if a subaddress with a given label exists at given occurence. More... | |
int | get_subaddress_index (const std::string &a_label, int a_count=1) const |
Fetch the subaddress associated to a given label at given occurence. More... | |
bool | is_valid () const |
Check if the category data are valid. More... | |
bool | is_final_category () const |
void | set_final_category (bool) |
void | set_category (const std::string &cat_) |
const std::string & | get_category () const |
Get the name of the category. More... | |
bool | has_ancestor (const std::string &cat_) const |
Check if ancestor with a given category name exists. More... | |
void | add_ancestor (const std::string &cat_) |
Add an ancestor with a given category name dexists. More... | |
void | add_address (const std::string &address_) |
Add an address. More... | |
void | add_extends_by (const std::string &by_) |
Add an extends by. More... | |
bool | has_group () const |
Check if a group is defined. More... | |
void | set_group (const std::string &) |
Set the group. More... | |
const std::string & | get_group () const |
Return the group. More... | |
void | set_type (uint32_t) |
Set the type. More... | |
uint32_t | get_type () const |
Get the type. More... | |
const std::string & | get_inherits () const |
Get the name of the parent category (if any) More... | |
void | set_inherits (const std::string &) |
Set the inherited parent category. More... | |
bool | is_inherited () const |
Check if a parent category exists. More... | |
bool | is_extension () const |
Check if the category extends another one. More... | |
void | set_extends (const std::string &) |
Set the extended parent category. More... | |
const std::string & | get_extends () const |
Get the name of the extended category (if any) More... | |
void | set_ancestors (const std::vector< std::string > &) |
const std::vector< std::string > & | get_ancestors () const |
void | set_extends_by (const std::vector< std::string > &) |
const std::vector< std::string > & | get_extends_by () const |
void | set_addresses (const std::vector< std::string > &) |
const std::vector< std::string > & | get_addresses () const |
category_info () | |
Constructor. More... | |
virtual | ~category_info () |
Destructor. More... | |
size_t | get_depth () const |
Returns the size of the list of addresses. More... | |
size_t | get_by_depth () const |
Returns the size of the list of extending addresses. More... | |
void | create (geom_id &id_) const |
Create a geom ID with the proper type and depth following the description of the category. More... | |
void | dump (std::ostream &=std::clog) const |
Default print. More... | |
virtual void | print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=datatools::i_tree_dumpable::empty_options()) const |
bool | is_locked () const |
Check lock status. More... | |
void | lock () |
Lock the category. More... | |
void | reset () |
Reset the category. More... | |
Public Member Functions inherited from datatools::i_tree_dumpable | |
i_tree_dumpable () | |
Constructor. More... | |
virtual | ~i_tree_dumpable () |
Destructor. More... | |
virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
Main old 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 |
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... | |
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_) |
A class that documents the hierarchical relationship of a geometry category :
geomtools::id_mgr::category_info::category_info | ( | ) |
Constructor.
|
virtual |
Destructor.
void geomtools::id_mgr::category_info::add_address | ( | const std::string & | address_ | ) |
Add an address.
void geomtools::id_mgr::category_info::add_ancestor | ( | const std::string & | cat_ | ) |
Add an ancestor with a given category name dexists.
void geomtools::id_mgr::category_info::add_extends_by | ( | const std::string & | by_ | ) |
Add an extends by.
void geomtools::id_mgr::category_info::create | ( | geom_id & | id_ | ) | const |
Create a geom ID with the proper type and depth following the description of the category.
void geomtools::id_mgr::category_info::dump | ( | std::ostream & | = std::clog | ) | const |
Default print.
const std::vector<std::string>& geomtools::id_mgr::category_info::get_addresses | ( | ) | const |
const std::vector<std::string>& geomtools::id_mgr::category_info::get_ancestors | ( | ) | const |
size_t geomtools::id_mgr::category_info::get_by_depth | ( | ) | const |
Returns the size of the list of extending addresses.
const std::string& geomtools::id_mgr::category_info::get_category | ( | ) | const |
Get the name of the category.
size_t geomtools::id_mgr::category_info::get_depth | ( | ) | const |
Returns the size of the list of addresses.
const std::string& geomtools::id_mgr::category_info::get_extends | ( | ) | const |
Get the name of the extended category (if any)
const std::vector<std::string>& geomtools::id_mgr::category_info::get_extends_by | ( | ) | const |
const std::string& geomtools::id_mgr::category_info::get_group | ( | ) | const |
Return the group.
const std::string& geomtools::id_mgr::category_info::get_inherits | ( | ) | const |
Get the name of the parent category (if any)
int geomtools::id_mgr::category_info::get_subaddress_index | ( | const std::string & | a_label, |
int | a_count = 1 |
||
) | const |
Fetch the subaddress associated to a given label at given occurence.
uint32_t geomtools::id_mgr::category_info::get_type | ( | ) | const |
Get the type.
bool geomtools::id_mgr::category_info::has_ancestor | ( | const std::string & | cat_ | ) | const |
Check if ancestor with a given category name exists.
bool geomtools::id_mgr::category_info::has_group | ( | ) | const |
Check if a group is defined.
bool geomtools::id_mgr::category_info::has_subaddress | ( | const std::string & | a_label, |
int | a_count = 1 |
||
) | const |
Check if a subaddress with a given label exists at given occurence.
bool geomtools::id_mgr::category_info::is_extension | ( | ) | const |
Check if the category extends another one.
bool geomtools::id_mgr::category_info::is_final_category | ( | ) | const |
bool geomtools::id_mgr::category_info::is_inherited | ( | ) | const |
Check if a parent category exists.
bool geomtools::id_mgr::category_info::is_locked | ( | ) | const |
Check lock status.
bool geomtools::id_mgr::category_info::is_valid | ( | ) | const |
Check if the category data are valid.
void geomtools::id_mgr::category_info::lock | ( | ) |
Lock the category.
|
virtual |
Smart print
Supported options:
Reimplemented from datatools::i_tree_dumpable.
void geomtools::id_mgr::category_info::reset | ( | ) |
Reset the category.
void geomtools::id_mgr::category_info::set_addresses | ( | const std::vector< std::string > & | ) |
void geomtools::id_mgr::category_info::set_ancestors | ( | const std::vector< std::string > & | ) |
void geomtools::id_mgr::category_info::set_category | ( | const std::string & | cat_ | ) |
void geomtools::id_mgr::category_info::set_extends | ( | const std::string & | ) |
Set the extended parent category.
void geomtools::id_mgr::category_info::set_extends_by | ( | const std::vector< std::string > & | ) |
void geomtools::id_mgr::category_info::set_final_category | ( | bool | ) |
void geomtools::id_mgr::category_info::set_group | ( | const std::string & | ) |
Set the group.
void geomtools::id_mgr::category_info::set_inherits | ( | const std::string & | ) |
Set the inherited parent category.
void geomtools::id_mgr::category_info::set_type | ( | uint32_t | ) |
Set the type.