issue #2397: Mark Application::sharedApplication as deprecated function.

This commit is contained in:
James Chen 2013-07-15 16:37:38 +08:00
parent a83cc0ff69
commit 3bdf6b9c69
20 changed files with 90 additions and 0 deletions

View File

@ -61,6 +61,12 @@ Application* Application::getInstance()
return sm_pSharedApplication; return sm_pSharedApplication;
} }
// @deprecated Use getInstance() instead
Application* Application::sharedApplication()
{
return Application::getInstance();
}
ccLanguageType Application::getCurrentLanguage() ccLanguageType Application::getCurrentLanguage()
{ {
std::string languageName = getCurrentLanguageJNI(); std::string languageName = getCurrentLanguageJNI();

View File

@ -31,6 +31,9 @@ public:
*/ */
static Application* getInstance(); static Application* getInstance();
/** @deprecated Use getInstance() instead */
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
/** /**
@brief Get current language config @brief Get current language config
@return Current language config @return Current language config

View File

@ -107,6 +107,12 @@ Application* Application::getInstance()
return sm_pSharedApplication; return sm_pSharedApplication;
} }
// @deprecated Use getInstance() instead
Application* Application::sharedApplication()
{
return Application::getInstance();
}
ccLanguageType Application::getCurrentLanguage() ccLanguageType Application::getCurrentLanguage()
{ {
ccLanguageType ret_language = kLanguageEnglish; ccLanguageType ret_language = kLanguageEnglish;

View File

@ -31,6 +31,9 @@ public:
*/ */
static Application* getInstance(); static Application* getInstance();
/** @deprecated Use getInstance() instead */
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
/** /**
@brief Get current language config @brief Get current language config
@return Current language config @return Current language config

View File

@ -99,6 +99,12 @@ Application* Application::getInstance()
return sm_pSharedApplication; return sm_pSharedApplication;
} }
// @deprecated Use getInstance() instead
Application* Application::sharedApplication()
{
return Application::getInstance();
}
ccLanguageType Application::getCurrentLanguage() ccLanguageType Application::getCurrentLanguage()
{ {
return kLanguageEnglish; return kLanguageEnglish;

View File

@ -31,6 +31,9 @@ public:
*/ */
static Application* getInstance(); static Application* getInstance();
/** @deprecated Use getInstance() instead */
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
/** /**
@brief Get current language config @brief Get current language config
@return Current language config @return Current language config

View File

@ -49,6 +49,9 @@ public:
*/ */
static Application* getInstance(); static Application* getInstance();
/** @deprecated Use getInstance() instead */
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
/** /**
@brief Callback by Director for limit FPS. @brief Callback by Director for limit FPS.
@interval The time, expressed in seconds, between current frame and next. @interval The time, expressed in seconds, between current frame and next.

View File

@ -69,6 +69,12 @@ Application* Application::getInstance()
return sm_pSharedApplication; return sm_pSharedApplication;
} }
// @deprecated Use getInstance() instead
Application* Application::sharedApplication()
{
return Application::getInstance();
}
ccLanguageType Application::getCurrentLanguage() ccLanguageType Application::getCurrentLanguage()
{ {
// get the current language and country config // get the current language and country config

View File

@ -98,6 +98,12 @@ Application* Application::getInstance()
return sm_pSharedApplication; return sm_pSharedApplication;
} }
// @deprecated Use getInstance() instead
Application* Application::sharedApplication()
{
return Application::getInstance();
}
ccLanguageType Application::getCurrentLanguage() ccLanguageType Application::getCurrentLanguage()
{ {
char *pLanguageName = getenv("LANG"); char *pLanguageName = getenv("LANG");

View File

@ -38,6 +38,9 @@ public:
*/ */
static Application* getInstance(); static Application* getInstance();
/** @deprecated Use getInstance() instead */
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
/* override functions */ /* override functions */
virtual ccLanguageType getCurrentLanguage(); virtual ccLanguageType getCurrentLanguage();

View File

@ -58,6 +58,9 @@ public:
*/ */
static Application* getInstance(); static Application* getInstance();
/** @deprecated Use getInstance() instead */
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
/** /**
@brief Get current language config @brief Get current language config
@return Current language config @return Current language config

View File

@ -75,6 +75,12 @@ Application* Application::getInstance()
return sm_pSharedApplication; return sm_pSharedApplication;
} }
// @deprecated Use getInstance() instead
Application* Application::sharedApplication()
{
return Application::getInstance();
}
ccLanguageType Application::getCurrentLanguage() ccLanguageType Application::getCurrentLanguage()
{ {
// get the current language and country config // get the current language and country config

View File

@ -136,6 +136,12 @@ Application* Application::getInstance() // MH Cocos2dx Director class expects th
return sm_pSharedApplication; // MH Cocos2dx Director class expects this to return a pointer and not a reference return sm_pSharedApplication; // MH Cocos2dx Director class expects this to return a pointer and not a reference
} }
// @deprecated Use getInstance() instead
Application* Application::sharedApplication()
{
return Application::getInstance();
}
ccLanguageType Application::getCurrentLanguage() ccLanguageType Application::getCurrentLanguage()
{ {
int nLanguageIdx; int nLanguageIdx;

View File

@ -79,6 +79,9 @@ public:
*/ */
static Application* getInstance(); // MH Cocos2dx Director class expects this to return a pointer and not a reference static Application* getInstance(); // MH Cocos2dx Director class expects this to return a pointer and not a reference
/** @deprecated Use getInstance() instead */
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
/** /**
@brief Get current language config @brief Get current language config
@return Current language config @return Current language config

View File

@ -101,6 +101,12 @@ Application* Application::getInstance()
return sm_pSharedApplication; return sm_pSharedApplication;
} }
// @deprecated Use getInstance() instead
Application* Application::sharedApplication()
{
return Application::getInstance();
}
ccLanguageType Application::getCurrentLanguage() ccLanguageType Application::getCurrentLanguage()
{ {
ccLanguageType ret = kLanguageEnglish; ccLanguageType ret = kLanguageEnglish;

View File

@ -54,6 +54,9 @@ public:
*/ */
static Application* getInstance(); static Application* getInstance();
/** @deprecated Use getInstance() instead */
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
/* override functions */ /* override functions */
virtual ccLanguageType getCurrentLanguage(); virtual ccLanguageType getCurrentLanguage();

View File

@ -78,6 +78,12 @@ Application* Application::getInstance()
return sm_pSharedApplication; return sm_pSharedApplication;
} }
// @deprecated Use getInstance() instead
Application* Application::sharedApplication()
{
return Application::getInstance();
}
ccLanguageType Application::getCurrentLanguage() ccLanguageType Application::getCurrentLanguage()
{ {
result r = E_SUCCESS; result r = E_SUCCESS;

View File

@ -59,6 +59,9 @@ public:
*/ */
static Application* getInstance(); static Application* getInstance();
/** @deprecated Use getInstance() instead */
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
/** /**
@brief Get current language config @brief Get current language config
@return Current language config @return Current language config

View File

@ -106,6 +106,12 @@ Application* Application::getInstance()
return sm_pSharedApplication; return sm_pSharedApplication;
} }
// @deprecated Use getInstance() instead
Application* Application::sharedApplication()
{
return Application::getInstance();
}
ccLanguageType Application::getCurrentLanguage() ccLanguageType Application::getCurrentLanguage()
{ {
ccLanguageType ret = kLanguageEnglish; ccLanguageType ret = kLanguageEnglish;

View File

@ -27,6 +27,9 @@ public:
*/ */
static Application* getInstance(); static Application* getInstance();
/** @deprecated Use getInstance() instead */
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
/* override functions */ /* override functions */
virtual void setAnimationInterval(double interval); virtual void setAnimationInterval(double interval);
virtual ccLanguageType getCurrentLanguage(); virtual ccLanguageType getCurrentLanguage();