#include <Context.hpp>
Public Member Functions | |
Context () | |
void | clear () |
void | setArgumentValue (std::string strArgument, Result *resValue) |
Result * | getArgumentValue (std::string strArgument) |
std::vector< std::string > | getKeys () const |
Context::Context | ( | ) |
Creates a new context
void Context::clear | ( | ) |
Removes all argument/value pairs from the context. If the context has been extended to allow side-effects, this method should restore it to it's original state
Result* Context::getArgumentValue | ( | std::string | strArgument | ) |
Returns the value or actual parameter matching the given key.
[in] | strArgument | The key or formal parameter to match up against |
vector< string > Context::getKeys | ( | ) | const |
Returns a vector of all the keys or formal parameters included in the context
void Context::setArgumentValue | ( | std::string | strArgument, | |
Result * | resValue | |||
) |
Give the context an argument value pair, to be passed into the program. For example if the program contained the argument "x", and you wanted x to be interpreted as 10 you would pass in setArgumentValue("x", new Result(10));
[in] | strArgument | The key or formal parameter |
[in] | resValue | The value or actual parameter |