A cross-platform functional programming language

EnumRefExpr Class Reference

Concrete class for AST Node representing a reference to an enum member. More...

#include <Ast.hpp>

Inheritance diagram for EnumRefExpr:
Expr Node

List of all members.

Public Member Functions

 EnumRefExpr (const QualifiedType &type, const Ast::EnumDef &enumDef, const z::string &id)
 Default constructor.
const EnumDefgetEnumDef () const
 Returns the refered enum.
const z::stringgetId () const
 Returns the referred member id.

Private Member Functions

virtual void visit (Expr::Visitor &visitor) const
 Abstract visitor function.

Private Attributes

const EnumDef_enumDef
const z::string _id

Detailed Description

Concrete class for AST Node representing a reference to an enum member.

For example:

        enum OpenMode {Read, Write};
        local y = OpenMode.Read;

Here, y is assigned the value of OpenMode.Read.

Constructor & Destructor Documentation

EnumRefExpr ( const QualifiedType type,
const Ast::EnumDef enumDef,
const z::string id 
) [inline]

Default constructor.

typeExpression type
enumDefThe AST Node holding the parent EnumDef.
idThe id of the enum member this node refers to.

Member Function Documentation

const EnumDef& getEnumDef ( ) const [inline]

Returns the refered enum.

The referred enum node
const z::string& getId ( ) const [inline]

Returns the referred member id.

The enum member id.
void visit ( Expr::Visitor visitor) const [private, virtual]

Abstract visitor function.

visitorThe visitor object.

Implements Expr.

Member Data Documentation

const EnumDef& _enumDef [private]
The referred enum
const z::string _id [private]
The enum member id.

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