From a4bce56ccaed66c984773b72f7b37a3693627c10 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Mon, 6 Jul 2015 10:37:24 +0000 Subject: [PATCH] [ci skip][AUTO]: updating luabinding & jsbinding automatically --- .../lua-bindings/auto/api/UserDefault.lua | 11 +++- .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 51 +++++++++++++++++++ .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 1 + 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/cocos/scripting/lua-bindings/auto/api/UserDefault.lua b/cocos/scripting/lua-bindings/auto/api/UserDefault.lua index 4d88d55d711e..8abf4845e018 100644 --- a/cocos/scripting/lua-bindings/auto/api/UserDefault.lua +++ b/cocos/scripting/lua-bindings/auto/api/UserDefault.lua @@ -14,6 +14,15 @@ -- @param #int value -- @return UserDefault#UserDefault self (return value: cc.UserDefault) +-------------------------------- +-- delete any value by key,
+-- param key The key to delete value.
+-- js NA +-- @function [parent=#UserDefault] deleteValueForKey +-- @param self +-- @param #char key +-- @return UserDefault#UserDefault self (return value: cc.UserDefault) + -------------------------------- -- @overload self, char, float -- @overload self, char @@ -125,7 +134,7 @@ -------------------------------- -- All supported platforms other iOS & Android and CC_PLATFORM_WINRT use xml file to save values. This function checks whether the xml file exists or not.
--- return True if the xml file exists, flase if not.
+-- return True if the xml file exists, false if not.
-- js NA -- @function [parent=#UserDefault] isXMLFileExist -- @param self diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 4508b97a5545..3518c1417ed2 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -25864,6 +25864,56 @@ int lua_cocos2dx_UserDefault_setIntegerForKey(lua_State* tolua_S) return 0; } +int lua_cocos2dx_UserDefault_deleteValueForKey(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::UserDefault* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.UserDefault",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::UserDefault*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_UserDefault_deleteValueForKey'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.UserDefault:deleteValueForKey"); arg0 = arg0_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_UserDefault_deleteValueForKey'", nullptr); + return 0; + } + cobj->deleteValueForKey(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.UserDefault:deleteValueForKey",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_UserDefault_deleteValueForKey'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_UserDefault_getFloatForKey(lua_State* tolua_S) { int argc = 0; @@ -26533,6 +26583,7 @@ int lua_register_cocos2dx_UserDefault(lua_State* tolua_S) tolua_beginmodule(tolua_S,"UserDefault"); tolua_function(tolua_S,"setIntegerForKey",lua_cocos2dx_UserDefault_setIntegerForKey); + tolua_function(tolua_S,"deleteValueForKey",lua_cocos2dx_UserDefault_deleteValueForKey); tolua_function(tolua_S,"getFloatForKey",lua_cocos2dx_UserDefault_getFloatForKey); tolua_function(tolua_S,"getBoolForKey",lua_cocos2dx_UserDefault_getBoolForKey); tolua_function(tolua_S,"setDoubleForKey",lua_cocos2dx_UserDefault_setDoubleForKey); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index e155d190fc87..e33d58090e27 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -2061,6 +2061,7 @@ int register_all_cocos2dx(lua_State* tolua_S); + #endif // __cocos2dx_h__