X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Console%2FExecutor.hh;h=189eece2c3702e6c7ac93b614fd86dff3db03681;hb=16d94efc2159cba35fc44e5b26747ae0a2ab237b;hp=08da10f150741f331f77056c342b6b0e14efe808;hpb=d620e7ff9b68377ea20ca266c23cc3f05781868c;p=senf.git diff --git a/Console/Executor.hh b/Console/Executor.hh index 08da10f..189eece 100644 --- a/Console/Executor.hh +++ b/Console/Executor.hh @@ -27,8 +27,10 @@ #define HH_Executor_ 1 // Custom includes +#include #include "Parse.hh" #include "../Utils/Logger/SenfLog.hh" +#include "Node.hh" //#include "Executor.mpp" ///////////////////////////////hh.p//////////////////////////////////////// @@ -39,6 +41,7 @@ namespace console { /** \brief */ class Executor + : boost::noncopyable { SENF_LOG_CLASS_AREA(); SENF_LOG_DEFAULT_LEVEL( senf::log::NOTICE ); @@ -51,20 +54,37 @@ namespace console { struct ExitException {}; // NOT derived from std::exception ! /////////////////////////////////////////////////////////////////////////// + //\/name Structors and default members + ///\{ + Executor(); + + ///\} + /////////////////////////////////////////////////////////////////////////// + bool operator()(ParseCommandInfo const & command, std::ostream & output); - + DirectoryNode & cwd() const; + protected: private: + DirectoryNode & traverseTo(ParseCommandInfo::argument_value_type const & path); + CommandNode & traverseToCommand(ParseCommandInfo::CommandPathRange const & path); + + struct InvalidDirectoryException {}; + struct InvalidCommandException {}; + DirectoryNode::weak_ptr cwd_; + DirectoryNode::weak_ptr oldCwd_; + typedef std::vector DirStack; + DirStack dirstack_; }; }} ///////////////////////////////hh.e//////////////////////////////////////// -//#include "Executor.cci" +#include "Executor.cci" //#include "Executor.ct" //#include "Executor.cti" #endif