Engine Class Reference
[Engine Module]

#include <engine.h>

List of all members.


Detailed Description

Main class of engine.

Registers all available modules, creates core servers and runs given game.

Public Member Functions

 Engine ()
virtual ~Engine ()
bool Open (int argc, char *argv[])
bool Run (const char *game_class, const string &title, void(*game_module)(void)=NULL)
void Close ()

Protected Attributes

bool opened
 Whether engine is opened.
KernelServerkernel_server
 Shortcut to kernel server.


Constructor & Destructor Documentation

Engine::Engine (  ) 

Constructor.

Engine::~Engine (  )  [virtual]

Destructor.


Member Function Documentation

bool Engine::Open ( int  argc,
char *  argv[] 
)

Starts engine. First all core servers are created (KernelServer, FileServer and ScriptServer) and all available modules are registered. Then main script (app:setup.lua) is processed. In these script are created all servers that we will use. Logging into standart output is also enabled.

Parameters:
argc Number of arguments.
argv Array of argumetns that are given to executable file.
Returns:
True if successful.

bool Engine::Run ( const char *  game_class,
const string &  title,
void(*)(void)  game_module = NULL 
)

Creates and runs game object of given class name. If game module is presented, this module will be registered first.

Parameters:
game_class Class name of game object.
title Game title.
game_module Pointer to game module.
Returns:
True if successful.

void Engine::Close (  ) 

Stops engine. Releases kernel server (with all servers and objects in NOH).


Member Data Documentation

bool Engine::opened [protected]

Whether engine is opened.

KernelServer* Engine::kernel_server [protected]

Shortcut to kernel server.


The documentation for this class was generated from the following files:
Generated on Sat Oct 20 14:47:31 2007 for Dark Oberon by  doxygen 1.5.3