Zen
A cross-platform functional programming language
Public Member Functions | Private Attributes

ExprEvaluator Class Reference

Class that converts expression values. More...

Inheritance diagram for ExprEvaluator:
Expr::Visitor

List of all members.

Public Member Functions

 ExprEvaluator ()
 Default constructor.
const z::stringgetStringValue () const
 Returns the string value obtained by visiting the expression.
const int & getIntValue () const
 Returns the int value obtained by visiting the expression.
const bool & getBoolValue () const
 Returns the boolean value obtained by visiting the expression.
virtual void visit (const Ast::TernaryOpExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::BinaryOpExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::PrefixOpExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::PostfixOpExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::OrderedExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::IndexExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::ListExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::DictExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::TreeExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::QueryExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::QueryPartExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::QueryBinaryExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::QueryValExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::QueryConstantExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::TypeDefExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::StructExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::StructInitExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::FunctionExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::ListTemplateExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::DictTemplateExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::StringFormatExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::VariableRefExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::EnumRefExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::InternalCallExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::InvokerCallExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::FunctionCallExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::FunctionImplExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::FunctionDefImplExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::AnyExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::CastExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::NumericConstantExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::BooleanConstantExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::CharConstantExpr &expr)
 Abstract visitor function.
virtual void visit (const Ast::StringConstantExpr &expr)
 Abstract visitor function.

Private Attributes

z::string _stringValue
 String value converted from expression.
int _intValue
 Int value converted from expression.
bool _boolValue
 Boolean value converted from expression.

Detailed Description

Class that converts expression values.


Member Function Documentation

const bool& getBoolValue ( ) const [inline]

Returns the boolean value obtained by visiting the expression.

Returns:
Reference to boolean value
const int& getIntValue ( ) const [inline]

Returns the int value obtained by visiting the expression.

Returns:
Reference to int value
const z::string& getStringValue ( ) const [inline]

Returns the string value obtained by visiting the expression.

Returns:
Reference to string value
virtual void visit ( const Ast::BooleanConstantExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::NumericConstantExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::CastExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::AnyExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::FunctionDefImplExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::FunctionImplExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::FunctionCallExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::InvokerCallExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::InternalCallExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::EnumRefExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::VariableRefExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::StringFormatExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::DictTemplateExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::ListTemplateExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::FunctionExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::StructInitExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::StructExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::TypeDefExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::QueryConstantExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::QueryValExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::QueryBinaryExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::QueryPartExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::QueryExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::TreeExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::DictExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::ListExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::IndexExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::OrderedExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::PostfixOpExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::PrefixOpExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::BinaryOpExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::TernaryOpExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::StringConstantExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.

virtual void visit ( const Ast::CharConstantExpr expr) [inline, virtual]

Abstract visitor function.

Parameters:
exprThe expression reference to handle

Implements Expr::Visitor.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines