X-Git-Url: http://g0dil.de/git?p=senf.git;a=blobdiff_plain;f=senf%2FUtils%2FConsole%2FNode.cc;fp=senf%2FUtils%2FConsole%2FNode.cc;h=965b798fb59e66184073fe88d5a0d2ecfdaa1a09;hp=fcd7e66c7f2740daa6784bde4f1764d0b2b3a1ec;hb=55b4c5a3afcf821031cef2ca7089fbdfd77d513a;hpb=b2fff1b50e0010fdad28cb638987cbf88032e30e diff --git a/senf/Utils/Console/Node.cc b/senf/Utils/Console/Node.cc index fcd7e66..965b798 100644 --- a/senf/Utils/Console/Node.cc +++ b/senf/Utils/Console/Node.cc @@ -29,7 +29,6 @@ \brief Node non-inline non-template implementation */ #include "Node.hh" -#include "Node.ih" // Custom includes #include @@ -205,55 +204,6 @@ prefix_ std::string senf::console::DirectoryNode::v_shorthelp() } //-///////////////////////////////////////////////////////////////////////////////////////////////// -// senf::console::detail::NodeTraverser -#ifndef DOXYGEN - -prefix_ void senf::console::detail::NodeTraverser::operator()(std::string const & name) -{ - if (! init_) { - init_ = true; - if (name == std::string("")) { - dir_ = root_.thisptr(); - return; - } - } - if (! elt_.empty()) { - if (elt_ == "..") { - dir_ = dir_->parent(); - if (! dir_ || ! dir_->isChildOf(root_)) - dir_ = root_.thisptr(); - } - else if (elt_ != "" && elt_ != ".") { - if (! dir_->hasChild(elt_) && autocomplete_) { - DirectoryNode::ChildrenRange completions (dir_->completions(elt_)); - if (has_one_elt(completions)) - elt_ = completions.begin()->first; - } - // Why does g++ give an error on this line ???? : - // dir = dynamic_cast( dir->get(name) ).thisptr(); - DirectoryNode & d (dynamic_cast( dir_->get(elt_) )); - dir_ = d.thisptr(); - } - } - elt_ = name; -} - -prefix_ senf::console::GenericNode & senf::console::detail::NodeTraverser::node() -{ - if (elt_ != "" && elt_ != ".") { - if (! dir_->hasChild(elt_) && autocomplete_) { - DirectoryNode::ChildrenRange completions (dir_->completions(elt_)); - if (has_one_elt(completions)) - elt_ = completions.begin()->first; - } - return dir_->get(elt_); - } - else - return * dir_; -} -#endif - -//-///////////////////////////////////////////////////////////////////////////////////////////////// // senf::console::SimpleCommandNode prefix_ void senf::console::SimpleCommandNode::v_help(std::ostream & output)