X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Console%2FNode.cci;h=0193989b31695bd22ca88b07466b4c59f1210461;hb=1863c038d0400159ce49b851a5b81c2ce698c684;hp=11d212e3d2edbb11b3e73a2484ec87b486225448;hpb=bf1d8ba5ce6fc6a169a938183f8d01c8bdbccf32;p=senf.git diff --git a/Console/Node.cci b/Console/Node.cci index 11d212e..0193989 100644 --- a/Console/Node.cci +++ b/Console/Node.cci @@ -145,6 +145,14 @@ prefix_ senf::console::DirectoryNode::ChildrenRange senf::console::DirectoryNode return boost::make_iterator_range(children_.begin(), children_.end()); } +prefix_ senf::console::DirectoryNode::ChildrenRange +senf::console::DirectoryNode::completions(std::string const & s) + const +{ + return boost::make_iterator_range(children_.lower_bound(s), + children_.lower_bound(s + "\xff")); +} + prefix_ senf::console::DirectoryNode::DirectoryNode() {} @@ -170,9 +178,19 @@ prefix_ senf::console::DirectoryNode::cptr senf::console::DirectoryNode::thisptr // senf::console::SyntaxErrorException prefix_ senf::console::SyntaxErrorException::SyntaxErrorException(std::string const & msg) - : Exception(msg) + : message_(msg) {} +prefix_ senf::console::SyntaxErrorException::~SyntaxErrorException() + throw() +{} + +prefix_ std::string const & senf::console::SyntaxErrorException::message() + const +{ + return message_; +} + /////////////////////////////////////////////////////////////////////////// // senf::console::CommandNode @@ -235,6 +253,17 @@ prefix_ senf::console::SimpleCommandNode::cptr senf::console::SimpleCommandNode: return boost::static_pointer_cast(shared_from_this()); } +#ifndef DOXYGEN + +prefix_ senf::console::SimpleCommandNode & +senf::console::senf_console_add_node(DirectoryNode & node, std::string const & name, + SimpleCommandNode::Function fn, int) +{ + return node.add(name, SimpleCommandNode::create(fn)); +} + +#endif + ///////////////////////////////cci.e/////////////////////////////////////// #undef prefix_