Nebula
Loading...
Searching...
No Matches
App::GameApplication Class Reference

#include <gameapplication.h>

Detailed Description

Nebula's default game application.

It creates and triggers the GameServer. For game features it creates the core and graphicsfeature which is used in every gamestate (such as level gamestates or only gui gamestates).

Inherits App::Application.

Classes

class  GameAppExitHandler
 

Protected Member Functions

virtual void SetupGameFeatures ()
 setup game features
 
virtual void CleanupGameFeatures ()
 cleanup game features
 
virtual void SetupAppFromCmdLineArgs ()
 setup app from cmd lines
 
 _declare_timer (GameApplicationFrameTimeAll)
 
- Protected Member Functions inherited from App::Application
void SetReturnCode (int c)
 set return code
 

Protected Attributes

Ptr< Core::CoreServercoreServer
 
Ptr< IO::GameContentServergameContentServer
 
Ptr< Resources::ResourceServerresourceServer
 
Ptr< IO::IoServerioServer
 
Ptr< IO::IoInterfaceioInterface
 
Ptr< BaseGameFeature::BaseGameFeatureUnitbaseGameFeature
 
Ptr< Game::GameServergameServer
 
GameAppExitHandler exitHandler
 
- Protected Attributes inherited from App::Application
Util::String companyName
 
Util::String appName
 
Util::String appID
 
Util::String appVersion
 
Util::CommandLineArgs args
 
bool isOpen
 
int returnCode
 

Private Member Functions

virtual __DeclareSingleton(GameApplication) public ~GameApplication ()
 destructor
 
virtual bool Open ()
 open the application
 
virtual void Close ()
 close the application
 
virtual void Run ()
 run the application
 
virtual void StepFrame ()
 step one frame
 

Static Private Attributes

static IndexT FrameIndex = -1
 

Additional Inherited Members

- Public Member Functions inherited from App::Application
 Application ()
 constructor
 
virtual ~Application ()
 destructor
 
void SetCompanyName (const Util::String &n)
 set company name
 
const Util::StringGetCompanyName () const
 get company name
 
void SetAppTitle (const Util::String &n)
 set application name
 
const Util::StringGetAppTitle () const
 get application name
 
void SetAppID (const Util::String &n)
 set application id
 
const Util::StringGetAppID () const
 get application id
 
void SetAppVersion (const Util::String &n)
 set application version
 
const Util::StringGetAppVersion () const
 get application version
 
void SetCmdLineArgs (const Util::CommandLineArgs &a)
 set command line args
 
const Util::CommandLineArgsGetCmdLineArgs () const
 get command line args
 
virtual void Exit ()
 exit the application, call right before leaving main()
 
bool IsOpen () const
 return true if app is open
 
int GetReturnCode () const
 get the return code
 

Constructor & Destructor Documentation

◆ ~GameApplication()

App::GameApplication::~GameApplication ( )
privatevirtual

destructor

Member Function Documentation

◆ _declare_timer()

App::GameApplication::_declare_timer ( GameApplicationFrameTimeAll )
protected

◆ CleanupGameFeatures()

void App::GameApplication::CleanupGameFeatures ( )
protectedvirtual

cleanup game features

Cleanup all added game features.

◆ Close()

void App::GameApplication::Close ( )
privatevirtual

close the application

Reimplemented from App::Application.

◆ Open()

bool App::GameApplication::Open ( )
privatevirtual

open the application

Reimplemented from App::Application.

◆ Run()

void App::GameApplication::Run ( )
privatevirtual

run the application

Run the application.

This method will return when the application wishes to exit.

Reimplemented from App::Application.

◆ SetupAppFromCmdLineArgs()

void App::GameApplication::SetupAppFromCmdLineArgs ( )
protectedvirtual

setup app from cmd lines

◆ SetupGameFeatures()

void App::GameApplication::SetupGameFeatures ( )
protectedvirtual

setup game features

Setup new game features which should be used by this application.

Overwride for all features which have to be used.

Make sure that features are setup ONLY in this method, since other systems might not expect otherwise.

◆ StepFrame()

void App::GameApplication::StepFrame ( )
privatevirtual

step one frame

Member Data Documentation

◆ baseGameFeature

Ptr<BaseGameFeature::BaseGameFeatureUnit> App::GameApplication::baseGameFeature
protected

◆ coreServer

Ptr<Core::CoreServer> App::GameApplication::coreServer
protected

◆ exitHandler

GameAppExitHandler App::GameApplication::exitHandler
protected

◆ FrameIndex

IndexT App::GameApplication::FrameIndex = -1
staticprivate

◆ gameContentServer

Ptr<IO::GameContentServer> App::GameApplication::gameContentServer
protected

◆ gameServer

Ptr<Game::GameServer> App::GameApplication::gameServer
protected

◆ ioInterface

Ptr<IO::IoInterface> App::GameApplication::ioInterface
protected

◆ ioServer

Ptr<IO::IoServer> App::GameApplication::ioServer
protected

◆ resourceServer

Ptr<Resources::ResourceServer> App::GameApplication::resourceServer
protected

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