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

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

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 (StkFunc other)
 Constructs a function with the same name and number of arguments as of the one specified.
String getOpName ()
 Gets the function name.
int getArgCount ()
 Gets the number of arguments.
int getStackIncrement ()
 The stack increment is 1 - (number of arguments) for functions.
boolean equalsOp (StkOp other)
 Returns true if two operations have the same name, number of arguments and stack increment.
boolean dependsOn (StkOp f)
 Overriding methods should returns true if the operation depends on the specified function.
abstract void evalStack (StkPointer p)
 Evaluates the stack.
String getClassName ()
 Gets the class name.
void writeExternal (ObjectOutput out) throws java.io.IOException
 Saves object state.
void readExternal (ObjectInput in) throws java.io.IOException
 Restores object state.

Protected Member Functions

 StkFunc (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/16/2008
Since:
GROMIT 0.2 (2001)
Author:
Peter Csizmadia

Constructor & Destructor Documentation

gridripper::math::expr::StkFunc::StkFunc ( StkFunc  other  )  [inline]

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

String gridripper::math::expr::StkFunc::getOpName (  )  [inline, virtual]

Gets the function name.

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

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

Gets the number of arguments.

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

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

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

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

boolean gridripper::math::expr::StkFunc::dependsOn ( StkOp  f  )  [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.

abstract void gridripper::math::expr::StkFunc::evalStack ( StkPointer  p  )  [pure virtual]

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

void gridripper::math::expr::StkFunc::writeExternal ( ObjectOutput  out  )  throws java.io.IOException [inline]

Saves object state.

Parameters:
out the stream to write the object to
Exceptions:
IOException Includes any I/O exceptions that may occur

Reimplemented in gridripper::math::expr::StkArg, gridripper::math::expr::StkConst, and gridripper::math::expr::StkVar.

void gridripper::math::expr::StkFunc::readExternal ( ObjectInput  in  )  throws java.io.IOException [inline]

Restores object state.

Parameters:
in the stream to read data from in order to restore the object
Exceptions:
IOException if I/O errors occur

Reimplemented in gridripper::math::expr::StkArg, gridripper::math::expr::StkConst, and gridripper::math::expr::StkVar.


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:47:29 2009 for GridRipper by  doxygen 1.5.6