18bf9c19e1
- gestione inserimento in testa ad un gruppo - gestione Machinings.
51 lines
1.5 KiB
C++
51 lines
1.5 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2015-2015
|
|
//----------------------------------------------------------------------------
|
|
// File : LUA_MachMgr.cpp Data : 24.03.15 Versione : 1.6c8
|
|
// Contenuto : Funzioni Machining Manager per LUA.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 24.03.15 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
//--------------------------- Include ----------------------------------------
|
|
#include "stdafx.h"
|
|
#include "API.h"
|
|
#include "LUA.h"
|
|
#include "LUA_Base.h"
|
|
#include "LUA_Aux.h"
|
|
#include "/EgtDev/Include/EInAPI.h"
|
|
#include "/EgtDev/Include/EgnStringUtils.h"
|
|
|
|
using namespace std ;
|
|
|
|
|
|
//-------------------------------------------------------------------------------
|
|
static int
|
|
LuaAddMachGroup( lua_State* L)
|
|
{
|
|
// 2 parametri : nome del gruppo, nome della macchina da utilizzare
|
|
string sName ;
|
|
LuaCheckParam( L, 1, sName)
|
|
string sMachineName ;
|
|
LuaCheckParam( L, 2, sMachineName)
|
|
LuaClearStack( L) ;
|
|
// aggiungo la macchinata
|
|
int nId = EgtAddMachGroup( sName, sMachineName) ;
|
|
// restituisco il risultato
|
|
LuaSetReturn( L, nId) ;
|
|
return 1 ;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------
|
|
bool
|
|
LuaInstallMachMgr( void)
|
|
{
|
|
bool bOk = true ;
|
|
bOk = bOk && LuaRegisterFunction( "EgtAddMachGroup", LuaAddMachGroup) ;
|
|
return bOk ;
|
|
}
|