From e248d3eb11b330a286d45fb0ea4c1c0387d85132 Mon Sep 17 00:00:00 2001 From: randomdan Date: Mon, 18 Mar 2013 18:58:21 +0000 Subject: Add simple pwd variable --- project2/common/variables/pwd.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 project2/common/variables/pwd.cpp diff --git a/project2/common/variables/pwd.cpp b/project2/common/variables/pwd.cpp new file mode 100644 index 0000000..8a80dd0 --- /dev/null +++ b/project2/common/variables/pwd.cpp @@ -0,0 +1,20 @@ +#include +#include "../variables.h" +#include "../scriptLoader.h" +#include + +/// Variable implementation to access session contents +class Pwd : public VariableImplDyn { + public: + Pwd(ScriptNodePtr e) : + VariableImplDyn(e) + { + } + VariableType value() const + { + return boost::filesystem::current_path().string(); + } +}; +DECLARE_COMPONENT_LOADER("pwd", Pwd, VariableLoader); + + -- cgit v1.2.3