| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
- // All rights reserved.
- // Code licensed under the BSD License.
- // http://www.anki3d.org/LICENSE
- // WARNING: This file is auto generated.
- #include <AnKi/Script/LuaBinder.h>
- namespace anki {
- /// Pre-wrap function logi.
- static inline int pwraplogi(lua_State* l)
- {
- [[maybe_unused]] LuaUserData* ud;
- [[maybe_unused]] void* voidp;
- [[maybe_unused]] PtrSize size;
- if(LuaBinder::checkArgsCount(l, 1)) [[unlikely]]
- {
- return -1;
- }
- // Pop arguments
- const char* arg0;
- if(LuaBinder::checkString(l, 1, arg0)) [[unlikely]]
- {
- return -1;
- }
- // Call the function
- ANKI_SCRIPT_LOGI("%s", arg0);
- return 0;
- }
- /// Wrap function logi.
- static int wraplogi(lua_State* l)
- {
- int res = pwraplogi(l);
- if(res >= 0)
- {
- return res;
- }
- lua_error(l);
- return 0;
- }
- /// Pre-wrap function loge.
- static inline int pwraploge(lua_State* l)
- {
- [[maybe_unused]] LuaUserData* ud;
- [[maybe_unused]] void* voidp;
- [[maybe_unused]] PtrSize size;
- if(LuaBinder::checkArgsCount(l, 1)) [[unlikely]]
- {
- return -1;
- }
- // Pop arguments
- const char* arg0;
- if(LuaBinder::checkString(l, 1, arg0)) [[unlikely]]
- {
- return -1;
- }
- // Call the function
- ANKI_SCRIPT_LOGE("%s", arg0);
- return 0;
- }
- /// Wrap function loge.
- static int wraploge(lua_State* l)
- {
- int res = pwraploge(l);
- if(res >= 0)
- {
- return res;
- }
- lua_error(l);
- return 0;
- }
- /// Pre-wrap function logw.
- static inline int pwraplogw(lua_State* l)
- {
- [[maybe_unused]] LuaUserData* ud;
- [[maybe_unused]] void* voidp;
- [[maybe_unused]] PtrSize size;
- if(LuaBinder::checkArgsCount(l, 1)) [[unlikely]]
- {
- return -1;
- }
- // Pop arguments
- const char* arg0;
- if(LuaBinder::checkString(l, 1, arg0)) [[unlikely]]
- {
- return -1;
- }
- // Call the function
- ANKI_SCRIPT_LOGW("%s", arg0);
- return 0;
- }
- /// Wrap function logw.
- static int wraplogw(lua_State* l)
- {
- int res = pwraplogw(l);
- if(res >= 0)
- {
- return res;
- }
- lua_error(l);
- return 0;
- }
- /// Pre-wrap function logv.
- static inline int pwraplogv(lua_State* l)
- {
- [[maybe_unused]] LuaUserData* ud;
- [[maybe_unused]] void* voidp;
- [[maybe_unused]] PtrSize size;
- if(LuaBinder::checkArgsCount(l, 1)) [[unlikely]]
- {
- return -1;
- }
- // Pop arguments
- const char* arg0;
- if(LuaBinder::checkString(l, 1, arg0)) [[unlikely]]
- {
- return -1;
- }
- // Call the function
- ANKI_SCRIPT_LOGV("%s", arg0);
- return 0;
- }
- /// Wrap function logv.
- static int wraplogv(lua_State* l)
- {
- int res = pwraplogv(l);
- if(res >= 0)
- {
- return res;
- }
- lua_error(l);
- return 0;
- }
- /// Wrap the module.
- void wrapModuleLogger(lua_State* l)
- {
- LuaBinder::pushLuaCFunc(l, "logi", wraplogi);
- LuaBinder::pushLuaCFunc(l, "loge", wraploge);
- LuaBinder::pushLuaCFunc(l, "logw", wraplogw);
- LuaBinder::pushLuaCFunc(l, "logv", wraplogv);
- }
- } // end namespace anki
|