Config/console tree link node. More...
#include <senf/Utils/Console/Node.hh>
Public Types | |
typedef boost::shared_ptr< LinkNode > | ptr |
typedef boost::shared_ptr< LinkNode const > | cptr |
typedef boost::weak_ptr< LinkNode > | weak_ptr |
Public Types inherited from senf::console::GenericNode | |
typedef boost::shared_ptr< GenericNode > | ptr |
typedef boost::shared_ptr< GenericNode const > | cptr |
typedef boost::weak_ptr< GenericNode > | weak_ptr |
Public Member Functions | |
GenericNode & | follow () const |
Access the referenced node. More... | |
Public Member Functions inherited from senf::console::GenericNode | |
virtual | ~GenericNode () |
std::string const & | name () const |
Node name. More... | |
boost::shared_ptr< DirectoryNode > | parent () const |
Parent node. More... | |
std::string | path () const |
Node path. More... | |
std::string | path (DirectoryNode const &root) const |
Node path up to root. More... | |
ptr | unlink () |
Remove node from it's parent directory. More... | |
void | rename (std::string const &newName) |
Rename node name in it's parent directory. More... | |
bool | active () const |
true , if node is attached to the root() node More... | |
void | help (std::ostream &output) const |
Write help info to output. More... | |
std::string | shorthelp () const |
Get short (one-line) documentation. More... | |
ptr | thisptr () |
Get smart pointer to node. More... | |
cptr | thisptr () const |
Get smart pointer to node (const) More... | |
bool | isChildOf (DirectoryNode &parent) const |
true , if node is a child of parent More... | |
bool | operator== (GenericNode &other) const |
true , if this and other are the same node More... | |
bool | operator!= (GenericNode &other) const |
true , if this and other are different nodes More... | |
bool | isDirectory () const |
true , if this is a directory node More... | |
bool | isLink () const |
true , if this is a link node More... | |
bool | isCommand () const |
true , if this is a command node More... | |
GenericNode const & | followLink () const |
Follow link if this node is a link node. More... | |
GenericNode & | followLink () |
Follow link if this node is a link node. More... | |
Structors and default members | |
static ptr | create (GenericNode &node) |
Create new link node. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from senf::console::GenericNode | |
GenericNode () | |
void | name (std::string const &name) |
Config/console tree link node.
A LinkNode references another node and provides an additional alias name for that node. A LinkNode works like a mixture of UNIX symlinks and hardlinks: It is an explicit link like a UNIX symlink but references another node directly (not via it's path) like a UNIX hardlink. Therefore, a LinkNode works across chroot().
typedef boost::shared_ptr<LinkNode const> senf::console::LinkNode::cptr |
typedef boost::shared_ptr<LinkNode> senf::console::LinkNode::ptr |
typedef boost::weak_ptr<LinkNode> senf::console::LinkNode::weak_ptr |
|
static |
Create new link node.
You should normally use DirectoryNode::link() to create a link node.
GenericNode& senf::console::LinkNode::follow | ( | ) | const |
Access the referenced node.