senf::console::GenericNode Class Reference
[The node tree]
Config/console node tree base-class.
More...
#include <senf/Utils/Console/Node.hh>
List of all members.
Detailed Description
Config/console node tree base-class.
GenericNode is the base class of all node objects. There are two basic node types derived from GenericNode: DirectoryNode and CommandNode.
All nodes are dynamically allocated and automatically managed using reference counting.
All nodes are normally linked into a single tree which root node is senf::console::root(). Nodes may however be orphaned (not linked to the tree) either directly (the node has no parent) or indirectly (the node has a parent but is part of an orphaned subtree which is not linked to the root node).
Every active (non-orphaned) node (except the root() node) has a non-empty node name. This name is assigned to the node when adding the node to the tree.
Definition at line 256 of file Node.hh.
Member Typedef Documentation
typedef boost::shared_ptr<GenericNode const> senf::console::GenericNode:: |
cptr |
|
|
|
|
|
typedef boost::shared_ptr<GenericNode> senf::console::GenericNode:: |
ptr |
|
|
|
|
|
typedef boost::weak_ptr<GenericNode> senf::console::GenericNode:: |
weak_ptr |
|
|
|
|
|
Constructor & Destructor Documentation
senf::console::GenericNode:: |
~GenericNode |
() |
|
|
|
|
senf::console::GenericNode:: |
GenericNode |
() |
|
|
|
|
Member Function Documentation
bool senf::console::GenericNode:: |
active |
() |
|
|
|
|
true
, if node is attached to the root() node
Definition at line 99 of file Node.cc.
Follow link if this
node is a link node.
Definition at line 130 of file Node.cci.
Follow link if this
node is a link node.
Definition at line 122 of file Node.cci.
void senf::console::GenericNode:: |
help |
( |
std::ostream & |
output |
) |
|
Write help info to output.
Definition at line 80 of file Node.cci.
bool senf::console::GenericNode:: |
isChildOf |
( |
DirectoryNode & |
parent |
) |
|
true
, if node is a child of parent
Will also return true
, if parent is the current node.
Definition at line 108 of file Node.cc.
bool senf::console::GenericNode:: |
isCommand |
() |
|
|
|
|
true
, if this is a command node
Definition at line 116 of file Node.cci.
bool senf::console::GenericNode:: |
isDirectory |
() |
|
|
|
|
true
, if this is a directory node
Definition at line 104 of file Node.cci.
bool senf::console::GenericNode:: |
isLink |
() |
|
|
|
|
true
, if this is a link node
Definition at line 110 of file Node.cci.
void senf::console::GenericNode:: |
name |
( |
std::string const & |
name |
) |
|
std::string const & senf::console::GenericNode:: |
name |
() |
|
|
|
|
Node name.
Definition at line 50 of file Node.cci.
bool senf::console::GenericNode:: |
operator!= |
( |
GenericNode & |
other |
) |
|
true
, if this and other are different nodes
Definition at line 98 of file Node.cci.
bool senf::console::GenericNode:: |
operator== |
( |
GenericNode & |
other |
) |
|
true
, if this and other are the same node
Definition at line 92 of file Node.cci.
Parent node.
May be null, if the node is the root node or if it is not linked to the tree
Definition at line 65 of file Node.cci.
std::string senf::console::GenericNode:: |
path |
( |
DirectoryNode const & |
root |
) |
|
Node path up to root.
The node path is built by joining the names of all parent nodes up to root with '/' chars.
Definition at line 82 of file Node.cc.
std::string senf::console::GenericNode:: |
path |
() |
|
|
|
|
Node path.
The node path is built by joining the names of all parent nodes with '/' chars.
Definition at line 70 of file Node.cc.
std::string senf::console::GenericNode:: |
shorthelp |
() |
|
|
|
|
Get short (one-line) documentation.
Definition at line 86 of file Node.cci.
Remove node from it's parent directory.
You may either discard the return value and thereby dispose the node or may re-attach the node at some other place using DirectoryNode::add().
Definition at line 72 of file Node.cci.
virtual void senf::console::GenericNode:: |
v_help |
( |
std::ostream & |
output |
) |
|
Provide help information.
This member must be implemented in derived classes to provide node specific help information.
virtual std::string senf::console::GenericNode:: |
v_shorthelp |
() |
|
|
|
|
Provide short documentation.
This member must be implemented in derived classes to provide node specific documentation.
The documentation for this class was generated from the following files: