FIFE  2008.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
FIFE::Engine Class Reference

#include <engine.h>

Collaboration diagram for FIFE::Engine:
Collaboration graph

Public Member Functions

 Engine ()
 
virtual ~Engine ()
 
EngineSettingsgetSettings ()
 
const DeviceCaps & getDeviceCaps () const
 
void changeScreenMode (const ScreenMode &mode)
 
void init ()
 
void destroy ()
 
void initializePumping ()
 
void finalizePumping ()
 
void pump ()
 
SoundManager * getSoundManager () const
 
EventManagergetEventManager () const
 
TimeManagergetTimeManager () const
 
void setGuiManager (IGUIManager *guimanager)
 
IGUIManager * getGuiManager () const
 
ImageManagergetImageManager () const
 
SoundClipManagergetSoundClipManager () const
 
RenderBackendgetRenderBackend () const
 
ModelgetModel () const
 
LogManagergetLogManager () const
 
VFSgetVFS () const
 
CursorgetCursor () const
 
OffRenderer * getOffRenderer () const
 
TargetRenderer * getTargetRenderer () const
 
void addChangeListener (IEngineChangeListener *listener)
 
void removeChangeListener (IEngineChangeListener *listener)
 

Detailed Description

Engine acts as a controller to the whole system Responsibilities of the engine are:

  • Construct and initialize engine internals
  • Clean-up when the program ends
  • Act as an entry point to the engine subsystems

Definition at line 79 of file engine.h.

Constructor & Destructor Documentation

FIFE::Engine::Engine ( )

Constructor

Definition at line 91 of file engine.cpp.

References FIFE::LogManager::instance().

FIFE::Engine::~Engine ( )
virtual

Destructor

Definition at line 293 of file engine.cpp.

References destroy().

Member Function Documentation

void FIFE::Engine::addChangeListener ( IEngineChangeListener *  listener)

Adds new change listener

Parameters
listenerto add

Definition at line 364 of file engine.cpp.

void FIFE::Engine::changeScreenMode ( const ScreenMode &  mode)

Changes the screen mode. This should be called instead of the renderer's setScreenMode() function. It takes care of any objects that need to be re-created after switching screen modes.

Parameters
modeA valid ScreenMode retrieved from FIFE::DeviceCaps::getNearestScreenMode()

Definition at line 132 of file engine.cpp.

References FIFE::RenderBackend::setScreenMode().

void FIFE::Engine::destroy ( )

Explicit destruction of engine

Definition at line 299 of file engine.cpp.

Referenced by ~Engine().

Here is the caller graph for this function:

void FIFE::Engine::finalizePumping ( )

Finalizes the continuous processing of the engine Call this only once in your program, after you have called initializePumping + (pump() * N times)

Definition at line 360 of file engine.cpp.

Cursor* FIFE::Engine::getCursor ( ) const
inline

Returns cursor used in the engine

Definition at line 177 of file engine.h.

const DeviceCaps & FIFE::Engine::getDeviceCaps ( ) const

Gets device capabilities

Definition at line 128 of file engine.cpp.

EventManager* FIFE::Engine::getEventManager ( ) const
inline

Provides access point to the EventManager

Definition at line 135 of file engine.h.

IGUIManager* FIFE::Engine::getGuiManager ( ) const
inline

Provides access point to the GUI Manager

Definition at line 149 of file engine.h.

ImageManager* FIFE::Engine::getImageManager ( ) const
inline

Provides access point to the ImageManager

Definition at line 153 of file engine.h.

LogManager* FIFE::Engine::getLogManager ( ) const
inline

Provides access point to the LogManager

Definition at line 169 of file engine.h.

Model* FIFE::Engine::getModel ( ) const
inline

Provides access point to the Model

Definition at line 165 of file engine.h.

OffRenderer* FIFE::Engine::getOffRenderer ( ) const
inline

Provides access point to the OffRenderer

Definition at line 181 of file engine.h.

RenderBackend* FIFE::Engine::getRenderBackend ( ) const
inline

Provides access point to the RenderBackend

Definition at line 161 of file engine.h.

EngineSettings & FIFE::Engine::getSettings ( )

Gets settings class for engine

Definition at line 124 of file engine.cpp.

SoundClipManager* FIFE::Engine::getSoundClipManager ( ) const
inline

Provides access point to the SoundClipManager

Definition at line 157 of file engine.h.

SoundManager* FIFE::Engine::getSoundManager ( ) const
inline

Provides access point to the SoundManager

Definition at line 131 of file engine.h.

TargetRenderer* FIFE::Engine::getTargetRenderer ( ) const
inline

Provides access point to the TargetRenderer

Definition at line 185 of file engine.h.

TimeManager* FIFE::Engine::getTimeManager ( ) const
inline

Provides access point to the TimeManager

Definition at line 139 of file engine.h.

VFS* FIFE::Engine::getVFS ( ) const
inline

Provides access point to the VFS

Definition at line 173 of file engine.h.

void FIFE::Engine::initializePumping ( )

Initializes the continuous processing of the engine Call this only once in your program

Definition at line 335 of file engine.cpp.

References FIFE::EventManager::processEvents().

void FIFE::Engine::removeChangeListener ( IEngineChangeListener *  listener)

Removes associated change listener

Parameters
listenerto remove

Definition at line 368 of file engine.cpp.

void FIFE::Engine::setGuiManager ( IGUIManager *  guimanager)
inline

Sets the GUI Manager to use. Engine takes ownership of the manager so DONT DELETE IT!

Definition at line 145 of file engine.h.


The documentation for this class was generated from the following files: