Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
A node in the IHS. More...
#include <bayeux/datatools/ui/ihs.h>
Public Member Functions | |
node () | |
Default constructor. More... | |
node (node_type type_, const std::string &full_path_) | |
Constructor. More... | |
virtual | ~node () |
Destructor. More... | |
void | reset () |
Reset the node. More... | |
void | set_type (node_type type_) |
Set the node type. More... | |
node_type | get_type () const |
Return the node type. More... | |
bool | is_root () const |
Check if node is the root. More... | |
bool | is_valid () const |
Check if node is valid. More... | |
bool | is_interface () const |
Check if node is an interface node (directory) More... | |
bool | is_command () const |
Check if node is a command node (file) More... | |
datatools::properties & | grab_metadata () |
Return the mutable metadata. More... | |
const datatools::properties & | get_metadata () const |
Return the metadata. More... | |
const std::string & | get_full_path () const |
Return the full path. More... | |
void | set_full_path (const std::string &) |
Set the full path. More... | |
bool | has_description () const |
Check if node has a description. More... | |
void | set_description (const std::string &) |
Set the description. More... | |
const std::string & | get_description () const |
Return the description. More... | |
bool | has_interface () const |
Check if node has a command interface set. More... | |
bool | has_command () const |
Check if node has a command set. More... | |
void | set_interface (base_command_interface *) |
Set the command interface. More... | |
void | set_external_interface (base_command_interface &) |
Set the external command interface. More... | |
void | reset_interface () |
Reset interface. More... | |
void | set_command (base_command *) |
Set the command. More... | |
void | reset_command () |
Reset command. More... | |
void | set_external_command (base_command &) |
Set the external command. More... | |
base_command_interface & | grab_interface () |
Return the command interface. More... | |
const base_command_interface & | get_interface () const |
Return the command interface. More... | |
base_command & | grab_command () |
Return the command. More... | |
const base_command & | get_command () const |
Return the command. More... | |
bool | has_parent_node () const |
Check if the parent node is set. More... | |
void | set_parent_node (node &node_) |
Set parent node. More... | |
void | unset_parent_node () |
Remove parent node. More... | |
node & | grab_parent_node () |
Return the parent node (if set) More... | |
bool | is_child_of (node &node_) const |
Check if the node is child of another node. More... | |
const node & | get_parent_node () const |
Return the parent node (if set) More... | |
void | add_child_node (node &node_) |
Add a child node. More... | |
void | remove_child_node (node &node_) |
Remove a child node. More... | |
std::size_t | get_number_of_children () const |
Return the number of child nodes. More... | |
bool | has_children () const |
Check if some children are set. More... | |
void | set_ihs (ihs &) |
Set the host IHS. More... | |
virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit=false) const |
Smart print. More... | |
void | set_trait (const std::string &trait_label_, const bool set_=true) |
Set trait flag. More... | |
void | reset_trait (const std::string &trait_label_) |
Reset trait flag. More... | |
bool | is_trait (const std::string &trait_label_) const |
Check if a trait id set. 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 |
Friends | |
class | ihs |
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 node in the IHS.
datatools::ui::ihs::node::node | ( | ) |
Default constructor.
|
virtual |
Destructor.
void datatools::ui::ihs::node::add_child_node | ( | node & | node_ | ) |
Add a child node.
const base_command& datatools::ui::ihs::node::get_command | ( | ) | const |
Return the command.
const std::string& datatools::ui::ihs::node::get_description | ( | ) | const |
Return the description.
const std::string& datatools::ui::ihs::node::get_full_path | ( | ) | const |
Return the full path.
const base_command_interface& datatools::ui::ihs::node::get_interface | ( | ) | const |
Return the command interface.
const datatools::properties& datatools::ui::ihs::node::get_metadata | ( | ) | const |
Return the metadata.
std::size_t datatools::ui::ihs::node::get_number_of_children | ( | ) | const |
Return the number of child nodes.
node_type datatools::ui::ihs::node::get_type | ( | ) | const |
Return the node type.
base_command& datatools::ui::ihs::node::grab_command | ( | ) |
Return the command.
base_command_interface& datatools::ui::ihs::node::grab_interface | ( | ) |
Return the command interface.
datatools::properties& datatools::ui::ihs::node::grab_metadata | ( | ) |
Return the mutable metadata.
node& datatools::ui::ihs::node::grab_parent_node | ( | ) |
Return the parent node (if set)
bool datatools::ui::ihs::node::has_children | ( | ) | const |
Check if some children are set.
bool datatools::ui::ihs::node::has_command | ( | ) | const |
Check if node has a command set.
bool datatools::ui::ihs::node::has_description | ( | ) | const |
Check if node has a description.
bool datatools::ui::ihs::node::has_interface | ( | ) | const |
Check if node has a command interface set.
bool datatools::ui::ihs::node::has_parent_node | ( | ) | const |
Check if the parent node is set.
bool datatools::ui::ihs::node::is_child_of | ( | node & | node_ | ) | const |
Check if the node is child of another node.
bool datatools::ui::ihs::node::is_command | ( | ) | const |
Check if node is a command node (file)
bool datatools::ui::ihs::node::is_interface | ( | ) | const |
Check if node is an interface node (directory)
bool datatools::ui::ihs::node::is_root | ( | ) | const |
Check if node is the root.
bool datatools::ui::ihs::node::is_trait | ( | const std::string & | trait_label_ | ) | const |
Check if a trait id set.
bool datatools::ui::ihs::node::is_valid | ( | ) | const |
Check if node is valid.
void datatools::ui::ihs::node::remove_child_node | ( | node & | node_ | ) |
Remove a child node.
void datatools::ui::ihs::node::reset | ( | ) |
Reset the node.
void datatools::ui::ihs::node::reset_command | ( | ) |
Reset command.
void datatools::ui::ihs::node::reset_interface | ( | ) |
Reset interface.
void datatools::ui::ihs::node::reset_trait | ( | const std::string & | trait_label_ | ) |
Reset trait flag.
void datatools::ui::ihs::node::set_command | ( | base_command * | ) |
Set the command.
void datatools::ui::ihs::node::set_description | ( | const std::string & | ) |
Set the description.
void datatools::ui::ihs::node::set_external_command | ( | base_command & | ) |
Set the external command.
void datatools::ui::ihs::node::set_external_interface | ( | base_command_interface & | ) |
Set the external command interface.
void datatools::ui::ihs::node::set_full_path | ( | const std::string & | ) |
Set the full path.
void datatools::ui::ihs::node::set_ihs | ( | ihs & | ) |
Set the host IHS.
void datatools::ui::ihs::node::set_interface | ( | base_command_interface * | ) |
Set the command interface.
void datatools::ui::ihs::node::set_parent_node | ( | node & | node_ | ) |
Set parent node.
void datatools::ui::ihs::node::set_trait | ( | const std::string & | trait_label_, |
const bool | set_ = true |
||
) |
Set trait flag.
void datatools::ui::ihs::node::set_type | ( | node_type | type_ | ) |
Set the node type.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
void datatools::ui::ihs::node::unset_parent_node | ( | ) |
Remove parent node.
|
friend |