stx::Grammar::PNCastExpr Class Reference

Parse tree node handling type conversions within the tree. More...

Inheritance diagram for stx::Grammar::PNCastExpr:

stx::ParseNode List of all members.

Public Member Functions

 PNCastExpr (const ParseNode *_operand, AnyScalar::attrtype_t _type)
 Constructor from the parser: operand subnode and the cast type as recognized by AnyScalar.
virtual ~PNCastExpr ()
 Recursively delete parse tree.
virtual AnyScalar evaluate (const class SymbolTable &st) const
 Recursive calculation of the value and subsequent casting via AnyScalar's convertType method.
virtual bool evaluate_const (AnyScalar *dest) const
 Returns false because this node isn't always constant.
virtual std::string toString () const
 c-like representation of the cast

Private Attributes

const ParseNodeoperand
 Child tree of which the return value should be casted.
AnyScalar::attrtype_t type
 AnyScalar type to cast the value to.

Detailed Description

Parse tree node handling type conversions within the tree.

Definition at line 631 of file ExpressionParser.cc.


Constructor & Destructor Documentation

stx::Grammar::PNCastExpr::PNCastExpr ( const ParseNode _operand,
AnyScalar::attrtype_t  _type 
) [inline]

Constructor from the parser: operand subnode and the cast type as recognized by AnyScalar.

Definition at line 643 of file ExpressionParser.cc.


Member Function Documentation

virtual AnyScalar stx::Grammar::PNCastExpr::evaluate ( const class SymbolTable st  )  const [inline, virtual]

Recursive calculation of the value and subsequent casting via AnyScalar's convertType method.

Implements stx::ParseNode.

Definition at line 656 of file ExpressionParser.cc.

References stx::AnyScalar::convertType(), stx::ParseNode::evaluate(), operand, and type.


The documentation for this class was generated from the following file:
Generated on Tue Jul 17 16:51:58 2007 for STX Expression Parser by  doxygen 1.5.2