Zen
A cross-platform functional programming language
Classes | Functions

ztl Namespace Reference

namespace for zen template library More...

Classes

class  ClosureT
 Wrapper around Closure base class. More...
class  FunctionCallClosureT
 Base class for FunctionCallClosure. More...
class  SharedClosureT
 Base class for Shared closure. More...
class  LoopClosureT
 Base class for Loop closure. More...
class  ReturnClosureT
 Base class for Return closure. More...
class  ContinuationT
 Base class for continuations. More...
class  ContinuationListT
 Base class for continuation lists. More...
class  RunContextT
 Base class for run contexts. More...
class  TestFactoryT
 Templated base class for test factories. More...

Functions

template<typename srcT , typename rtnT , typename ctxT , typename contT >
void adaptFunction (contT &cont, typename srcT::Impl::RunCtx &src, ctxT &dstCtx)
 Adapt callee continuations to caller When a function has been called from another function, take the continuations returned by the callee and adapt them to the return value of the caller. srcT: return type of callee function (eg: Test::MyCallee::Return) rtnT: return type of caller function. ctxT: RunCtx of calling function (eg: Test::MyCaller::RunCtx) contT: Continuation type in caller that wraps the callee continuations (eg Test::MyCaller::Seq1).
template<typename srcT , typename rtnT >
void adaptClosure (typename srcT::Impl::RunCtx &src, zbl::RunContext &dstCtx)
 Adapt a callee function's run context to RunContext.
template<typename srcT , typename rtnT >
void adaptNative (typename srcT::Impl::RunCtx &src)
 Enque a callee function's run context to the engine.

Detailed Description

namespace for zen template library


Function Documentation

void ztl::adaptClosure ( typename srcT::Impl::RunCtx &  src,
zbl::RunContext dstCtx 
) [inline]

Adapt a callee function's run context to RunContext.

Parameters:
srcSource run context
dstCtxDestination context to copy to
void ztl::adaptFunction ( contT &  cont,
typename srcT::Impl::RunCtx &  src,
ctxT &  dstCtx 
) [inline]

Adapt callee continuations to caller When a function has been called from another function, take the continuations returned by the callee and adapt them to the return value of the caller. srcT: return type of callee function (eg: Test::MyCallee::Return) rtnT: return type of caller function. ctxT: RunCtx of calling function (eg: Test::MyCaller::RunCtx) contT: Continuation type in caller that wraps the callee continuations (eg Test::MyCaller::Seq1).

Parameters:
contContinuation
srcSource run context
dstCtxDestination context to copy to
void ztl::adaptNative ( typename srcT::Impl::RunCtx &  src) [inline]

Enque a callee function's run context to the engine.

Parameters:
srcSource run context
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines