cocos2d-x  2.2
•All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCApplication Class Referenceabstract

#include <CCApplication.h>

Inheritance diagram for CCApplication:
CCApplicationProtocol CCApplicationProtocol CCApplicationProtocol CCApplicationProtocol CCApplicationProtocol CCApplicationProtocol CCApplicationProtocol CCApplicationProtocol CCApplicationProtocol CCApplicationProtocol CCApplicationProtocol

Public Member Functions

 CCApplication ()
virtual ~CCApplication ()
void setAnimationInterval (double interval)
 Callback by CCDirector to limit FPS. More...
 
int run ()
 Run the message loop. More...
 
virtual ccLanguageType getCurrentLanguage ()
 Get current language config. More...
 
virtual TargetPlatform getTargetPlatform ()
 Get target platform. More...
 
 CCApplication ()
virtual ~CCApplication ()
void setAnimationInterval (double interval)
 Callback by CCDirector for limit FPS. More...
 
int run ()
 Run the message loop. 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...
 
 CCApplication ()
virtual ~CCApplication ()
void setAnimationInterval (double interval)
 Callback by CCDirector for limit FPS. More...
 
int run ()
 Run the message loop. 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...
 
 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...
 
 CCApplication ()
virtual ~CCApplication ()
void setAnimationInterval (double interval)
 Callback by CCDirector for limit FPS. More...
 
int run ()
 Run the message loop. More...
 
virtual ccLanguageType getCurrentLanguage ()
 Get current language config. 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...
 
virtual TargetPlatform getTargetPlatform ()
 Get target platform. More...
 
 CCApplication ()
virtual ~CCApplication ()
virtual void setAnimationInterval (double interval)
 Callback by CCDirector for limit FPS. More...
 
int run ()
 Get status bar rectangle in EGLView window. 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)
 CCApplication ()
virtual ~CCApplication ()
virtual bool applicationDidFinishLaunching ()=0
 Implement CCDirector and sense 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...
 
void setAnimationInterval (double interval)
 Callback by CCDirector for limit FPS. More...
 
virtual int Run ()
 Run the message loop. More...
 
void ccAccelerationUpdate ()
ccLanguageType getCurrentLanguage ()
 Get current language config. More...
 
TargetPlatform getTargetPlatform ()
 Get target platform. More...
 
 CCApplication ()
virtual ~CCApplication ()
void setAnimationInterval (double interval)
 Callback by CCDirector for limit FPS. More...
 
int run ()
 Run the message loop. More...
 
virtual ccLanguageType getCurrentLanguage ()
 Get current language config. More...
 
virtual TargetPlatform getTargetPlatform ()
 Get target platform. More...
 
 CCApplication ()
virtual ~CCApplication ()
void setAnimationInterval (double interval)
 Callback by CCDirector to limit FPS. More...
 
long getAnimationInterval ()
int run ()
 Run the message loop. More...
 
virtual ccLanguageType getCurrentLanguage ()
 Get current language config. More...
 
virtual TargetPlatform getTargetPlatform ()
 Get target platform. More...
 
 CCApplication ()
virtual ~CCApplication ()
virtual 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)
 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)
- Public Member Functions inherited from CCApplicationProtocol
virtual ~CCApplicationProtocol ()

Static Public Member Functions

static CCApplicationsharedApplication ()
 Get current application instance. More...
 
static CCApplicationsharedApplication ()
 Get current applicaiton instance. More...
 
static CCApplicationsharedApplication ()
 Get current applicaiton instance. More...
 
static CCApplicationsharedApplication ()
 Get the current application instance. More...
 
static CCApplicationsharedApplication ()
 Get current applicaiton instance. More...
 
static CCApplicationsharedApplication ()
 Get current applicaiton instance. More...
 
static CCApplicationsharedApplication ()
 Get current applicaiton instance. More...
 
static CCApplicationsharedApplication ()
 Get current applicaiton instance. More...
 
static bool isRunning ()
static CCApplicationsharedApplication ()
 Get current application instance. More...
 
static CCApplicationsharedApplication ()
 Get current applicaiton instance. More...
 
static CCApplicationsharedApplication ()
 Get current applicaiton instance. More...
 

Protected Attributes

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

Static Protected Attributes

static CCApplicationsm_pSharedApplication
static long m_animationInterval
static bool s_running
static long m_nAnimationInterval

Constructor & Destructor Documentation

virtual ~CCApplication ( )
virtual
virtual ~CCApplication ( )
virtual
virtual ~CCApplication ( )
virtual
virtual ~CCApplication ( )
virtual
virtual ~CCApplication ( )
virtual
virtual ~CCApplication ( )
virtual
virtual ~CCApplication ( )
virtual
virtual ~CCApplication ( )
virtual
virtual ~CCApplication ( )
virtual
virtual ~CCApplication ( )
virtual
virtual ~CCApplication ( )
virtual

Member Function Documentation

virtual void
applicationDidEnterBackground
( )
pure virtual

The function be called when the application enter background.

Parameters
thepointer of the application

Implements CCApplicationProtocol.

virtual bool
applicationDidFinishLaunching
( )
pure virtual

Implement CCDirector and sense init code here.

Returns
true Initialize success, app continue.
false Initialize failed, app terminate.

Implements CCApplicationProtocol.

virtual void
applicationWillEnterForeground
( )
pure virtual

The function be called when the application enter foreground.

Parameters
thepointer of the application

Implements CCApplicationProtocol.

void ccAccelerationUpdate ( )
long getAnimationInterval ( )
virtual ccLanguageType
getCurrentLanguage
( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

virtual ccLanguageType
getCurrentLanguage
( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

virtual ccLanguageType
getCurrentLanguage
( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

virtual ccLanguageType
getCurrentLanguage
( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

virtual ccLanguageType
getCurrentLanguage
( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

virtual ccLanguageType
getCurrentLanguage
( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

virtual ccLanguageType
getCurrentLanguage
( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

virtual ccLanguageType
getCurrentLanguage
( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

virtual ccLanguageType
getCurrentLanguage
( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

virtual ccLanguageType
getCurrentLanguage
( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

ccLanguageType getCurrentLanguage ( )
virtual

Get current language config.

Returns
Current language config

Implements CCApplicationProtocol.

CC_DEPRECATED_ATTRIBUTE const
std::string&
getResourceRootPath
( void  )

Gets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->getSearchPaths() instead.
CC_DEPRECATED_ATTRIBUTE const
std::string&
getResourceRootPath
( void  )

Gets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->getSearchPaths() instead.
CC_DEPRECATED_ATTRIBUTE const
std::string&
getResourceRootPath
( void  )

Gets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->getSearchPaths() instead.
CC_DEPRECATED_ATTRIBUTE const
std::string&
getResourceRootPath
( void  )

Gets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->getSearchPaths() instead.
CC_DEPRECATED_ATTRIBUTE const
std::string&
getResourceRootPath
( void  )

Gets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->getSearchPaths() instead.
CC_DEPRECATED_ATTRIBUTE const
std::string&
getResourceRootPath
( void  )

Gets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->getSearchPaths() instead.
const std::string&
getStartupScriptFilename
( void  )
inline
const std::string&
getStartupScriptFilename
( void  )
inline
const std::string&
getStartupScriptFilename
( void  )
virtual TargetPlatform
getTargetPlatform
( )
virtual

Get target platform.

Implements CCApplicationProtocol.

virtual TargetPlatform
getTargetPlatform
( )
virtual

Get target platform.

Implements CCApplicationProtocol.

virtual TargetPlatform
getTargetPlatform
( )
virtual

Get target platform.

Implements CCApplicationProtocol.

virtual TargetPlatform
getTargetPlatform
( )
virtual

Get target platform.

Implements CCApplicationProtocol.

virtual TargetPlatform
getTargetPlatform
( )
virtual

Get target platform.

Implements CCApplicationProtocol.

virtual TargetPlatform
getTargetPlatform
( )
virtual

Get target platform.

Implements CCApplicationProtocol.

virtual TargetPlatform
getTargetPlatform
( )
virtual

Get target platform.

Implements CCApplicationProtocol.

virtual TargetPlatform
getTargetPlatform
( )
virtual

Get target platform.

Implements CCApplicationProtocol.

virtual TargetPlatform
getTargetPlatform
( )
virtual

Get target platform.

Implements CCApplicationProtocol.

virtual TargetPlatform
getTargetPlatform
( )
virtual

Get target platform.

Implements CCApplicationProtocol.

TargetPlatform getTargetPlatform ( )
virtual

Get target platform.

Implements CCApplicationProtocol.

static bool isRunning ( )
inlinestatic
virtual int run ( )
virtual

Run the message loop.

int run ( )

Run the message loop.

int run ( )

Run the message loop.

int run ( )

Run the message loop.

int run ( )

Run the message loop.

int run ( )

Run the message loop.

int run ( )

Run the message loop.

int run ( )

Run the message loop.

int run ( )

Get status bar rectangle in EGLView window.

Run the message loop.

int run ( )

Run the message loop.

virtual int Run ( )
virtual

Run the message loop.

void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector to limit FPS.

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

Implements CCApplicationProtocol.

void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector for limit FPS.

The time, which expressed in second in second, between current frame and next.

Implements CCApplicationProtocol.

void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector for limit FPS.

The time, which expressed in second in second, between current frame and next.

Implements CCApplicationProtocol.

void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector for limit FPS.

The time, which expressed in second in second, between current frame and next.

Implements CCApplicationProtocol.

virtual void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector for limit FPS.

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

Implements CCApplicationProtocol.

void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector for limit FPS.

The time, which expressed in second in second, between current frame and next.

Implements CCApplicationProtocol.

virtual void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector for limit FPS.

The time, which expressed in second in second, between current frame and next.

Implements CCApplicationProtocol.

void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector to limit FPS.

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

Implements CCApplicationProtocol.

virtual void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector for limit FPS.

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

Implements CCApplicationProtocol.

virtual void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector for limit FPS.

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

Implements CCApplicationProtocol.

void setAnimationInterval ( double  interval)
virtual

Callback by CCDirector for limit FPS.

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

Implements CCApplicationProtocol.

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

Sets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->setSearchPaths() instead.
CC_DEPRECATED_ATTRIBUTE void
setResourceRootPath
( const std::string &  rootResDir)

Sets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->setSearchPaths() instead.
CC_DEPRECATED_ATTRIBUTE void
setResourceRootPath
( const std::string &  rootResDir)

Sets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->setSearchPaths() instead.
CC_DEPRECATED_ATTRIBUTE void
setResourceRootPath
( const std::string &  rootResDir)

Sets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->setSearchPaths() instead.
CC_DEPRECATED_ATTRIBUTE void
setResourceRootPath
( const std::string &  rootResDir)

Sets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->setSearchPaths() instead.
CC_DEPRECATED_ATTRIBUTE void
setResourceRootPath
( const std::string &  rootResDir)

Sets the Resource root path.

Deprecated:
Please use CCFileUtils::sharedFileUtils()->setSearchPaths() instead.
void setStartupScriptFilename ( const std::string &  startupScriptFile)
void setStartupScriptFilename ( const std::string &  startupScriptFile)
void setStartupScriptFilename ( const std::string &  startupScriptFile)
static CCApplication*
sharedApplication
( )
static

Get current applicaiton instance.

Returns
Current application instance pointer.
static CCApplication*
sharedApplication
( )
static

Get current application instance.

Returns
Current application instance pointer.
static CCApplication*
sharedApplication
( )
static

Get current applicaiton instance.

Returns
Current application instance pointer.
static CCApplication*
sharedApplication
( )
static

Get current applicaiton instance.

Returns
Current application instance pointer.
static CCApplication*
sharedApplication
( )
static

Get current applicaiton instance.

Returns
Current application instance pointer.
static CCApplication*
sharedApplication
( )
static

Get current applicaiton instance.

Returns
Current application instance pointer.
static CCApplication*
sharedApplication
( )
static

Get current applicaiton instance.

Returns
Current application instance pointer.
static CCApplication*
sharedApplication
( )
static

Get the current application instance.

Returns
Current application instance pointer.
static CCApplication*
sharedApplication
( )
static

Get current applicaiton instance.

Returns
Current application instance pointer.
static CCApplication*
sharedApplication
( )
static

Get current application instance.

Returns
Current application instance pointer.
static CCApplication*
sharedApplication
( )
static

Get current applicaiton instance.

Returns
Current application instance pointer.

Member Data Documentation

static long m_animationInterval
staticprotected
HACCEL m_hAccelTable
protected
HINSTANCE m_hInstance
protected
LARGE_INTEGER m_nAnimationInterval
protected
LARGE_INTEGER m_nAnimationInterval
protected
long m_nAnimationInterval
staticprotected
uint64 m_nAnimationInterval
protected
std::string m_resourceRootPath
protected
std::string m_startupScriptFilename
protected
bool s_running
staticprotected
static CCApplication
* sm_pSharedApplication
staticprotected

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