Zen
A cross-platform functional programming language

SharedClosure Class Reference

AST Node representing a closure that holds all variables. More...

#include <Ast.hpp>

Inheritance diagram for SharedClosure:
Closure Node

List of all members.

Public Member Functions

 SharedClosure (const VariableRefList &xRefList, const Ast::VariableDef &vdef, const Ast::SharedDef &sharedList)
 Default constructor.
const VariableDefgetDef () const
 Returns the variable that holds the return value of this closure.
const Ast::SharedDefgetSharedList () const
 Returns the list of shared variables.

Private Member Functions

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

Private Attributes

const Ast::VariableDef_vdef
 The variable identifying the closure.
const Ast::SharedDef_sharedList
 The shared variable list.

Detailed Description

AST Node representing a closure that holds all variables.


Constructor & Destructor Documentation

SharedClosure ( const VariableRefList xRefList,
const Ast::VariableDef vdef,
const Ast::SharedDef sharedList 
) [inline]

Default constructor.

Parameters:
xRefListThe list of external variables referenced by this closure.
vdefThe variable that uniquely identifies this closure in the continuation.
sharedListThe list of variables shared between all closures in parent continuation

Member Function Documentation

const VariableDef& getDef ( ) const [inline]

Returns the variable that holds the return value of this closure.

Returns:
The variable identifying the closure
const Ast::SharedDef& getSharedList ( ) const [inline]

Returns the list of shared variables.

Returns:
The shared variable list
void visit ( Visitor visitor) const [private, virtual]

Abstract visitor function.

Parameters:
visitorThe visitor object.

Implements Closure.


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