Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

Core Class Reference

#include <core.h>

Collaboration diagram for Core:

Collaboration graph
[legend]
List of all members.

Detailed Description

Core engine object.

Author:
Mattias Jansson


Public Types

enum  BYTEORDER { BYTEORDER_LITTLEENDIAN, BYTEORDER_BIGENDIAN }
 Byte order of system. More...


Public Member Functions

virtual ~Core ()
int Initialize (int iArgs, char **ppszArgs)
int Shutdown ()
InputDeviceCreateInputDevice (const std::string &rstrName, RenderDevice *pkRenderDevice=0, InputManager *pkInputManager=0)
void DeleteInputDevice (InputDevice *pkDevice)
RenderDeviceCreateRenderDevice (const std::string &rstrName, FileManager *pkFileManager=0, InputManager *pkInputManager=0)
void DeleteRenderDevice (RenderDevice *pkDevice)
RenderDeviceSetRenderDevice (RenderDevice *pkDevice)
FileManagerGetFileManager ()
InputManagerGetInputManager ()
FontManagerGetFontManager ()
MaterialTableGetMaterialManager ()
MeshPoolGetMeshManager ()
RoomManagerGetRoomManager ()
void InitializeTerrain (const std::string &rstrName)
TerrainManagerGetTerrainManager ()
ProfileManagerGetProfileManager ()
ConsoleGetConsole ()
ConfigGetConfig ()
RenderDeviceGetRenderDevice ()
LogSinkGetStdoutSink ()
void SetConsole (Console *pkConsole)

Static Public Member Functions

ModuleManagerGetModuleManager ()
CoreGet ()

Public Attributes

int m_iHasMMX
int m_iHasFXSR
int m_iHasSSE
int m_iHasSSE2
int m_iHas3DNow
int m_iHas3DNowEx

Static Public Attributes

const BYTEORDER BYTEORDER_SYSTEM

Protected Member Functions

 Core ()

Protected Attributes

FileManagerm_pkFileManager
InputManagerm_pkInputManager
MaterialTablem_pkMaterialManager
MeshPoolm_pkMeshManager
RoomManagerm_pkRoomManager
TerrainManagerm_pkTerrainManager
TerrainPrivate * m_pkTerrainPrivate
FontManagerm_pkFontManager
ProfileManagerm_pkProfileManager
Consolem_pkConsole
Configm_pkConfig
RenderDevicem_pkRenderDevice
LogSinkm_pkStdoutSink

Static Protected Attributes

ModuleManagers_pkModuleManager

Static Private Attributes

NE_STATIC Cores_pkSingleton


Member Enumeration Documentation

enum BYTEORDER
 

Byte order of system.

Enumeration values:
BYTEORDER_LITTLEENDIAN  System is little endian (x86)
BYTEORDER_BIGENDIAN  System is big endian (ppc)


Constructor & Destructor Documentation

Core  )  [protected]
 

Prevent outside allocations

virtual ~Core  )  [virtual]
 


Member Function Documentation

int Initialize int  iArgs,
char **  ppszArgs
 

Initialize engine. Setup core object and services

Parameters:
iArgs Number of arguments in command line argument array
ppszArgs Command line argument array
Returns:
Error code

int Shutdown  ) 
 

Shutdown engine. Deallocates core object and services

Returns:
Error code

InputDevice* CreateInputDevice const std::string &  rstrName,
RenderDevice pkRenderDevice = 0,
InputManager pkInputManager = 0
 

Create new input device. You must use this method to create a new input device, it will automatically try to load the needed module if not already loaded and call the needed initialization methods. Unless you do your own housekeeping with your own input managers (i.e not the core objects) you should not pass any arguments for these but let them remain as default values, null. This will cause the device to use the core manager objects.

Parameters:
rstrName Device name
pkRenderDevice Render device from which the window will be used. If this parameter is null (default), the core render device will be used
pkInputManager Input manager to link to (render device is also an input device). If this parameter is null (default), the core input manager will be used
Returns:
Pointer to new input device, null if failed

void DeleteInputDevice InputDevice pkDevice  ) 
 

Delete input device object. You must use this methods to delete an input device, since it calls the needed shutdown methods and correctly frees the loadable module if it is no longer needed. Failure to do so will result in resource leaks and/or strange crashes.

Parameters:
pkDevice Input device to delete

RenderDevice* CreateRenderDevice const std::string &  rstrName,
FileManager pkFileManager = 0,
InputManager pkInputManager = 0
 

Create new render device (will set render device pointer in core). You must use this method to create a new render device, it will automatically try to load the needed module if not already loaded and call the needed initialization methods. Unless you do your own housekeeping with your own file and input managers (i.e not the core objects) you should not pass any arguments for these but let them remain as default values, null. This will cause the device to use the core manager objects.

Parameters:
rstrName Device name
pkFileManager File manager used by device to locate textures and other resource files. If this parameter is null (default), the core file manager will be used
pkInputManager Input manager to link to (render device is also an input device). If this parameter is null (default), the core input manager will be used
Returns:
Pointer to new render device, null if failed

void DeleteRenderDevice RenderDevice pkDevice  ) 
 

Delete render device object. You must use this methods to delete a render device, since it calls the needed shutdown methods and correctly frees the loadable module if it is no longer needed. Failure to do so will result in resource leaks and/or strange crashes.

Parameters:
pkDevice Render device to delete

RenderDevice* SetRenderDevice RenderDevice pkDevice  ) 
 

Set the render device pointer in the core. Useful if you have a multi-device application

Parameters:
pkDevice New active core render device
Returns:
Old render device

ModuleManager* GetModuleManager  )  [static]
 

Returns:
Module manager

FileManager* GetFileManager  )  [inline]
 

Returns:
File manager

InputManager* GetInputManager  )  [inline]
 

Returns:
Input manager

FontManager* GetFontManager  )  [inline]
 

Returns:
Font manager

MaterialTable* GetMaterialManager  )  [inline]
 

Returns:
Material manager

MeshPool* GetMeshManager  )  [inline]
 

Returns:
Mesh blueprint manager

RoomManager* GetRoomManager  )  [inline]
 

Returns:
Room manager

void InitializeTerrain const std::string &  rstrName  ) 
 

Parameters:
Terrain type;

TerrainManager* GetTerrainManager  )  [inline]
 

Returns:
Terrain manager

ProfileManager* GetProfileManager  )  [inline]
 

Returns:
Profile manager

Console* GetConsole  )  [inline]
 

Returns:
Console

Config* GetConfig  )  [inline]
 

Returns:
Configuration repository

RenderDevice* GetRenderDevice  )  [inline]
 

Returns:
Render device

LogSink* GetStdoutSink  )  [inline]
 

Returns:
stdout sink object

void SetConsole Console pkConsole  ) 
 

Set a new core console object. Old console object will be deleted

Parameters:
pkConsole New core console object

Core* Get  )  [inline, static]
 

Access the singleton core object

Returns:
Core object


Member Data Documentation

const BYTEORDER BYTEORDER_SYSTEM [static]
 

System byte order

int m_iHasMMX
 

Flag indicating MMX support in CPU

int m_iHasFXSR
 

Flag indicating FXSR support in CPU

int m_iHasSSE
 

Flag indicating SSE support in CPU

int m_iHasSSE2
 

Flag indicating SSE2 support in CPU

int m_iHas3DNow
 

Flag indicating 3DNow! support in CPU

int m_iHas3DNowEx
 

Flag indicating 3DNowEx! support in CPU

NE_STATIC Core* s_pkSingleton [static, private]
 

Singleton object

ModuleManager* s_pkModuleManager [static, protected]
 

Module manager

FileManager* m_pkFileManager [protected]
 

File manager

InputManager* m_pkInputManager [protected]
 

Input manager

MaterialTable* m_pkMaterialManager [protected]
 

Material manager

MeshPool* m_pkMeshManager [protected]
 

Mesh blueprint manager

RoomManager* m_pkRoomManager [protected]
 

Room manager

TerrainManager* m_pkTerrainManager [protected]
 

Terrain manager

TerrainPrivate* m_pkTerrainPrivate [protected]
 

Terrain private stuff

FontManager* m_pkFontManager [protected]
 

Font manager

ProfileManager* m_pkProfileManager [protected]
 

Profile manager

Console* m_pkConsole [protected]
 

Console

Config* m_pkConfig [protected]
 

Configuration repository

RenderDevice* m_pkRenderDevice [protected]
 

Render device

LogSink* m_pkStdoutSink [protected]
 

stdout sink object


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:11 2004 for NeoEngine by doxygen 1.3.5