Package com.nt.udc.io
Class COSARExpr
java.lang.Object
com.nt.udc.io.COSARExpr
- Direct Known Subclasses:
COSARExprAnd,COSARExprBinaryNumOp,COSARExprConcat,COSARExprDouble,COSARExprFunc,COSARExprHex2Dec,COSARExprID,COSARExprInt,COSARExprLen,COSARExprNot,COSARExprOr,COSARExprPos,COSARExprRandom,COSARExprRelationalNumOp,COSARExprStr2Time,COSARExprString,COSARExprSubstr,COSARExprTest,COSARExprTime2Str,COSARExprTimeNow,COSARExprUnaryMinus
This class represents the abstract base-class for all
OSAR expressions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanThis member variable is set to true if the expression's value is constant. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis function is used to evaluate the expression.final boolean
-
Field Details
-
m_bIsConstant
protected boolean m_bIsConstantThis member variable is set to true if the expression's value is constant.
-
-
Constructor Details
-
COSARExpr
public COSARExpr()
-
-
Method Details
-
eval
This function is used to evaluate the expression. A symbol table is passed to help in retrieving the value of referenced symbols. The HashMap should contain values stored as COSARAttr objects, keyed by their associated symbol's name.- Returns:
- The expression's value
- Throws:
Exception
-
isConstant
public final boolean isConstant()- Returns:
- true if the expression is constant
-