#include <boost/utility.hpp>
#include <boost/range/iterator_range.hpp>
#include "../Utils/Exception.hh"
+#include "Parse.hh"
//#include "Node.mpp"
///////////////////////////////hh.p////////////////////////////////////////
// Types
typedef boost::shared_ptr<GenericNode> ptr;
+ typedef boost::shared_ptr<GenericNode const> cptr;
typedef boost::weak_ptr<GenericNode> weak_ptr;
///////////////////////////////////////////////////////////////////////////
std::string path() const;
+ ptr thisptr();
+ cptr thisptr() const;
+
protected:
explicit GenericNode(std::string const & name);
// Types
typedef boost::shared_ptr<DirectoryNode> ptr;
+ typedef boost::shared_ptr<DirectoryNode const> cptr;
typedef boost::weak_ptr<DirectoryNode> weak_ptr;
typedef boost::iterator_range<ChildMap::const_iterator> ChildrenRange;
DirectoryNode & operator[](std::string const & name) const;
CommandNode & operator()(std::string const & name) const;
+ GenericNode & get(std::string const & name) const;
DirectoryNode & mkdir(std::string const & name);
ChildrenRange children() const;
+ template <class ForwardRange>
+ GenericNode & traverse(ForwardRange const & range);
+
+ ptr thisptr();
+ cptr thisptr() const;
+
protected:
explicit DirectoryNode(std::string const & name);
private:
void add(GenericNode::ptr node, bool uniquify);
- GenericNode & lookup(std::string const & name) const;
ChildMap children_;
// Types
typedef boost::shared_ptr<CommandNode> ptr;
+ typedef boost::shared_ptr<CommandNode const> cptr;
typedef boost::weak_ptr<CommandNode> weak_ptr;
///////////////////////////////////////////////////////////////////////////
+ virtual void operator()(std::ostream & output,
+ ParseCommandInfo::ArgumentsRange const & arguments) = 0;
+
+ ptr thisptr();
+ cptr thisptr() const;
+
protected:
explicit CommandNode(std::string const & name);
///////////////////////////////hh.e////////////////////////////////////////
#include "Node.cci"
-//#include "Node.ct"
+#include "Node.ct"
//#include "Node.cti"
#endif