Zen
A cross-platform functional programming language
|
Base class for Implementation item nodes. More...
#include <Ast.hpp>
Classes | |
class | Visitor |
ImplItem Visitor interface class. More... | |
Public Member Functions | |
const int & | getIndex () const |
Returns the unique index for this item. | |
const Ast::FunctionDef & | getFunctionDef () const |
Returns the FunctionDef of the function this item is implementing. | |
virtual void | visit (Visitor &visitor) const =0 |
Visitor pattern implementation. | |
virtual const Ast::FunctionImplItem & | getFunctionImplItem () const =0 |
Returns a reference to this if this is a FunctionImplItem, else throws exception. | |
Protected Member Functions | |
ImplItem (const int &idx, const Ast::FunctionDef &fdef) | |
Default constructor. | |
Private Attributes | |
const int | _idx |
Unique index for this item. | |
const Ast::FunctionDef & | _fdef |
Definition of function beging implemented. |
Base class for Implementation item nodes.
Every ImplItem has a numeric index that identifies it uniquely and is used to ensure that there is no naming conflicts.
ImplItem | ( | const int & | idx, |
const Ast::FunctionDef & | fdef | ||
) | [inline, protected] |
Default constructor.
idx | The index of this item in the list of impl items. |
fdef | The function definition implemented in this item. |
const Ast::FunctionDef& getFunctionDef | ( | ) | const [inline] |
Returns the FunctionDef of the function this item is implementing.
virtual const Ast::FunctionImplItem& getFunctionImplItem | ( | ) | const [pure virtual] |
Returns a reference to this if this is a FunctionImplItem, else throws exception.
Implemented in ContinuationImplItem, RoutineImplItem, FunctionImplItem, GrammarImplItem, and WindowImplItem.
const int& getIndex | ( | ) | const [inline] |
Returns the unique index for this item.
virtual void visit | ( | Visitor & | visitor | ) | const [pure virtual] |
Visitor pattern implementation.
visitor | The visitor object. |
Implemented in ContinuationImplItem, RoutineImplItem, FunctionImplItem, GrammarImplItem, and WindowImplItem.