GClasses

GClasses::GFunction Class Reference

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

#include <GFunction.h>

List of all members.

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.
 ~GFunction ()
double call (std::vector< double > &params)
 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.)
void set (GFunctionNode *pRoot, int expectedParams)
 This method is used internally by GFunctionParser. You don't need to call it.

Public Attributes

GFunctionNode * m_pRoot
int m_expectedParams

Detailed Description

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


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)

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.)

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

This method is used internally by GFunctionParser. You don't need to call it.


Member Data Documentation