Skip to content

Commit

Permalink
Merge pull request cocos2d#12700 from CocosRobot/update_lua_bindings_…
Browse files Browse the repository at this point in the history
…1436178667

[ci skip][AUTO]: updating luabinding & jsbinding automatically
  • Loading branch information
zilongshanren committed Jul 6, 2015
2 parents 89d40c1 + a4bce56 commit 6005c42
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cocos/scripting/lua-bindings/auto/api/UserDefault.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
-- @param #int value
-- @return UserDefault#UserDefault self (return value: cc.UserDefault)

--------------------------------
-- delete any value by key,<br>
-- param key The key to delete value.<br>
-- 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
Expand Down Expand Up @@ -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.<br>
-- return True if the xml file exists, flase if not.<br>
-- return True if the xml file exists, false if not.<br>
-- js NA
-- @function [parent=#UserDefault] isXMLFileExist
-- @param self
Expand Down
51 changes: 51 additions & 0 deletions cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2061,6 +2061,7 @@ int register_all_cocos2dx(lua_State* tolua_S);






#endif // __cocos2dx_h__

0 comments on commit 6005c42

Please sign in to comment.