Zen
A cross-platform functional programming language

Engine Class Reference

Engine class. More...

#include <zrt.hpp>

List of all members.

Classes

class  Impl
 Engine implementation class. More...

Public Types

enum  Mode { mNone, mHelp, mRun, mTest }
 

The mode in which engine is running.

More...

Public Member Functions

 Engine (int argc, char *argv[])
 Default constructor.
 ~Engine ()
 Destructor.
const ModegetMode () const
 Get current engine mode.
int init (int argc, char *argv[])
 Initialize the engine.
int exit ()
 Exit the engine.
int pump ()
 Pump current fibers in engine.
void enque (RunContext &ctx)
 Enque a run context.
void registerOnExit (Continuation *continuation)
 Register a continuation to run on exit.

Private Attributes

Impl_impl
 Instance of private implementation class.

Detailed Description

Engine class.


Member Enumeration Documentation

enum Mode

The mode in which engine is running.

Enumerator:
mHelp 

Default value.

mRun 

Help mode.

mTest 

Run mode (usual case)


Constructor & Destructor Documentation

Engine ( int  argc,
char *  argv[] 
)

Default constructor.

Parameters:
argcArgument count
argvArgument list

Member Function Documentation

void enque ( zbl::RunContext ctx)

Enque a run context.

Parameters:
ctxThe run context to enque
int exit ( )

Exit the engine.

Returns:
0 on success, else error value
const zbl::Engine::Mode & getMode ( ) const

Get current engine mode.

Returns:
Engine mode
int init ( int  argc,
char *  argv[] 
)

Initialize the engine.

Parameters:
argcArgument count
argvArgument list
Returns:
0 on success, else error value
int pump ( )

Pump current fibers in engine.

Returns:
0 on success, else error value
void registerOnExit ( zbl::Continuation continuation)

Register a continuation to run on exit.

Parameters:
continuationThe continuation to run on exit

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