82b2fcf8ae
- modifiche interfacce - aggiunto manager esecutori.
46 lines
1.8 KiB
C++
46 lines
1.8 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( void) = 0 ;
|
|
virtual bool SetExecutor( ICmdExecutor* pCmdExec) = 0 ;
|
|
virtual bool AddExecutor( ICmdExecutor* pCmdExec) = 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 ;
|
|
virtual bool Run( const std::string& sCmdFile, bool bIsolated = true) = 0 ;
|
|
virtual bool ExecLine( const std::string& sCmdLine, bool bIsolated = false) = 0 ;
|
|
} ;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
EGN_EXPORT ICmdParser* CreateCmdParser( void) ; |