GClasses
GClasses::GFunction Class Reference

Detailed Description

This class represents a math function. (It might be used, for example, in a plotting tool.)

#include <GFunction.h>

Public Member Functions

 GFunction (GFunctionNode *pRoot, int expectedParams)
 This constructor is used internally by GFunctionParser. Typically you will call GFunctionParser::GetFunction to obtain a pointer to one of these. More...
 
 ~GFunction ()
 
double call (std::vector< double > &params, GFunctionParser &parser)
 Calls the function and returns the results. (This does not check that the right number of parameters are passed in, so be sure that the number of parameters matches m_expectedParams before you call this method.) More...
 

Public Attributes

int m_expectedParams
 
GFunctionNode * m_pRoot
 

Constructor & Destructor Documentation

GClasses::GFunction::GFunction ( GFunctionNode *  pRoot,
int  expectedParams 
)

This constructor is used internally by GFunctionParser. Typically you will call GFunctionParser::GetFunction to obtain a pointer to one of these.

GClasses::GFunction::~GFunction ( )

Member Function Documentation

double GClasses::GFunction::call ( std::vector< double > &  params,
GFunctionParser parser 
)

Calls the function and returns the results. (This does not check that the right number of parameters are passed in, so be sure that the number of parameters matches m_expectedParams before you call this method.)

Member Data Documentation

int GClasses::GFunction::m_expectedParams
GFunctionNode* GClasses::GFunction::m_pRoot