17 #ifndef HH_SENF_Utils_Console_ScopedDirectory_ 18 #define HH_SENF_Utils_Console_ScopedDirectory_ 1 21 #include <boost/utility/enable_if.hpp> 22 #include <boost/type_traits/is_convertible.hpp> 47 bool hasChild(std::string
const &
name)
const;
50 CommandNode & getCommand(std::string
const & name)
const;
51 CommandNode & operator()(std::string
const & name)
const;
55 std::string
const &
name()
const;
57 std::string path()
const;
59 boost::shared_ptr<DirectoryNode> parent()
const;
61 void help(std::ostream & output)
const;
62 std::string shorthelp()
const;
108 template <
class Owner>
126 template <
class NodeType>
127 NodeType & add(std::string
const &
name, boost::shared_ptr<NodeType> node);
128 template <
class NodeType>
129 NodeType & add(std::string
const &
name, NodeType & node,
130 typename boost::enable_if< boost::is_convertible<NodeType &, GenericNode &> >::type * = 0);
131 template <
class Factory>
132 typename Factory::result_type add(std::string
const &
name, Factory
const & factory,
133 typename boost::enable_if< boost::is_convertible<Factory*, detail::OwnedNodeFactory*> >::type * = 0);
134 template <
class Factory>
135 typename Factory::result_type add(std::string
const &
name, Factory
const & factory,
136 typename boost::enable_if< boost::is_convertible<Factory*, detail::NodeFactory*> >::type * = 0,
137 typename boost::disable_if< boost::is_convertible<Factory*, detail::OwnedNodeFactory*> >::type * = 0);
151 template <
class NodeType>
152 NodeType & add(std::string
const &
name, boost::shared_ptr<NodeType> node);
153 template <
class NodeType>
154 NodeType & add(std::string
const &
name, NodeType & node,
155 typename boost::enable_if< boost::is_convertible<NodeType &, GenericNode &> >::type * = 0);
156 template <
class Factory>
157 typename Factory::result_type add(std::string
const &
name, Factory
const & factory,
158 typename boost::enable_if< boost::is_convertible<Factory*, detail::NodeFactory*> >::type * = 0);
Internal: Marker base class for all ScopedDirectory proxies.
boost::shared_ptr< DirectoryNode > ptr
Config/console tree directory node.
boost::iterator_range< ChildMap::const_iterator > ChildrenRange
DirectoryNode member proxy.
LazyDirectory public header.
DirectoryNode & root()
Get console root node.
Config/console tree command node.
unspecified_keyword_type name
Argument name.
Config/console node tree base-class.
boost::shared_ptr< GenericNode > ptr