cocos2d-x  2.2.3-gd2.113-rev1ec524e
Loading...
Searching...
No Matches
CCApplication Class Reference

#include <CCApplication.h>

Inheritance diagram for CCApplication:
[legend]
Collaboration diagram for CCApplication:
[legend]

Public Member Functions

 CCApplication ()
 
virtual ~CCApplication ()
 
virtual void setAnimationInterval (double interval)
 Callback by CCDirector for limit FPS. More...
 
virtual ccLanguageType getCurrentLanguage ()
 Get current language config. More...
 
virtual TargetPlatform getTargetPlatform ()
 Get target platform. More...
 
CC_DEPRECATED_ATTRIBUTE void setResourceRootPath (const std::string &rootResDir)
 Sets the Resource root path. More...
 
CC_DEPRECATED_ATTRIBUTE const std::string & getResourceRootPath (void)
 Gets the Resource root path. More...
 
void setStartupScriptFilename (const std::string &startupScriptFile)
 
bool getControllerConnected () const
 
const std::string & getStartupScriptFilename (void)
 
 CCApplication ()
 
virtual ~CCApplication ()
 
int run ()
 Run the message loop. More...
 
virtual void setAnimationInterval (double interval)
 Callback by CCDirector for limit FPS. More...
 
virtual ccLanguageType getCurrentLanguage ()
 Get current language config. More...
 
virtual TargetPlatform getTargetPlatform ()
 Get target platform. More...
 
CC_DEPRECATED_ATTRIBUTE void setResourceRootPath (const std::string &rootResDir)
 Sets the Resource root path. More...
 
CC_DEPRECATED_ATTRIBUTE const std::string & getResourceRootPath (void)
 Gets the Resource root path. More...
 
void setStartupScriptFilename (const std::string &startupScriptFile)
 
const std::string & getStartupScriptFilename (void)
 
virtual void gameDidSave ()
 Run the message loop. More...
 
virtual void openURL (const char *url)
 
virtual int run ()
 
virtual void setupGLView ()
 
virtual void platformShutdown ()
 
void toggleVerticalSync (bool)
 
bool getVerticalSyncEnabled () const
 
- Public Member Functions inherited from CCApplicationProtocol
virtual ~CCApplicationProtocol ()
 
virtual bool applicationDidFinishLaunching ()=0
 Implement CCDirector and CCScene init code here. More...
 
virtual void applicationDidEnterBackground ()=0
 The function be called when the application enter background. More...
 
virtual void applicationWillEnterForeground ()=0
 The function be called when the application enter foreground. More...
 
virtual void setAnimationInterval (double interval)=0
 Callback by CCDirector for limit FPS. More...
 
virtual ccLanguageType getCurrentLanguage ()=0
 Get current language config. More...
 
virtual TargetPlatform getTargetPlatform ()=0
 Get target platform. More...
 
virtual void applicationWillBecomeActive ()
 
virtual void applicationWillResignActive ()
 
virtual void trySaveGame ()
 

Static Public Member Functions

static CCApplicationsharedApplication ()
 Get current applicaiton instance. More...
 
static CCApplicationsharedApplication ()
 Get current applicaiton instance. More...
 

Public Attributes

HINSTANCE m_hInstance
 
HACCEL m_hAccelTable
 
LARGE_INTEGER m_nAnimationInterval
 
std::string m_resourceRootPath
 
std::string m_startupScriptFilename
 

Static Public Attributes

static CCApplicationsm_pSharedApplication
 

Constructor & Destructor Documentation

◆ CCApplication() [1/2]

◆ ~CCApplication() [1/2]

virtual ~CCApplication ( )
virtual

◆ CCApplication() [2/2]

◆ ~CCApplication() [2/2]

virtual ~CCApplication ( )
virtual

Member Function Documentation

◆ gameDidSave()

virtual void gameDidSave ( )
virtual

Run the message loop.

Remarks
Added by RobTop. See RT_ADD for more info.

Reimplemented from CCApplicationProtocol.

◆ getControllerConnected()

bool getControllerConnected ( ) const

◆ getCurrentLanguage() [1/2]

virtual ccLanguageType getCurrentLanguage ( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

◆ getCurrentLanguage() [2/2]

virtual ccLanguageType getCurrentLanguage ( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

◆ getResourceRootPath() [1/2]

CC_DEPRECATED_ATTRIBUTE const std::string & getResourceRootPath ( void  )

Gets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->getSearchPaths() instead.

◆ getResourceRootPath() [2/2]

CC_DEPRECATED_ATTRIBUTE const std::string & getResourceRootPath ( void  )

Gets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->getSearchPaths() instead.

◆ getStartupScriptFilename() [1/2]

const std::string & getStartupScriptFilename ( void  )
inline

◆ getStartupScriptFilename() [2/2]

const std::string & getStartupScriptFilename ( void  )
inline

◆ getTargetPlatform() [1/2]

virtual TargetPlatform getTargetPlatform ( )
virtual

Get target platform.

Implements CCApplicationProtocol.

◆ getTargetPlatform() [2/2]

virtual TargetPlatform getTargetPlatform ( )
virtual

Get target platform.

Implements CCApplicationProtocol.

◆ getVerticalSyncEnabled()

bool getVerticalSyncEnabled ( ) const
Remarks
Added by RobTop. See RT_ADD for more info.

◆ openURL()

virtual void openURL ( const char *  url)
virtual
Remarks
Added by RobTop. See RT_ADD for more info.

Reimplemented from CCApplicationProtocol.

◆ platformShutdown()

virtual void platformShutdown ( )
virtual
Remarks
Added by RobTop. See RT_ADD for more info.

◆ run() [1/2]

virtual int run ( )
virtual
Remarks
Added by RobTop. See RT_ADD for more info.

◆ run() [2/2]

int run ( )

Run the message loop.

◆ setAnimationInterval() [1/2]

virtual void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector for limit FPS.

@interval The time, expressed in seconds, between current frame and next.

Implements CCApplicationProtocol.

◆ setAnimationInterval() [2/2]

virtual void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector for limit FPS.

@interval The time, expressed in seconds, between current frame and next.

Implements CCApplicationProtocol.

◆ setResourceRootPath() [1/2]

CC_DEPRECATED_ATTRIBUTE void setResourceRootPath ( const std::string &  rootResDir)

Sets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->setSearchPaths() instead.

◆ setResourceRootPath() [2/2]

CC_DEPRECATED_ATTRIBUTE void setResourceRootPath ( const std::string &  rootResDir)

Sets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->setSearchPaths() instead.

◆ setStartupScriptFilename() [1/2]

void setStartupScriptFilename ( const std::string &  startupScriptFile)

◆ setStartupScriptFilename() [2/2]

void setStartupScriptFilename ( const std::string &  startupScriptFile)

◆ setupGLView()

virtual void setupGLView ( )
virtual
Remarks
Added by RobTop. See RT_ADD for more info.

◆ sharedApplication() [1/2]

static CCApplication * sharedApplication ( )
static

Get current applicaiton instance.

Returns
Current application instance pointer.

◆ sharedApplication() [2/2]

static CCApplication * sharedApplication ( )
static

Get current applicaiton instance.

Returns
Current application instance pointer.

◆ toggleVerticalSync()

void toggleVerticalSync ( bool  )
Remarks
Added by RobTop. See RT_ADD for more info.

Member Data Documentation

◆ m_hAccelTable

HACCEL m_hAccelTable

◆ m_hInstance

HINSTANCE m_hInstance

◆ m_nAnimationInterval

LARGE_INTEGER m_nAnimationInterval

◆ m_resourceRootPath

std::string m_resourceRootPath

◆ m_startupScriptFilename

std::string m_startupScriptFilename

◆ sm_pSharedApplication

static CCApplication * sm_pSharedApplication
static

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