Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

sXElem Struct Reference

#include <cpar.h>

List of all members.

Public Methods

void operator= (int _i)
void operator= (long _l)
void operator= (double _d)
void operator= (cPar *_p)
void operator= (cPar &_r)
void operator= (MathFuncNoArg _f)
void operator= (MathFunc1Arg _f)
void operator= (MathFunc2Args _f)
void operator= (MathFunc3Args _f)
void operator= (char _op)


Detailed Description

sXElem: one component in a (reversed Polish) expression in a cPar.

If the value of the cPar is of expression type, the expression must be converted to reversed Polish form. The reversed Polish form expression is stored in a vector of sXElem structures. sXElem is not a descendant of cObject.

NOTE: not a cObject descendant!


Member Function Documentation

void sXElem::operator= ( char _op ) [inline]
 

Operation. During evaluation of the expression, two items (or three, with '?') are popped out of the stack, the given operator is applied to them and the result is pushed back on the stack.

The operation can be:

  • + - * / add, subtract, multiply, divide
  • % ^ modulo, power of
  • = ! equal, not equal
  • > } greater, greater or equal
  • < { less, less or equal
  • ? inline if (the C/C++ ?: operator)

void sXElem::operator= ( MathFunc3Args _f ) [inline]
 

The argument can be a pointer to a function that takes (0, 1, 2, or 3) double arguments and returns a double (e.g. sqrt()). Effect during evaluation of the expression: the given number of doubles are popped from the stack, the given function is called with them as arguments, and the return value is pushed back on the stack. See also the cFunctionType class and the Define_Function() macro.

The OMNeT++ functions generating random variables of different distributions can also be used in sXElem expressions.

void sXElem::operator= ( MathFunc2Args _f ) [inline]
 

The argument can be a pointer to a function that takes (0, 1, 2, or 3) double arguments and returns a double (e.g. sqrt()). Effect during evaluation of the expression: the given number of doubles are popped from the stack, the given function is called with them as arguments, and the return value is pushed back on the stack. See also the cFunctionType class and the Define_Function() macro.

The OMNeT++ functions generating random variables of different distributions can also be used in sXElem expressions.

void sXElem::operator= ( MathFunc1Arg _f ) [inline]
 

The argument can be a pointer to a function that takes (0, 1, 2, or 3) double arguments and returns a double (e.g. sqrt()). Effect during evaluation of the expression: the given number of doubles are popped from the stack, the given function is called with them as arguments, and the return value is pushed back on the stack. See also the cFunctionType class and the Define_Function() macro.

The OMNeT++ functions generating random variables of different distributions can also be used in sXElem expressions.

void sXElem::operator= ( MathFuncNoArg _f ) [inline]
 

The argument can be a pointer to a function that takes (0, 1, 2, or 3) double arguments and returns a double (e.g. sqrt()). Effect during evaluation of the expression: the given number of doubles are popped from the stack, the given function is called with them as arguments, and the return value is pushed back on the stack. See also the cFunctionType class and the Define_Function() macro.

The OMNeT++ functions generating random variables of different distributions can also be used in sXElem expressions.

void sXElem::operator= ( cPar & _r ) [inline]
 

Effect during evaluation of the expression: takes the value of the cPar object (a double) and pushes the value on the evaluation stack. The cPar which evaluates this expression will copy the cPar for itself.

void sXElem::operator= ( cPar * _p ) [inline]
 

Effect during evaluation of the expression: takes the value of the cPar object (a double) and pushes the value on the evaluation stack. The cPar is an "external" one: its ownership does not change. This is how NED-language REF parameters in expressions are handled.

void sXElem::operator= ( double _d ) [inline]
 

Effect during evaluation of the expression: pushes the given number (which is converted to double) on the evaluation stack.

void sXElem::operator= ( long _l ) [inline]
 

Effect during evaluation of the expression: pushes the given number (which is converted to double) on the evaluation stack.

void sXElem::operator= ( int _i ) [inline]
 

Effect during evaluation of the expression: pushes the given number (which is converted to double) on the evaluation stack.


The documentation for this struct was generated from the following file:
Generated at Sat May 4 15:45:52 2002 for OMNeT++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001