Files
EgtInterface/LUA_Aux.cpp
T
Dario Sassi 0966f86f9d EgtInterface 1.6c6 :
- utilizzato gestore lua di EgtGeneral.
2015-03-22 09:27:35 +00:00

50 lines
1.4 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2014-2014
//----------------------------------------------------------------------------
// File : LUA_Aux.cpp Data : 29.09.14 Versione : 1.5i5
// Contenuto : Funzioni ausiliarie per LUA.
//
//
//
// Modifiche : 29.09.14 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include "LUA_Aux.h"
#include "AuxTools.h"
using namespace std ;
//----------------------------------------------------------------------------
bool
LuaGetRefType( lua_State* L, int nInd, int& nRefType)
{
// se non c'è il tipo cercato, ritorno
string sRefType ;
if ( ! LuaGetParam( L, nInd, sRefType))
return false ;
// interpreto il parametro
nRefType = StringToRefType( sRefType) ;
return true ;
}
//----------------------------------------------------------------------------
bool
LuaGetRefId( lua_State* L, int nInd, int& nRefId)
{
// se parametro è numero intero
if ( LuaGetParam( L, nInd, nRefId))
return true ;
// se parametro è stringa
string sFlag ;
if ( LuaGetParam( L, nInd, sFlag)) {
nRefId = StringToRefId( sFlag) ;
return true ;
}
// non trovato
return false ;
}