Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | List of all members
geomtools::id_mgr::category_info Class Reference

#include <bayeux/geomtools/id_mgr.h>

Inheritance diagram for geomtools::id_mgr::category_info:
datatools::i_tree_dumpable

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_)
 

Detailed Description

A class that documents the hierarchical relationship of a geometry category :

Constructor & Destructor Documentation

◆ category_info()

geomtools::id_mgr::category_info::category_info ( )

Constructor.

◆ ~category_info()

virtual geomtools::id_mgr::category_info::~category_info ( )
virtual

Destructor.

Member Function Documentation

◆ add_address()

void geomtools::id_mgr::category_info::add_address ( const std::string &  address_)

Add an address.

◆ add_ancestor()

void geomtools::id_mgr::category_info::add_ancestor ( const std::string &  cat_)

Add an ancestor with a given category name dexists.

◆ add_extends_by()

void geomtools::id_mgr::category_info::add_extends_by ( const std::string &  by_)

Add an extends by.

◆ create()

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.

◆ dump()

void geomtools::id_mgr::category_info::dump ( std::ostream &  = std::clog) const

Default print.

◆ get_addresses()

const std::vector<std::string>& geomtools::id_mgr::category_info::get_addresses ( ) const

◆ get_ancestors()

const std::vector<std::string>& geomtools::id_mgr::category_info::get_ancestors ( ) const

◆ get_by_depth()

size_t geomtools::id_mgr::category_info::get_by_depth ( ) const

Returns the size of the list of extending addresses.

◆ get_category()

const std::string& geomtools::id_mgr::category_info::get_category ( ) const

Get the name of the category.

◆ get_depth()

size_t geomtools::id_mgr::category_info::get_depth ( ) const

Returns the size of the list of addresses.

◆ get_extends()

const std::string& geomtools::id_mgr::category_info::get_extends ( ) const

Get the name of the extended category (if any)

◆ get_extends_by()

const std::vector<std::string>& geomtools::id_mgr::category_info::get_extends_by ( ) const

◆ get_group()

const std::string& geomtools::id_mgr::category_info::get_group ( ) const

Return the group.

◆ get_inherits()

const std::string& geomtools::id_mgr::category_info::get_inherits ( ) const

Get the name of the parent category (if any)

◆ get_subaddress_index()

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.

◆ get_type()

uint32_t geomtools::id_mgr::category_info::get_type ( ) const

Get the type.

◆ has_ancestor()

bool geomtools::id_mgr::category_info::has_ancestor ( const std::string &  cat_) const

Check if ancestor with a given category name exists.

◆ has_group()

bool geomtools::id_mgr::category_info::has_group ( ) const

Check if a group is defined.

◆ has_subaddress()

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.

◆ is_extension()

bool geomtools::id_mgr::category_info::is_extension ( ) const

Check if the category extends another one.

◆ is_final_category()

bool geomtools::id_mgr::category_info::is_final_category ( ) const

◆ is_inherited()

bool geomtools::id_mgr::category_info::is_inherited ( ) const

Check if a parent category exists.

◆ is_locked()

bool geomtools::id_mgr::category_info::is_locked ( ) const

Check lock status.

◆ is_valid()

bool geomtools::id_mgr::category_info::is_valid ( ) const

Check if the category data are valid.

◆ lock()

void geomtools::id_mgr::category_info::lock ( )

Lock the category.

◆ print_tree()

virtual void geomtools::id_mgr::category_info::print_tree ( std::ostream &  out_ = std::clog,
const boost::property_tree::ptree &  options_ = datatools::i_tree_dumpable::empty_options() 
) const
virtual

Smart print

Supported options:

{
"title" : "My title: ",
"indent" : "[debug] ",
"inherit" : false,
"list_categories" : true,
"full_categories" : true
}

Reimplemented from datatools::i_tree_dumpable.

◆ reset()

void geomtools::id_mgr::category_info::reset ( )

Reset the category.

◆ set_addresses()

void geomtools::id_mgr::category_info::set_addresses ( const std::vector< std::string > &  )

◆ set_ancestors()

void geomtools::id_mgr::category_info::set_ancestors ( const std::vector< std::string > &  )

◆ set_category()

void geomtools::id_mgr::category_info::set_category ( const std::string &  cat_)

◆ set_extends()

void geomtools::id_mgr::category_info::set_extends ( const std::string &  )

Set the extended parent category.

◆ set_extends_by()

void geomtools::id_mgr::category_info::set_extends_by ( const std::vector< std::string > &  )

◆ set_final_category()

void geomtools::id_mgr::category_info::set_final_category ( bool  )

◆ set_group()

void geomtools::id_mgr::category_info::set_group ( const std::string &  )

Set the group.

◆ set_inherits()

void geomtools::id_mgr::category_info::set_inherits ( const std::string &  )

Set the inherited parent category.

◆ set_type()

void geomtools::id_mgr::category_info::set_type ( uint32_t  )

Set the type.


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