senf::console::LinkNode Class Reference

Config/console tree link node. More...

#include <senf/Utils/Console/Node.hh>

Inheritance diagram for senf::console::LinkNode:

Public Types

typedef boost::shared_ptr< LinkNodeptr
 
typedef boost::shared_ptr< LinkNode const > cptr
 
typedef boost::weak_ptr< LinkNodeweak_ptr
 
- Public Types inherited from senf::console::GenericNode
typedef boost::shared_ptr< GenericNodeptr
 
typedef boost::shared_ptr< GenericNode const > cptr
 
typedef boost::weak_ptr< GenericNodeweak_ptr
 

Public Member Functions

GenericNodefollow () 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< DirectoryNodeparent () 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...
 
GenericNodefollowLink ()
 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)
 

Detailed Description

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().

Definition at line 348 of file Node.hh.

Member Typedef Documentation

◆ cptr

typedef boost::shared_ptr<LinkNode const> senf::console::LinkNode::cptr

Definition at line 356 of file Node.hh.

◆ ptr

typedef boost::shared_ptr<LinkNode> senf::console::LinkNode::ptr

Definition at line 355 of file Node.hh.

◆ weak_ptr

typedef boost::weak_ptr<LinkNode> senf::console::LinkNode::weak_ptr

Definition at line 357 of file Node.hh.

Member Function Documentation

◆ create()

static ptr senf::console::LinkNode::create ( GenericNode node)
static

Create new link node.

You should normally use DirectoryNode::link() to create a link node.

◆ follow()

GenericNode& senf::console::LinkNode::follow ( ) const

Access the referenced node.


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