Zen
A cross-platform functional programming language

Engine::Impl Class Reference

Engine implementation class. More...

List of all members.

Public Member Functions

 Impl (Engine &engine, int argc, char *argv[])
 Default constructor.
 ~Impl ()
 Destructor.
const ModegetMode () const
 Get engine run mode.
int parse (int argc, char *argv[])
 Parse command line parameters.
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 Member Functions

void enqueContinuation (Continuation *cn, RunQueue &q)
 Enque continuation.
int enqueTests ()
 Enque tests.

Private Attributes

zbl::TestResult _tr
 Tes result.
z::application _app
 Application instance.
zbl::Engine::Mode _mode
 Run mode.
z::stringlist _testCase
 List of test cases to run.
int _wthreads
 Number of threads to run.
RunQueue _runQue
 The run queue.
RunQueue _exitQue
 The exit queue.

Detailed Description

Engine implementation class.


Constructor & Destructor Documentation

Impl ( Engine engine,
int  argc,
char *  argv[] 
) [inline]

Default constructor.

Parameters:
engineThe Engine instance
argcArgument count
argvArgument list

Member Function Documentation

void enque ( RunContext ctx) [inline]

Enque a run context.

Parameters:
ctxThe run context to enque
void enqueContinuation ( Continuation cn,
RunQueue q 
) [inline, private]

Enque continuation.

Parameters:
cnContinuation to enqueue
qThe queue to enqueue to.
int enqueTests ( ) [inline, private]

Enque tests.

Returns:
0 on success, error code on error
int exit ( ) [inline]

Exit the engine.

Returns:
0 on success, else error value
const Mode& getMode ( ) const [inline]

Get engine run mode.

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

Initialize the engine.

Parameters:
argcArgument count
argvArgument list
Returns:
0 on success, else error value
int parse ( int  argc,
char *  argv[] 
) [inline]

Parse command line parameters.

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

Pump current fibers in engine.

Returns:
0 on success, else error value
void registerOnExit ( Continuation continuation) [inline]

Register a continuation to run on exit.

Parameters:
continuationThe continuation to run on exit

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