Shellp
|
00001 /* 00002 00003 This file is a part of Shellp, a 'shell helper' library. 00004 00005 Copyright (C) 2011-2012 Jori Liesenborgs 00006 00007 Contact: jori.liesenborgs@gmail.com 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Lesser General Public 00011 License as published by the Free Software Foundation; either 00012 version 2.1 of the License, or (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public 00020 License along with this library; if not, write to the Free Software 00021 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 00022 USA 00023 00024 */ 00025 00026 #ifndef SHELLP_CMDEVAL_H 00027 00028 #define SHELLP_CMDEVAL_H 00029 00030 #include "shellconfig.h" 00031 #include "shellcommand.h" 00032 00033 namespace shellp 00034 { 00035 00036 class ShellCmdStringArg; 00037 class ShellCmdRealArg; 00038 00039 class SHELLP_IMPORTEXPORT CmdEval : public ShellCommand 00040 { 00041 public: 00042 CmdEval(const std::string &cmdName, bool showResult, bool store); 00043 ~CmdEval(); 00044 bool execute(); 00045 private: 00046 ShellCmdStringArg *m_pVarName; 00047 ShellCmdStringArg *m_pExpression; 00048 bool m_showResult; 00049 }; 00050 00051 class SHELLP_IMPORTEXPORT CmdEvalList : public ShellCommand 00052 { 00053 public: 00054 CmdEvalList(const std::string &cmdName); 00055 ~CmdEvalList(); 00056 bool execute(); 00057 private: 00058 void list(bool isConst, const std::vector<std::string> &names, const std::vector<double> &values); 00059 }; 00060 00061 class SHELLP_IMPORTEXPORT CmdEvalClearVar : public ShellCommand 00062 { 00063 public: 00064 CmdEvalClearVar(const std::string &cmdName); 00065 ~CmdEvalClearVar(); 00066 bool execute(); 00067 }; 00068 00069 } // end namespace 00070 00071 #endif // SHELLP_CMDEVAL_H