Go to the documentation of this file.
83 const std::string& name,
const DataObject& value) {
84 VariableMap::iterator iter =
variables_.find(name);
104 VariableMap::iterator iter =
variables_.find(name);
106 object.setString((*iter).second);
121 if (commandLine !=
"") {
125 if (custCommand == NULL) {
127 string msg =
"Unknown command: " + commands[0];
133 vector<DataObject> args;
134 for (
unsigned int i = 0; i < commands.size(); i++) {
142 res = custCommand->
execute(args);
virtual DataObject variable(const std::string &name)
VariableMap variables_
Holds all the variables given to interpreter.
virtual std::string result()
InterpreterContext * context_
Context for interpreter.
virtual std::string stringValue() const
virtual ~SimpleScriptInterpreter()
virtual InterpreterContext & context() const
virtual void initialize(int argc, char *argv[], InterpreterContext *context, LineReader *reader)
virtual void addCustomCommandToInterpreter(const CustomCommand &command)
virtual bool execute(const std::vector< DataObject > &arguments)=0
#define assert(condition)
virtual void setLineReader(LineReader *reader)
virtual CustomCommand * customCommand(const std::string &commandName)
std::string errorMessage() const
virtual void setResult(DataObject *result)
virtual void removeCustomCommandFromInterpreter(const CustomCommand &command)
virtual void setVariableToInterpreter(const std::string &name, const DataObject &value)
SimpleScriptInterpreter()
virtual bool interpret(const std::string &commandLine)
virtual void setError(bool state)
virtual void setResultToInterpreter(const DataObject &value)
virtual void setString(std::string value)