Zen
A cross-platform functional programming language

ContinuationImplItem Class Reference

AST Node for a continuation implementation. More...

#include <Ast.hpp>

Inheritance diagram for ContinuationImplItem:
ImplItem Node

List of all members.

Public Member Functions

 ContinuationImplItem (const int &idx, const FunctionDef &fdef, const Ast::ClosureList &closureList, const ReturnClosure &retnClosure)
 Default constructor.
z::string getUniqueName (const z::string &sep) const
 Returns the unique name for this implementation item.
const Ast::ClosureListgetClosureList () const
 Returns the closure list for this continuation.
const Ast::ReturnClosuregetReturnClosure () const
 Returns the return closure for this continuation.
const VariableRefListgetXRefList () const
 Returns the external reference list for this continuation.
void setXRefList (const VariableRefList &xRefList)
 Set the closure list for this continuation.
const InitClosuregetInitClosure () const
 Returns a reference to the first closure in the list.
const InvokerhasRoutineCall () const
 Returns a pointer to the first invoker in the list, if it is a routine.
void visitClosureList (Closure::Visitor &visitor) const
 Abstract visitor function.
virtual const
Ast::FunctionImplItem
getFunctionImplItem () const
 Returns a reference to this if this is a FunctionImplItem, else throws exception.

Private Member Functions

const InitClosuregetInitClosureP () const
 Returns a pointer to the first closure in the list.
virtual void visit (ImplItem::Visitor &visitor) const
 Abstract visitor function.

Private Attributes

VariableRefList _xRefList
 The external reference list.
const Ast::ClosureList_closureList
 The closure list.
const ReturnClosure_retnClosure
 The return closure.

Detailed Description

AST Node for a continuation implementation.

Todo:

Figure out how to merge implementation items and blocks

Redesign to replace idx with full name created by the factory itself, and eliminate getUniqueName()


Constructor & Destructor Documentation

ContinuationImplItem ( const int &  idx,
const FunctionDef fdef,
const Ast::ClosureList closureList,
const ReturnClosure retnClosure 
) [inline]

Default constructor.

Parameters:
idxThe index of this item in the list of impl items.
fdefThe function definition implemented in this item.
closureListThe list of closures in this continuation.
retnClosureThe return closure for this continuation.

Member Function Documentation

const Ast::ClosureList& getClosureList ( ) const [inline]

Returns the closure list for this continuation.

Returns:
The closure list.
virtual const Ast::FunctionImplItem& getFunctionImplItem ( ) const [inline, virtual]

Returns a reference to this if this is a FunctionImplItem, else throws exception.

Returns:
A reference to this.

Implements ImplItem.

const InitClosure& getInitClosure ( ) const [inline]

Returns a reference to the first closure in the list.

Returns:
The first closure in the list.
const InitClosure* getInitClosureP ( ) const [inline, private]

Returns a pointer to the first closure in the list.

Returns:
The first closure in the list.
const Ast::ReturnClosure& getReturnClosure ( ) const [inline]

Returns the return closure for this continuation.

Returns:
The return closure.
z::string getUniqueName ( const z::string sep) const [inline]

Returns the unique name for this implementation item.

Parameters:
sepThe separator
Returns:
The unique name.
const VariableRefList& getXRefList ( ) const [inline]

Returns the external reference list for this continuation.

Returns:
The external reference list.
const Invoker* hasRoutineCall ( ) const [inline]

Returns a pointer to the first invoker in the list, if it is a routine.

Returns:
A pointer to the first invoker in the list, if it is a routine, else 0
void setXRefList ( const VariableRefList xRefList) [inline]

Set the closure list for this continuation.

Parameters:
xRefListThe closure list.
void visit ( ImplItem::Visitor visitor) const [private, virtual]

Abstract visitor function.

Parameters:
visitorThe visitor object.

Implements ImplItem.

void visitClosureList ( Closure::Visitor visitor) const

Abstract visitor function.

Parameters:
visitorThe visitor object.

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