gridripper::math::expr::StkFunc Class Reference

A function that gets its arguments from stack, and replaces them with its return value. More...

#include <StkFunc.h>

Inheritance diagram for gridripper::math::expr::StkFunc:

gridripper::math::expr::StkOp gridripper::math::expr::Expr gridripper::math::expr::StkArg gridripper::math::expr::StkConst gridripper::math::expr::StkVar

List of all members.

Public Member Functions

 StkFunc (const StkFunc &other)
 Constructs a function with the same name and number of arguments as of the one specified.
const string & getOpName () const
 Gets the function name.
int getArgCount () const
 Gets the number of arguments.
int getStackIncrement () const
 The stack increment is 1 - (number of arguments) for functions.
virtual bool equalsOp (const StkOp &other) const
 Returns true if two operations have the same name, number of arguments and stack increment.
virtual bool dependsOn (const StkOp &f) const
 Overriding methods should returns true if the operation depends on the specified function.
virtual void evalStack (GReal_t *&p) const =0
 Evaluates the stack.
virtual string getClassName () const
 Gets the class name.

Protected Member Functions

 StkFunc (const string &name, int argc)
 Constructs a function with the specified name and number of arguments.

Protected Attributes

string stkfName
 Function name.
int stkfArgc
 Number of arguments.


Detailed Description

A function that gets its arguments from stack, and replaces them with its return value.

Version:
GridRipper 0.5, 11/15/2008
Since:
GROMIT 0.2 (2001)
Author:
Peter Csizmadia

Constructor & Destructor Documentation

gridripper::math::expr::StkFunc::StkFunc ( const StkFunc other  ) 

Constructs a function with the same name and number of arguments as of the one specified.

Parameters:
other the object to copy


Member Function Documentation

const string& gridripper::math::expr::StkFunc::getOpName (  )  const [inline, virtual]

Gets the function name.

Implements gridripper::math::expr::StkOp.

int gridripper::math::expr::StkFunc::getArgCount (  )  const [inline, virtual]

Gets the number of arguments.

Implements gridripper::math::expr::StkOp.

int gridripper::math::expr::StkFunc::getStackIncrement (  )  const [inline, virtual]

The stack increment is 1 - (number of arguments) for functions.

Implements gridripper::math::expr::StkOp.

virtual bool gridripper::math::expr::StkFunc::dependsOn ( const StkOp f  )  const [inline, virtual]

Overriding methods should returns true if the operation depends on the specified function.

The default implementation always returns false.

Implements gridripper::math::expr::StkOp.

Reimplemented in gridripper::math::expr::Expr.

virtual void gridripper::math::expr::StkFunc::evalStack ( GReal_t *&  p  )  const [pure virtual]

virtual string gridripper::math::expr::StkFunc::getClassName (  )  const [inline, virtual]


Member Data Documentation

Function name.

Number of arguments.


The documentation for this class was generated from the following file:

Generated on Wed Jun 17 18:46:55 2009 for GridRipper by  doxygen 1.5.6