| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- /*
- ** Lua binding: LuaScript
- ** Generated automatically by tolua++-1.0.92 on 06/30/13 11:31:52.
- */
- //
- // Copyright (c) 2008-2013 the Urho3D project.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a copy
- // of this software and associated documentation files (the "Software"), to deal
- // in the Software without restriction, including without limitation the rights
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- // copies of the Software, and to permit persons to whom the Software is
- // furnished to do so, subject to the following conditions:
- //
- // The above copyright notice and this permission notice shall be included in
- // all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- // THE SOFTWARE.
- //
- #include "Precompiled.h"
- #include "tolua++.h"
- /* Exported function */
- TOLUA_API int tolua_LuaScript_open (lua_State* tolua_S);
- #define TOLUA_RELEASE
- #include "LuaScript.h"
- using namespace Urho3D;
- #pragma warning(disable:4800)
- /* function to register type */
- static void tolua_reg_types (lua_State* tolua_S)
- {
- }
- /* function: SubscribeToEvent */
- #ifndef TOLUA_DISABLE_tolua_LuaScript_SubscribeToEvent00
- static int tolua_LuaScript_SubscribeToEvent00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isstring(tolua_S,1,0,&tolua_err) ||
- !tolua_isstring(tolua_S,2,0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const char* eventType = ((const char*) tolua_tostring(tolua_S,1,0));
- const char* funcName = ((const char*) tolua_tostring(tolua_S,2,0));
- {
- SubscribeToEvent(eventType,funcName);
- }
- }
- return 0;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'SubscribeToEvent'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* Open function */
- TOLUA_API int tolua_LuaScript_open (lua_State* tolua_S)
- {
- tolua_open(tolua_S);
- tolua_reg_types(tolua_S);
- tolua_module(tolua_S,NULL,0);
- tolua_beginmodule(tolua_S,NULL);
- tolua_function(tolua_S,"SubscribeToEvent",tolua_LuaScript_SubscribeToEvent00);
- tolua_endmodule(tolua_S);
- return 1;
- }
- #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
- TOLUA_API int luaopen_LuaScript (lua_State* tolua_S) {
- return tolua_LuaScript_open(tolua_S);
- };
- #endif
|