Function Class Reference

Function abstract class. More...

#include <Function.hpp>

Inheritance diagram for Function:

Grammar FAdd FArgument FConst FDiv FMul FSub GOp List of all members.

Public Member Functions

void addArgument (Result *pres)
void clearArguments ()
virtual std::string toString (Context &context)

Protected Attributes

std::vector< Result * > vpresArguments

Detailed Description

Function abstract class.

Author:
Stephen E. Baker
Date:
2006-2007
Version:
1.0
Classes which extend this class are grammar terminals. Unlike other grammar symbols these appear in the phenotype (actual program) and perform some form of calculation.


Member Function Documentation

void Function::addArgument ( Result pres  ) 

Add an argument to the function, for example in addion each of the values to be added together would be specified with this function.

Parameters:
[in] pres An argument for the function.
See also:
Result

void Function::clearArguments (  ) 

Removes all the arguments. This should be called by the parent symbol after executing the function

string Function::toString ( Context context  )  [virtual]

Adds the functions strGrammarID to the string representation of the program.

See also:
Grammar::strGrammarID

Grammar::toString

Implements Grammar.

Reimplemented in GOp.


Member Data Documentation

std::vector<Result*> Function::vpresArguments [protected]

The arguments to be used in the funtion.


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