Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Friends | List of all members
datatools::ui::ihs::node Class Reference

A node in the IHS. More...

#include <bayeux/datatools/ui/ihs.h>

Inheritance diagram for datatools::ui::ihs::node:
datatools::i_tree_dumpable

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::propertiesgrab_metadata ()
 Return the mutable metadata. More...
 
const datatools::propertiesget_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_interfacegrab_interface ()
 Return the command interface. More...
 
const base_command_interfaceget_interface () const
 Return the command interface. More...
 
base_commandgrab_command ()
 Return the command. More...
 
const base_commandget_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...
 
nodegrab_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 nodeget_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_)
 

Detailed Description

A node in the IHS.

Constructor & Destructor Documentation

◆ node() [1/2]

datatools::ui::ihs::node::node ( )

Default constructor.

◆ node() [2/2]

datatools::ui::ihs::node::node ( node_type  type_,
const std::string &  full_path_ 
)

Constructor.

◆ ~node()

virtual datatools::ui::ihs::node::~node ( )
virtual

Destructor.

Member Function Documentation

◆ add_child_node()

void datatools::ui::ihs::node::add_child_node ( node node_)

Add a child node.

◆ get_command()

const base_command& datatools::ui::ihs::node::get_command ( ) const

Return the command.

◆ get_description()

const std::string& datatools::ui::ihs::node::get_description ( ) const

Return the description.

◆ get_full_path()

const std::string& datatools::ui::ihs::node::get_full_path ( ) const

Return the full path.

◆ get_interface()

const base_command_interface& datatools::ui::ihs::node::get_interface ( ) const

Return the command interface.

◆ get_metadata()

const datatools::properties& datatools::ui::ihs::node::get_metadata ( ) const

Return the metadata.

◆ get_number_of_children()

std::size_t datatools::ui::ihs::node::get_number_of_children ( ) const

Return the number of child nodes.

◆ get_parent_node()

const node& datatools::ui::ihs::node::get_parent_node ( ) const

Return the parent node (if set)

◆ get_type()

node_type datatools::ui::ihs::node::get_type ( ) const

Return the node type.

◆ grab_command()

base_command& datatools::ui::ihs::node::grab_command ( )

Return the command.

◆ grab_interface()

base_command_interface& datatools::ui::ihs::node::grab_interface ( )

Return the command interface.

◆ grab_metadata()

datatools::properties& datatools::ui::ihs::node::grab_metadata ( )

Return the mutable metadata.

◆ grab_parent_node()

node& datatools::ui::ihs::node::grab_parent_node ( )

Return the parent node (if set)

◆ has_children()

bool datatools::ui::ihs::node::has_children ( ) const

Check if some children are set.

◆ has_command()

bool datatools::ui::ihs::node::has_command ( ) const

Check if node has a command set.

◆ has_description()

bool datatools::ui::ihs::node::has_description ( ) const

Check if node has a description.

◆ has_interface()

bool datatools::ui::ihs::node::has_interface ( ) const

Check if node has a command interface set.

◆ has_parent_node()

bool datatools::ui::ihs::node::has_parent_node ( ) const

Check if the parent node is set.

◆ is_child_of()

bool datatools::ui::ihs::node::is_child_of ( node node_) const

Check if the node is child of another node.

◆ is_command()

bool datatools::ui::ihs::node::is_command ( ) const

Check if node is a command node (file)

◆ is_interface()

bool datatools::ui::ihs::node::is_interface ( ) const

Check if node is an interface node (directory)

◆ is_root()

bool datatools::ui::ihs::node::is_root ( ) const

Check if node is the root.

◆ is_trait()

bool datatools::ui::ihs::node::is_trait ( const std::string &  trait_label_) const

Check if a trait id set.

◆ is_valid()

bool datatools::ui::ihs::node::is_valid ( ) const

Check if node is valid.

◆ remove_child_node()

void datatools::ui::ihs::node::remove_child_node ( node node_)

Remove a child node.

◆ reset()

void datatools::ui::ihs::node::reset ( )

Reset the node.

◆ reset_command()

void datatools::ui::ihs::node::reset_command ( )

Reset command.

◆ reset_interface()

void datatools::ui::ihs::node::reset_interface ( )

Reset interface.

◆ reset_trait()

void datatools::ui::ihs::node::reset_trait ( const std::string &  trait_label_)

Reset trait flag.

◆ set_command()

void datatools::ui::ihs::node::set_command ( base_command )

Set the command.

◆ set_description()

void datatools::ui::ihs::node::set_description ( const std::string &  )

Set the description.

◆ set_external_command()

void datatools::ui::ihs::node::set_external_command ( base_command )

Set the external command.

◆ set_external_interface()

void datatools::ui::ihs::node::set_external_interface ( base_command_interface )

Set the external command interface.

◆ set_full_path()

void datatools::ui::ihs::node::set_full_path ( const std::string &  )

Set the full path.

◆ set_ihs()

void datatools::ui::ihs::node::set_ihs ( ihs )

Set the host IHS.

◆ set_interface()

void datatools::ui::ihs::node::set_interface ( base_command_interface )

Set the command interface.

◆ set_parent_node()

void datatools::ui::ihs::node::set_parent_node ( node node_)

Set parent node.

◆ set_trait()

void datatools::ui::ihs::node::set_trait ( const std::string &  trait_label_,
const bool  set_ = true 
)

Set trait flag.

◆ set_type()

void datatools::ui::ihs::node::set_type ( node_type  type_)

Set the node type.

◆ tree_dump()

virtual void datatools::ui::ihs::node::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit = false 
) const
virtual

Smart print.

Reimplemented from datatools::i_tree_dumpable.

◆ unset_parent_node()

void datatools::ui::ihs::node::unset_parent_node ( )

Remove parent node.

Friends And Related Function Documentation

◆ ihs

friend class ihs
friend

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