X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Console%2FExecutor.hh;h=bc3ce99f20609905114dbdcb11bc127c920a24b7;hb=31fb20bd535cd2d65595a7d37bd100ff16f13df8;hp=08da10f150741f331f77056c342b6b0e14efe808;hpb=d620e7ff9b68377ea20ca266c23cc3f05781868c;p=senf.git diff --git a/Console/Executor.hh b/Console/Executor.hh index 08da10f..bc3ce99 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,33 @@ 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: + bool chdir(ParseCommandInfo::argument_value_type const & path); + 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