Zen
A cross-platform functional programming language

CallClosure Class Reference

AST Nodes representing closures that call functions at the start of a continuation. More...

#include <Ast.hpp>

Inheritance diagram for CallClosure:
InitClosure Closure Node

List of all members.

Public Member Functions

 CallClosure (const VariableRefList &xRefList, const Ast::VariableDef &vdef, const Ast::Invoker &invoker)
 Default constructor.
const VariableDefgetDef () const
 Returns the variable that holds the return value of this closure.
const InvokergetInvoker () const
 Returns the invoker for this closure.

Private Member Functions

virtual void visit (Visitor &visitor) const
 Abstract visitor function.
virtual const Ast::QualifiedTypegetOutType () const
 Returns the out-param type for init closures.

Private Attributes

const Ast::VariableDef_vdef
 The variable identifying the closure.
const Ast::Invoker_invoker
 The closure invoker.

Detailed Description

AST Nodes representing closures that call functions at the start of a continuation.

See also:
FunctionCallClosure
Todo:
Accept qtype as ctor parameter, and eliminate getOutType() pure virtual function from InitClosure

Constructor & Destructor Documentation

CallClosure ( const VariableRefList xRefList,
const Ast::VariableDef vdef,
const Ast::Invoker invoker 
) [inline]

Default constructor.

Parameters:
xRefListThe list of external variables referenced by this closure.
vdefThe variable that uniquely identifies this closure in the continuation.
invokerThe invocation (function, functor, etc) that gets called within the closure.

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 Invoker& getInvoker ( ) const [inline]

Returns the invoker for this closure.

Returns:
The closure invoker
virtual const Ast::QualifiedType& getOutType ( ) const [inline, private, virtual]

Returns the out-param type for init closures.

Returns:
The closure out-param

Implements InitClosure.

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