您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ tolua_pushboolean函数代码示例

51自学网 2021-06-03 08:55:16
  C++
这篇教程C++ tolua_pushboolean函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中tolua_pushboolean函数的典型用法代码示例。如果您正苦于以下问题:C++ tolua_pushboolean函数的具体用法?C++ tolua_pushboolean怎么用?C++ tolua_pushboolean使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了tolua_pushboolean函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: lua_cocos2dx_spine_SkeletonRenderer_setSkin

int lua_cocos2dx_spine_SkeletonRenderer_setSkin(lua_State* tolua_S){    int argc = 0;    spine::SkeletonRenderer* cobj = nullptr;    bool ok  = true;#if COCOS2D_DEBUG >= 1    tolua_Error tolua_err;#endif#if COCOS2D_DEBUG >= 1    if (!tolua_isusertype(tolua_S,1,"sp.SkeletonRenderer",0,&tolua_err)) goto tolua_lerror;#endif    cobj = (spine::SkeletonRenderer*)tolua_tousertype(tolua_S,1,0);#if COCOS2D_DEBUG >= 1    if (!cobj)    {        tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonRenderer_setSkin'", nullptr);        return 0;    }#endif    argc = lua_gettop(tolua_S)-1;    do{        if (argc == 1) {            const char* arg0;            std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "sp.SkeletonRenderer:setSkin"); arg0 = arg0_tmp.c_str();            if (!ok) { break; }            bool ret = cobj->setSkin(arg0);            tolua_pushboolean(tolua_S,(bool)ret);            return 1;        }    }while(0);    ok  = true;    do{        if (argc == 1) {            std::string arg0;            ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonRenderer:setSkin");            if (!ok) { break; }            bool ret = cobj->setSkin(arg0);            tolua_pushboolean(tolua_S,(bool)ret);            return 1;        }    }while(0);    ok  = true;    luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d /n",  "sp.SkeletonRenderer:setSkin",argc, 1);    return 0;#if COCOS2D_DEBUG >= 1    tolua_lerror:    tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonRenderer_setSkin'.",&tolua_err);#endif    return 0;}
开发者ID:289,项目名称:DouPo,代码行数:55,


示例2: tolua_CCGUI_CCValue_getBool00

static int tolua_CCGUI_CCValue_getBool00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if (     !tolua_isusertype(tolua_S,1,"CCValue",0,&tolua_err) ||     !tolua_isnoobj(tolua_S,2,&tolua_err) )  goto tolua_lerror; else#endif {  CCValue* self = (CCValue*)  tolua_tousertype(tolua_S,1,0);#ifndef TOLUA_RELEASE  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getBool'", NULL);#endif  {   bool tolua_ret = (bool)  self->getBool();   tolua_pushboolean(tolua_S,(bool)tolua_ret);  } } return 1;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'getBool'.",&tolua_err); return 0;#endif}
开发者ID:JoeHu,项目名称:ccgui,代码行数:28,


示例3: lua_glue_auto_InputDelegate_addKeyListener

int lua_glue_auto_InputDelegate_addKeyListener(lua_State* L){    input::InputDelegate* cobj = (input::InputDelegate*)tolua_tousertype(L, 1, 0);    bool ok = true;    std::function<void (int, int, bool)> listener;    int listenerFunc = toluafix_ref_function(L, 2, 0);				listener = [=](int larg0, int larg1, bool larg2) -> void {		    toluafix_get_function_by_refid(L, listenerFunc);		    tolua_pushnumber(L, (lua_Number)larg0);		    tolua_pushnumber(L, (lua_Number)larg1);		    tolua_pushboolean(L, (bool)larg2);		    LuaStack::executeFunction(L, 3);		};    if (!ok)    {        tolua_error(L, "invalid arguments in function 'lua_glue_auto_InputDelegate_addKeyListener'", nullptr);        return 0;    }    int ret = cobj->addKeyListener(listener);    tolua_pushnumber(L, (lua_Number)ret);    return 1;}
开发者ID:scphillips,项目名称:Epic,代码行数:26,


示例4: tolua_CCGLProgram_CCGLProgram_initWithVertexShaderFilename00

static int tolua_CCGLProgram_CCGLProgram_initWithVertexShaderFilename00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if (     !tolua_isusertype(tolua_S,1,"CCGLProgram",0,&tolua_err) ||     !tolua_isstring(tolua_S,2,0,&tolua_err) ||     !tolua_isstring(tolua_S,3,0,&tolua_err) ||     !tolua_isnoobj(tolua_S,4,&tolua_err) )  goto tolua_lerror; else#endif {  CCGLProgram* self = (CCGLProgram*)  tolua_tousertype(tolua_S,1,0);  const char* vShaderFilename = ((const char*)  tolua_tostring(tolua_S,2,0));  const char* fShaderFilename = ((const char*)  tolua_tostring(tolua_S,3,0));#ifndef TOLUA_RELEASE  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'initWithVertexShaderFilename'", NULL);#endif  {   bool tolua_ret = (bool)  self->initWithVertexShaderFilename(vShaderFilename,fShaderFilename);   tolua_pushboolean(tolua_S,(bool)tolua_ret);  } } return 1;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'initWithVertexShaderFilename'.",&tolua_err); return 0;#endif}
开发者ID:imuzi,项目名称:MyApp,代码行数:32,


示例5: tolua_maudio_maudio_Sound_isLooping00

static int tolua_maudio_maudio_Sound_isLooping00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"const maudio::Sound",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else#endif {  const maudio::Sound* self = (const maudio::Sound*)  tolua_tousertype(tolua_S,1,0);#ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'isLooping'",NULL);#endif {  bool tolua_ret = (bool)  self->isLooping(); tolua_pushboolean(tolua_S,(bool)tolua_ret); } } return 1;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'isLooping'.",&tolua_err); return 0;#endif}
开发者ID:minsulander,项目名称:moon,代码行数:28,


示例6: tolua_PressurePlateTile_PressurePlateTile_isActivated00

static int tolua_PressurePlateTile_PressurePlateTile_isActivated00(lua_State* tolua_S){#ifndef TOLUA_RELEASE    tolua_Error tolua_err;    if (        !tolua_isusertype(tolua_S,1,"PressurePlateTile",0,&tolua_err) ||        !tolua_isnoobj(tolua_S,2,&tolua_err)    )        goto tolua_lerror;    else#endif    {        PressurePlateTile* self = (PressurePlateTile*)  tolua_tousertype(tolua_S,1,0);#ifndef TOLUA_RELEASE        if (!self) tolua_error(tolua_S,"invalid 'self' in function 'isActivated'", NULL);#endif        {            bool tolua_ret = (bool)  self->isActivated();            tolua_pushboolean(tolua_S,(bool)tolua_ret);        }    }    return 1;#ifndef TOLUA_RELEASEtolua_lerror:    tolua_error(tolua_S,"#ferror in function 'isActivated'.",&tolua_err);    return 0;#endif}
开发者ID:jefrsilva,项目名称:AssembleeKQJ,代码行数:28,


示例7: tolua_MoviePlayer_MoviePlayer_isDone00

static int tolua_MoviePlayer_MoviePlayer_isDone00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if (     !tolua_isusertype(tolua_S,1,"MoviePlayer",0,&tolua_err) ||     !tolua_isnoobj(tolua_S,2,&tolua_err) )  goto tolua_lerror; else#endif {  MoviePlayer* self = (MoviePlayer*)  tolua_tousertype(tolua_S,1,0);#ifndef TOLUA_RELEASE  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'isDone'", NULL);#endif  {   bool tolua_ret = (bool)  self->isDone();   tolua_pushboolean(tolua_S,(bool)tolua_ret);  } } return 1;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'isDone'.",&tolua_err); return 0;#endif}
开发者ID:frozenbears,项目名称:pxlfkr,代码行数:28,


示例8: tolua_get_FADEUTILITYPARAMS_bClearOverride

static int tolua_get_FADEUTILITYPARAMS_bClearOverride (lua_State* tolua_S) {  FADEUTILITYPARAMS*self = (FADEUTILITYPARAMS*) tolua_tousertype(tolua_S,1,0);#ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bClearOverride'",NULL);#endif tolua_pushboolean(tolua_S,(bool)self->bClearOverride); return 1;}
开发者ID:klhurley,项目名称:ElementalEngine2,代码行数:7,


示例9: tolua_lua_cocos2dx_userext_AnimationController_checkCollider00

static int tolua_lua_cocos2dx_userext_AnimationController_checkCollider00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if (     !tolua_isusertype(tolua_S,1,"AnimationController",0,&tolua_err) ||          !tolua_isnoobj(tolua_S,3,&tolua_err) )  goto tolua_lerror; else#endif {  AnimationController* self = (AnimationController*)  tolua_tousertype(tolua_S,1,0);  cocos2d::Rect rect;  luaval_to_rect(tolua_S, 2, &rect);#ifndef TOLUA_RELEASE  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'checkCollider'", NULL);#endif  {   bool tolua_ret = (bool)  self->checkCollider(rect);   tolua_pushboolean(tolua_S,(bool)tolua_ret);  } } return 1;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'checkCollider'.",&tolua_err); return 0;#endif}
开发者ID:RayRiver,项目名称:misc,代码行数:31,


示例10: lua_neo_GameHelper_writeStringToFile

int lua_neo_GameHelper_writeStringToFile(lua_State* tolua_S){    int argc = 0;    bool ok  = true;#if COCOS2D_DEBUG >= 1    tolua_Error tolua_err;#endif#if COCOS2D_DEBUG >= 1    if (!tolua_isusertable(tolua_S,1,"neo.GameHelper",0,&tolua_err)) goto tolua_lerror;#endif    argc = lua_gettop(tolua_S) - 1;    if (argc == 2)    {        std::string arg0;        std::string arg1;        ok &= luaval_to_std_string(tolua_S, 2,&arg0);        ok &= luaval_to_std_string(tolua_S, 3,&arg1);        if(!ok)            return 0;        bool ret = neo::GameHelper::writeStringToFile(arg0, arg1);        tolua_pushboolean(tolua_S,(bool)ret);        return 1;    }    CCLOG("%s has wrong number of arguments: %d, was expecting %d/n ", "writeStringToFile",argc, 2);    return 0;#if COCOS2D_DEBUG >= 1    tolua_lerror:    tolua_error(tolua_S,"#ferror in function 'lua_neo_GameHelper_writeStringToFile'.",&tolua_err);#endif    return 0;}
开发者ID:riidt,项目名称:neox,代码行数:35,


示例11: tolua_GUID_CGUID_CreateGUID00

static int tolua_GUID_CGUID_CreateGUID00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if (     !tolua_isusertable(tolua_S,1,"CGUID",0,&tolua_err) ||     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"CGUID",0,&tolua_err)) ||     !tolua_isnoobj(tolua_S,3,&tolua_err) )  goto tolua_lerror; else#endif {  CGUID* guid = ((CGUID*)  tolua_tousertype(tolua_S,2,0));  {   bool tolua_ret = (bool)  CGUID::CreateGUID(*guid);   tolua_pushboolean(tolua_S,(bool)tolua_ret);  } } return 1;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'CreateGUID'.",&tolua_err); return 0;#endif}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:26,


示例12: ASSERT

void cLuaState::Push(bool a_Value){	ASSERT(IsValid());	tolua_pushboolean(m_LuaState, a_Value ? 1 : 0);	m_NumCurrentFunctionArgs += 1;}
开发者ID:1285done,项目名称:cuberite,代码行数:7,


示例13: tolua_Cocos2d_Node_isTouchSwallowEnabled

static int tolua_Cocos2d_Node_isTouchSwallowEnabled(lua_State* tolua_S){#if COCOS2D_DEBUG >= 1    tolua_Error tolua_err;    if (        !tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err) ||        !tolua_isnoobj(tolua_S,2,&tolua_err)        )        goto tolua_lerror;    else#endif    {        Node* self = static_cast<cocos2d::Node*>(tolua_tousertype(tolua_S,1,0));#if COCOS2D_DEBUG >= 1        if (!self) tolua_error(tolua_S,"invalid 'self' in function 'isTouchSwallowEnabled'", nullptr);#endif        {            auto mng = LuaNodeManager::getInstance();            auto lnode = mng->getLuaNodeByNode(self, false);            bool tolua_ret = false;            if (lnode) {                tolua_ret = lnode->isTouchSwallowEnabled();            }            tolua_pushboolean(tolua_S,(bool)tolua_ret);        }    }    return 1;#if COCOS2D_DEBUG >= 1tolua_lerror:    tolua_error(tolua_S,"#ferror in function 'isTouchSwallowEnabled'.",&tolua_err);    return 0;#endif}
开发者ID:JackTongy,项目名称:shared,代码行数:33,


示例14: lua_cocos2dx_audioengine_AudioEngine_lazyInit

int lua_cocos2dx_audioengine_AudioEngine_lazyInit(lua_State* tolua_S){    int argc = 0;    bool ok  = true;#if COCOS2D_DEBUG >= 1    tolua_Error tolua_err;#endif#if COCOS2D_DEBUG >= 1    if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;#endif    argc = lua_gettop(tolua_S) - 1;    if (argc == 0)    {        if(!ok)        {            tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_lazyInit'", nullptr);            return 0;        }        bool ret = cocos2d::experimental::AudioEngine::lazyInit();        tolua_pushboolean(tolua_S,(bool)ret);        return 1;    }    luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d/n ", "ccexp.AudioEngine:lazyInit",argc, 0);    return 0;#if COCOS2D_DEBUG >= 1    tolua_lerror:    tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_audioengine_AudioEngine_lazyInit'.",&tolua_err);#endif    return 0;}
开发者ID:FenneX,项目名称:FenneXEmptyProject,代码行数:34,


示例15: lua_PluginReviewLua_PluginReview_init

int lua_PluginReviewLua_PluginReview_init(lua_State* tolua_S){    int argc = 0;    bool ok  = true;#if COCOS2D_DEBUG >= 1    tolua_Error tolua_err;#endif#if COCOS2D_DEBUG >= 1    if (!tolua_isusertable(tolua_S,1,"sdkbox.PluginReview",0,&tolua_err)) goto tolua_lerror;#endif    argc = lua_gettop(tolua_S) - 1;    if (argc == 0)    {        if(!ok)        {            tolua_error(tolua_S,"invalid arguments in function 'lua_PluginReviewLua_PluginReview_init'", nullptr);            return 0;        }        bool ret = sdkbox::PluginReview::init();        tolua_pushboolean(tolua_S,(bool)ret);        return 1;    }    luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d/n ", "sdkbox.PluginReview:init",argc, 0);    return 0;#if COCOS2D_DEBUG >= 1    tolua_lerror:    tolua_error(tolua_S,"#ferror in function 'lua_PluginReviewLua_PluginReview_init'.",&tolua_err);#endif    return 0;}
开发者ID:pabitrapadhy,项目名称:sdkbox-review-sample,代码行数:34,


示例16: tolua_GUID_CGUID_IsInvalid00

static int tolua_GUID_CGUID_IsInvalid00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if (     !tolua_isusertype(tolua_S,1,"CGUID",0,&tolua_err) ||     !tolua_isnoobj(tolua_S,2,&tolua_err) )  goto tolua_lerror; else#endif {  CGUID* self = (CGUID*)  tolua_tousertype(tolua_S,1,0);#ifndef TOLUA_RELEASE  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInvalid'", NULL);#endif  {   bool tolua_ret = (bool)  self->IsInvalid();   tolua_pushboolean(tolua_S,(bool)tolua_ret);  } } return 1;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'IsInvalid'.",&tolua_err); return 0;#endif}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:28,


示例17: tolua_GUID_CGUID__eq00

static int tolua_GUID_CGUID__eq00(lua_State* tolua_S){#ifndef TOLUA_RELEASE tolua_Error tolua_err; if (     !tolua_isusertype(tolua_S,1,"const CGUID",0,&tolua_err) ||     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const CGUID",0,&tolua_err)) ||     !tolua_isnoobj(tolua_S,3,&tolua_err) )  goto tolua_lerror; else#endif {  const CGUID* self = (const CGUID*)  tolua_tousertype(tolua_S,1,0);  const CGUID* other = ((const CGUID*)  tolua_tousertype(tolua_S,2,0));#ifndef TOLUA_RELEASE  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);#endif  {   bool tolua_ret = (bool)  self->operator==(*other);   tolua_pushboolean(tolua_S,(bool)tolua_ret);  } } return 1;#ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err); return 0;#endif}
开发者ID:xiongshaogang,项目名称:mmo-resourse,代码行数:30,


示例18: lua_cocos2dx_csloader_CSLoader_bindCallback

int lua_cocos2dx_csloader_CSLoader_bindCallback(lua_State* tolua_S){    int argc = 0;    cocos2d::CSLoader* 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.CSLoader",0,&tolua_err)) goto tolua_lerror;#endif    cobj = (cocos2d::CSLoader*)tolua_tousertype(tolua_S,1,0);#if COCOS2D_DEBUG >= 1    if (!cobj)     {        tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_csloader_CSLoader_bindCallback'", nullptr);        return 0;    }#endif    argc = lua_gettop(tolua_S)-1;    if (argc == 4)     {        std::string arg0;        std::string arg1;        cocos2d::ui::Widget* arg2;        cocos2d::Node* arg3;        ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.CSLoader:bindCallback");        ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.CSLoader:bindCallback");        ok &= luaval_to_object<cocos2d::ui::Widget>(tolua_S, 4, "ccui.Widget",&arg2);        ok &= luaval_to_object<cocos2d::Node>(tolua_S, 5, "cc.Node",&arg3);        if(!ok)        {            tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_csloader_CSLoader_bindCallback'", nullptr);            return 0;        }        bool ret = cobj->bindCallback(arg0, arg1, arg2, arg3);        tolua_pushboolean(tolua_S,(bool)ret);        return 1;    }    luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d /n", "cc.CSLoader:bindCallback",argc, 4);    return 0;#if COCOS2D_DEBUG >= 1    tolua_lerror:    tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_csloader_CSLoader_bindCallback'.",&tolua_err);#endif    return 0;}
开发者ID:980538137,项目名称:MyGame-QuickCocos2dx,代码行数:59,


示例19: ASSERT

void cLuaState::Push(bool a_Value){	ASSERT(IsValid());	ASSERT(m_NumCurrentFunctionArgs >= 0);  // A function must be pushed to stack first	tolua_pushboolean(m_LuaState, a_Value ? 1 : 0);	m_NumCurrentFunctionArgs += 1;}
开发者ID:ravenscroftj,项目名称:MCServer,代码行数:8,


示例20: lua_cocos2dx_physics3d_Physics3DWorld_rayCast

int lua_cocos2dx_physics3d_Physics3DWorld_rayCast(lua_State* L){    int argc = 0;    cocos2d::Physics3DWorld* cobj = nullptr;    bool ok  = true;    #if COCOS2D_DEBUG >= 1    tolua_Error tolua_err;#endif        #if COCOS2D_DEBUG >= 1    if (!tolua_isusertype(L,1,"cc.Physics3DWorld",0,&tolua_err)) goto tolua_lerror;#endif        cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(L,1,0);    #if COCOS2D_DEBUG >= 1    if (!cobj)    {        tolua_error(L,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_rayCast'", nullptr);        return 0;    }#endif        argc = lua_gettop(L)-1;    if (argc == 3)    {        cocos2d::Vec3 arg0;        cocos2d::Vec3 arg1;        cocos2d::Physics3DWorld::HitResult arg2;                ok &= luaval_to_vec3(L, 2, &arg0, "cc.Physics3DWorld:rayCast");                ok &= luaval_to_vec3(L, 3, &arg1, "cc.Physics3DWorld:rayCast");                ok &= luaval_to_Physics3DWorld_HitResult(L, 4, &arg2, "cc.Physics3DWorld:rayCast");        if(!ok)        {            tolua_error(L,"invalid arguments in function 'lua_cocos2dx_physics3d_Physics3DWorld_rayCast'", nullptr);            return 0;        }        bool ret = cobj->rayCast(arg0, arg1, &arg2);        tolua_pushboolean(L,(bool)ret);        Physics3DWorld_HitResult_to_luaval(L, arg2);        return 2;    }    luaL_error(L, "%s has wrong number of arguments: %d, was expecting %d /n", "cc.Physics3DWorld:rayCast",argc, 3);    return 0;    #if COCOS2D_DEBUG >= 1tolua_lerror:    tolua_error(L,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_rayCast'.",&tolua_err);#endif        return 0;}
开发者ID:2016Go,项目名称:TF2016-NEW,代码行数:58,


示例21: tolua_AppUtils_isVideoPlayable

static int tolua_AppUtils_isVideoPlayable(lua_State* tolua_S){	if (nullptr == tolua_S)		return 0;	bool ret = AppUtils::isVideoPlayable();	tolua_pushboolean(tolua_S, ret);	return 1;}
开发者ID:yujianathz,项目名称:TurnAround,代码行数:10,


示例22: luascript_push_args

/*****************************************************************************  Push arguments into the Lua stack.*****************************************************************************/void luascript_push_args(struct fc_lua *fcl, int nargs,                         enum api_types *parg_types, va_list args){  int i;  fc_assert_ret(fcl);  fc_assert_ret(fcl->state);  for (i = 0; i < nargs; i++) {    int type;    type = va_arg(args, int);    fc_assert_ret(api_types_is_valid(type));    fc_assert_ret(type == *(parg_types + i));    switch (type) {      case API_TYPE_INT:        {          int arg;          arg = va_arg(args, int);          tolua_pushnumber(fcl->state, (lua_Number)arg);        }        break;      case API_TYPE_BOOL:        {          int arg;          arg = va_arg(args, int);          tolua_pushboolean(fcl->state, (bool)arg);        }        break;      case API_TYPE_STRING:        {          const char *arg;          arg = va_arg(args, const char*);          tolua_pushstring(fcl->state, arg);        }        break;      default:        {          const char *name;          void *arg;          name = api_types_name(type);          arg = va_arg(args, void*);          tolua_pushusertype(fcl->state, arg, name);        }        break;    }  }}
开发者ID:valisc,项目名称:freeciv,代码行数:57,


示例23: lua_myunzip_MyUnZip_UnZipFile

int lua_myunzip_MyUnZip_UnZipFile(lua_State* tolua_S){    int argc = 0;    MyUnZip* cobj = nullptr;    bool ok  = true;#if COCOS2D_DEBUG >= 1    tolua_Error tolua_err;#endif#if COCOS2D_DEBUG >= 1    if (!tolua_isusertype(tolua_S,1,"MyUnZip",0,&tolua_err)) goto tolua_lerror;#endif    cobj = (MyUnZip*)tolua_tousertype(tolua_S,1,0);#if COCOS2D_DEBUG >= 1    if (!cobj)     {        tolua_error(tolua_S,"invalid 'cobj' in function 'lua_myunzip_MyUnZip_UnZipFile'", nullptr);        return 0;    }#endif    argc = lua_gettop(tolua_S)-1;    if (argc == 2)     {        const char* arg0;        const char* arg1;        std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "MyUnZip:UnZipFile"); arg0 = arg0_tmp.c_str();        std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "MyUnZip:UnZipFile"); arg1 = arg1_tmp.c_str();        if(!ok)        {            tolua_error(tolua_S,"invalid arguments in function 'lua_myunzip_MyUnZip_UnZipFile'", nullptr);            return 0;        }        bool ret = cobj->UnZipFile(arg0, arg1);        tolua_pushboolean(tolua_S,(bool)ret);        return 1;    }    luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d /n", "MyUnZip:UnZipFile",argc, 2);    return 0;#if COCOS2D_DEBUG >= 1    tolua_lerror:    tolua_error(tolua_S,"#ferror in function 'lua_myunzip_MyUnZip_UnZipFile'.",&tolua_err);#endif    return 0;}
开发者ID:miyccc,项目名称:quickupdate,代码行数:53,


示例24: lua_cocos2dx_threadmanager_ThreadManager_doFile

int lua_cocos2dx_threadmanager_ThreadManager_doFile(lua_State* tolua_S){    int argc = 0;    ThreadManager* cobj = nullptr;    bool ok  = true;#if COCOS2D_DEBUG >= 1    tolua_Error tolua_err;#endif#if COCOS2D_DEBUG >= 1    if (!tolua_isusertype(tolua_S,1,"ThreadManager",0,&tolua_err)) goto tolua_lerror;#endif    cobj = (ThreadManager*)tolua_tousertype(tolua_S,1,0);#if COCOS2D_DEBUG >= 1    if (!cobj)     {        tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_threadmanager_ThreadManager_doFile'", nullptr);        return 0;    }#endif    argc = lua_gettop(tolua_S)-1;    if (argc == 2)     {        int arg0;        const char* arg1;        ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ThreadManager:doFile");        std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "ThreadManager:doFile"); arg1 = arg1_tmp.c_str();        if(!ok)        {            tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_threadmanager_ThreadManager_doFile'", nullptr);            return 0;        }        bool ret = cobj->doFile(arg0, arg1);        tolua_pushboolean(tolua_S,(bool)ret);        return 1;    }    luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d /n", "ThreadManager:doFile",argc, 2);    return 0;#if COCOS2D_DEBUG >= 1    tolua_lerror:    tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_threadmanager_ThreadManager_doFile'.",&tolua_err);#endif    return 0;}
开发者ID:quinsmpang,项目名称:mlua,代码行数:53,


示例25: lua_cocos2dx_spine_SkeletonAnimation_setAttachment

int lua_cocos2dx_spine_SkeletonAnimation_setAttachment(lua_State* tolua_S){    int argc = 0;    spine::SkeletonAnimation* cobj = nullptr;    bool ok  = true;#if COCOS2D_DEBUG >= 1    tolua_Error tolua_err;#endif#if COCOS2D_DEBUG >= 1    if (!tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror;#endif    cobj = (spine::SkeletonAnimation*)tolua_tousertype(tolua_S,1,0);#if COCOS2D_DEBUG >= 1    if (!cobj)     {        tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonAnimation_setAttachment'", nullptr);        return 0;    }#endif    argc = lua_gettop(tolua_S)-1;    if (argc == 2)     {        std::string arg0;        std::string arg1;        ok &= luaval_to_std_string(tolua_S, 2,&arg0, "sp.SkeletonAnimation:setAttachment");        ok &= luaval_to_std_string(tolua_S, 3,&arg1, "sp.SkeletonAnimation:setAttachment");        if(!ok)        {            tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_spine_SkeletonAnimation_setAttachment'", nullptr);            return 0;        }        bool ret = cobj->setAttachment(arg0, arg1);        tolua_pushboolean(tolua_S,(bool)ret);        return 1;    }    luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d /n", "sp.SkeletonAnimation:setAttachment",argc, 2);    return 0;#if COCOS2D_DEBUG >= 1    tolua_lerror:    tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_setAttachment'.",&tolua_err);#endif    return 0;}
开发者ID:coolxiaox,项目名称:v3quick-classic,代码行数:53,


示例26: tolua_cWorld_SetSignLines

/** function: cWorld:SetSignLines */static int tolua_cWorld_SetSignLines(lua_State * tolua_S){	cLuaState LuaState(tolua_S);	#ifndef TOLUA_RELEASE	tolua_Error tolua_err;	if (		!tolua_isusertype (LuaState, 1, "cWorld", 0, &tolua_err) ||		!tolua_isnumber   (LuaState, 2, 0, &tolua_err) ||		!tolua_isnumber   (LuaState, 3, 0, &tolua_err) ||		!tolua_isnumber   (LuaState, 4, 0, &tolua_err) ||		!tolua_iscppstring(LuaState, 5, 0, &tolua_err) ||		!tolua_iscppstring(LuaState, 6, 0, &tolua_err) ||		!tolua_iscppstring(LuaState, 7, 0, &tolua_err) ||		!tolua_iscppstring(LuaState, 8, 0, &tolua_err) ||		!tolua_isusertype (LuaState, 9, "cPlayer", 1, &tolua_err) ||		!tolua_isnoobj    (LuaState, 10, &tolua_err)		)		goto tolua_lerror;	else	#endif	{		cWorld * self       = (cWorld *) tolua_tousertype (LuaState, 1, nullptr);		int BlockX          = (int)      tolua_tonumber   (LuaState, 2, 0);		int BlockY          = (int)      tolua_tonumber   (LuaState, 3, 0);		int BlockZ          = (int)      tolua_tonumber   (LuaState, 4, 0);		const AString Line1 =            tolua_tocppstring(LuaState, 5, 0);		const AString Line2 =            tolua_tocppstring(LuaState, 6, 0);		const AString Line3 =            tolua_tocppstring(LuaState, 7, 0);		const AString Line4 =            tolua_tocppstring(LuaState, 8, 0);		cPlayer * Player    = (cPlayer *)tolua_tousertype (LuaState, 9, nullptr);		#ifndef TOLUA_RELEASE		if (self == nullptr)		{			tolua_error(LuaState, "invalid 'self' in function 'UpdateSign'", nullptr);		}		#endif		{			bool res = self->SetSignLines(BlockX, BlockY, BlockZ, Line1, Line2, Line3, Line4, Player);			tolua_pushboolean(LuaState, res ? 1 : 0);		}	}	LOGWARNING("Warning in function call 'UpdateSign': UpdateSign() is deprecated. Please use SetSignLines()");	LuaState.LogStackTrace(0);	return 1;		#ifndef TOLUA_RELEASEtolua_lerror:	tolua_error(LuaState, "#ferror in function 'UpdateSign'.", &tolua_err);	return 0;	#endif}
开发者ID:dougvj,项目名称:MCServer,代码行数:53,


示例27: script_callback_push_args

/**************************************************************************  Push callback arguments into the Lua stack.**************************************************************************/static void script_callback_push_args(int nargs, va_list args){  int i;  for (i = 0; i < nargs; i++) {    int type;    type = va_arg(args, int);    switch (type) {      case API_TYPE_INT:	{	  int arg;	  arg = va_arg(args, int);	  tolua_pushnumber(state, (lua_Number)arg);	}	break;      case API_TYPE_BOOL:	{	  int arg;	  arg = va_arg(args, int);	  tolua_pushboolean(state, (bool)arg);	}	break;      case API_TYPE_STRING:	{	  const char *arg;	  arg = va_arg(args, const char*);	  tolua_pushstring(state, arg);	}	break;      default:	{	  const char *name;	  void *arg;	  name = get_api_type_name(type);	  if (!name) {	    assert(0);	    return;	  }	  arg = va_arg(args, void*);	  tolua_pushusertype(state, arg, name);	}	break;    }  }}
开发者ID:2085020,项目名称:freeciv-web,代码行数:55,


示例28: lua_cocos2dx_NetScoket_NetUtil_connect

int lua_cocos2dx_NetScoket_NetUtil_connect(lua_State* tolua_S){    int argc = 0;    NetUtil* cobj = nullptr;    bool ok  = true;#if COCOS2D_DEBUG >= 1    tolua_Error tolua_err;#endif#if COCOS2D_DEBUG >= 1    if (!tolua_isusertype(tolua_S,1,"NetUtil",0,&tolua_err)) goto tolua_lerror;#endif    cobj = (NetUtil*)tolua_tousertype(tolua_S,1,0);#if COCOS2D_DEBUG >= 1    if (!cobj)     {        tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_NetScoket_NetUtil_connect'", nullptr);        return 0;    }#endif    argc = lua_gettop(tolua_S)-1;    if (argc == 2)     {        std::string arg0;        unsigned int arg1;        ok &= luaval_to_std_string(tolua_S, 2,&arg0);        ok &= luaval_to_uint32(tolua_S, 3,&arg1);        if(!ok)            return 0;        bool ret = cobj->connect(arg0, arg1);        tolua_pushboolean(tolua_S,(bool)ret);        return 1;    }    CCLOG("%s has wrong number of arguments: %d, was expecting %d /n", "connect",argc, 2);    return 0;#if COCOS2D_DEBUG >= 1    tolua_lerror:    tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_NetScoket_NetUtil_connect'.",&tolua_err);#endif    return 0;}
开发者ID:mixiancheng,项目名称:Classes,代码行数:50,


示例29: lua_cocos2dx_cocosdenshion_SimpleAudioEngine_willPlayBackgroundMusic

int lua_cocos2dx_cocosdenshion_SimpleAudioEngine_willPlayBackgroundMusic(lua_State* tolua_S){    int argc = 0;    CocosDenshion::SimpleAudioEngine* 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.SimpleAudioEngine",0,&tolua_err)) goto tolua_lerror;#endif    cobj = (CocosDenshion::SimpleAudioEngine*)tolua_tousertype(tolua_S,1,0);#if COCOS2D_DEBUG >= 1    if (!cobj)     {        tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_cocosdenshion_SimpleAudioEngine_willPlayBackgroundMusic'", nullptr);        return 0;    }#endif    argc = lua_gettop(tolua_S)-1;    if (argc == 0)     {        if(!ok)        {            tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_cocosdenshion_SimpleAudioEngine_willPlayBackgroundMusic'", nullptr);            return 0;        }        bool ret = cobj->willPlayBackgroundMusic();        tolua_pushboolean(tolua_S,(bool)ret);        return 1;    }    luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d /n", "cc.SimpleAudioEngine:willPlayBackgroundMusic",argc, 0);    return 0;#if COCOS2D_DEBUG >= 1    tolua_lerror:    tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_cocosdenshion_SimpleAudioEngine_willPlayBackgroundMusic'.",&tolua_err);#endif    return 0;}
开发者ID:2016Go,项目名称:TF2016-NEW,代码行数:47,



注:本文中的tolua_pushboolean函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ tolua_pushusertype函数代码示例
C++ tolua_module函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。