Files
Include/EgnCmdParser.h
T
Dario Sassi d566004aa9 Include :
- aggiornamento interfacce.
2014-03-18 08:52:35 +00:00

44 lines
1.7 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2013-2014
//----------------------------------------------------------------------------
// File : EgnCmdParser.h Data : 15.03.14 Versione : 1.5c
// Contenuto : Dichiarazione della interfaccia ICmdParser.
//
//
//
// Modifiche : 25.11.13 DS Creazione modulo.
// 15.03.14 DS Agg. ExecuteLine.
//
//----------------------------------------------------------------------------
#pragma once
#include <string>
class ICmdExecutor ;
class ILogger ;
//----------------------- Macro per import/export -----------------------------
#undef EGN_EXPORT
#if defined( I_AM_EGN) // da definirsi solo nella DLL
#define EGN_EXPORT __declspec( dllexport)
#else
#define EGN_EXPORT __declspec( dllimport)
#endif
//----------------------------------------------------------------------------
class __declspec( novtable) ICmdParser
{
public :
virtual ~ICmdParser( void) {}
virtual bool Init( ICmdExecutor* pCmdExec) = 0 ;
virtual bool Run( const std::string& sCmdFile, bool bIsolated = true) = 0 ;
virtual bool ExecLine( const std::string& sCmdLine, bool bIsolated = false) = 0 ;
virtual bool AddVariable( const std::string& sName, int nVal) = 0 ;
virtual bool SetVariable( const std::string& sName, int nVal) = 0 ;
virtual bool GetVariable( const std::string& sName, int& nVal) = 0 ;
virtual bool RemoveVariable( const std::string& sName) = 0 ;
} ;
//-----------------------------------------------------------------------------
EGN_EXPORT ICmdParser* CreateCmdParser( void) ;