ls1-MarDyn
ls1-MarDyn molecular dynamics code
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
Expression Class Reference

Classes

class  Node
 
class  NodeConstant
 
class  NodeFunction
 
class  NodeFunctionVarSet
 
class  NodeOperation2
 
class  NodeVariable
 
class  Value
 
class  Variable
 
class  VariableGroup
 
class  VariableSet
 

Public Types

enum  Evaltype { valtypeNONE , valtypeINT , valtypeFLOAT }
 
enum  Etraversetype { traversetypePREFIX , traversetypeINFIX , traversetypePOSTFIX }
 
typedef long Tint
 
typedef double Tfloat
 
typedef enum Evaltype Tvaltype
 
typedef enum Etraversetype Ttraversetype
 

Public Member Functions

 Expression (const std::string &label=std::string(), VariableSet *varset=NULL)
 
 Expression (const Expression &expr)
 
void clear ()
 
void setLabel (const std::string &label)
 
const std::string & getLabel () const
 
void initializeRPN (const std::string &exprstr, bool genlabel=true)
 
Expressionoperator= (const Expression &rhs)
 
bool isEmpty () const
 
bool isInt () const
 
bool isFloat () const
 
Tfloat evaluateFloat () const
 
Tint evaluateInt () const
 
VariableSetgetVariableSet ()
 
VariablegetVariable (const std::string &name)
 
unsigned int VariablesCount () const
 
bool existVariable (const std::string &name) const
 
unsigned int VariableGroupsCount () const
 
bool existVariableGroup (const std::string &name) const
 
void writeExpr (std::ostream &ostrm=std::cout, enum Etraversetype traversetype=traversetypePOSTFIX, char sep=' ') const
 
 operator std::string () const
 
void genLabel ()
 

Protected Attributes

Node_rootnode
 
std::string _label
 
VariableSet_variableset
 
bool _variablesetcreated
 

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