The senf::console::factory namespace (customarily aliased to fty
in user code) contains factories used to create new node types:
namespace fty = senf::console::factory; senf::console::DirectoryNode & dir (node.add("dirname", fty::Directory())); dir.add("name", fty::Command<void(bool)>(&fn) .arg("flag") .doc("documentation"));
The node is added by passing the factory instance to senf::console::DirectoryNode::add().
To further customize the node, you may call attributor members on the temporary factory class instance. Since the attributor members always return a self-reference to the factory class instance, attributor calls may be chained arbitrarily.
Classes |
|
class | SimpleCommand |
SimpleCommandNode factory. More... |
|
class | Directory |
DirectoryNode factory. More... |
|
class | Link |
LinkNode factory. More... |
|
class | Command |
OverloadedCommandNode factory. More... |
|
class | Variable |
Variable node factory. More... |