X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Console%2FNode.cc;h=4886b77b8fff48ba3147323b1feb7ca03eef50e5;hb=869df8df564cd4f4934d4cd1c1b290c2aeabbd92;hp=f74a37b9741b240bf7e1b2127e97dad827ad3f02;hpb=c70f7413515b513656f850f51a3cc2ea9d776a37;p=senf.git diff --git a/Console/Node.cc b/Console/Node.cc index f74a37b..4886b77 100644 --- a/Console/Node.cc +++ b/Console/Node.cc @@ -74,6 +74,7 @@ senf::console::DirectoryNode::remove(std::string const & name) GenericNode::ptr node (i->second); children_.erase(i); node->parent_ = 0; + node->name_.clear(); return node; } @@ -116,6 +117,15 @@ prefix_ void senf::console::DirectoryNode::v_help(std::ostream & output) } /////////////////////////////////////////////////////////////////////////// +// senf::console::SyntaxErrorException + +prefix_ char const * senf::console::SyntaxErrorException::what() + const throw() +{ + return message().empty() ? "syntax error" : message().c_str(); +} + +/////////////////////////////////////////////////////////////////////////// // senf::console::SimpleCommandNode prefix_ void senf::console::SimpleCommandNode::v_help(std::ostream & output) @@ -124,6 +134,13 @@ prefix_ void senf::console::SimpleCommandNode::v_help(std::ostream & output) output << doc_ << "\n"; } +prefix_ void senf::console::SimpleCommandNode::v_execute(std::ostream & output, + ParseCommandInfo const & command) + const +{ + fn_(output, command); +} + ///////////////////////////////cc.e//////////////////////////////////////// #undef prefix_ //#include "Node.mpp"