Context Class Reference

#include <Context.hpp>

List of all members.

Public Member Functions

 Context ()
void clear ()
void setArgumentValue (std::string strArgument, Result *resValue)
ResultgetArgumentValue (std::string strArgument)
std::vector< std::string > getKeys () const


Detailed Description

program execution context or machine
Author:
Stephen E. Baker
Date:
2006-2007
Version:
1.0
This class allows you to pass values to arguments in the execution phase of an individual. It may easily be extended to allow programs to use side-effects in their execution.


Constructor & Destructor Documentation

Context::Context (  ) 

Creates a new context


Member Function Documentation

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.

Parameters:
[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));

Parameters:
[in] strArgument The key or formal parameter
[in] resValue The value or actual parameter
See also:
Result


The documentation for this class was generated from the following files:
Generated on Mon Jan 15 01:21:04 2007 for Creatively Named Grammar Guided Genetic Programming System by  doxygen 1.4.7