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

#include <application.h>

Detailed Description

Provides a simple application model for Nebula apps.

Inherited by App::ConsoleApplication, App::GameApplication, and App::RenderApplication.

Public Member Functions

 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 bool Open ()
 open the application
 
virtual void Close ()
 close the application
 
virtual void Exit ()
 exit the application, call right before leaving main()
 
virtual void Run ()
 run the application, return when user wants to exit
 
bool IsOpen () const
 return true if app is open
 
int GetReturnCode () const
 get the return code
 

Protected Member Functions

void SetReturnCode (int c)
 set return code
 

Protected Attributes

Util::String companyName
 
Util::String appName
 
Util::String appID
 
Util::String appVersion
 
Util::CommandLineArgs args
 
bool isOpen
 
int returnCode
 

Private Member Functions

 __DeclareSingleton (Application)
 

Constructor & Destructor Documentation

◆ Application()

App::Application::Application ( )

constructor

◆ ~Application()

App::Application::~Application ( )
virtual

destructor

Member Function Documentation

◆ __DeclareSingleton()

App::Application::__DeclareSingleton ( Application )
private

◆ Close()

void App::Application::Close ( )
virtual

◆ Exit()

void App::Application::Exit ( )
virtual

exit the application, call right before leaving main()

This method must be called right before the main() function's end.

It will properly cleanup the Nebula runtime, its static objects, private heaps and finally produce a refcount leak and mem leak report (debug builds only).

◆ GetAppID()

const Util::String & App::Application::GetAppID ( ) const
inline

get application id

◆ GetAppTitle()

const Util::String & App::Application::GetAppTitle ( ) const
inline

get application name

◆ GetAppVersion()

const Util::String & App::Application::GetAppVersion ( ) const
inline

get application version

◆ GetCmdLineArgs()

const Util::CommandLineArgs & App::Application::GetCmdLineArgs ( ) const
inline

get command line args

◆ GetCompanyName()

const Util::String & App::Application::GetCompanyName ( ) const
inline

get company name

◆ GetReturnCode()

int App::Application::GetReturnCode ( ) const
inline

get the return code

◆ IsOpen()

bool App::Application::IsOpen ( ) const
inline

return true if app is open

◆ Open()

bool App::Application::Open ( )
virtual

◆ Run()

void App::Application::Run ( )
virtual

run the application, return when user wants to exit

Reimplemented in App::GameApplication, and App::RenderApplication.

◆ SetAppID()

void App::Application::SetAppID ( const Util::String & n)
inline

set application id

◆ SetAppTitle()

void App::Application::SetAppTitle ( const Util::String & n)
inline

set application name

◆ SetAppVersion()

void App::Application::SetAppVersion ( const Util::String & n)
inline

set application version

◆ SetCmdLineArgs()

void App::Application::SetCmdLineArgs ( const Util::CommandLineArgs & a)
inline

set command line args

◆ SetCompanyName()

void App::Application::SetCompanyName ( const Util::String & n)
inline

set company name

◆ SetReturnCode()

void App::Application::SetReturnCode ( int c)
inlineprotected

set return code

Member Data Documentation

◆ appID

Util::String App::Application::appID
protected

◆ appName

Util::String App::Application::appName
protected

◆ appVersion

Util::String App::Application::appVersion
protected

◆ args

Util::CommandLineArgs App::Application::args
protected

◆ companyName

Util::String App::Application::companyName
protected

◆ isOpen

bool App::Application::isOpen
protected

◆ returnCode

int App::Application::returnCode
protected

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