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

public abstract class COSARExpr extends Object
This class represents the abstract base-class for all OSAR expressions.
  • Field Details

    • m_bIsConstant

      protected boolean m_bIsConstant
      This member variable is set to true if the expression's value is constant.
  • Constructor Details

    • COSARExpr

      public COSARExpr()
  • Method Details

    • eval

      public COSARAttr eval(HashMap symbols) throws Exception
      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