Files
EgtInterface/GseContext.h
T
Dario Sassi 0c41c8c631 EgtInterface 1.6a7 :
- aggiunta gestione nome file di progetto e suo stato
- aggiunta gestione pezzo e layer
- riordino generale.
2015-01-30 08:16:05 +00:00

83 lines
2.7 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2014-2014
//----------------------------------------------------------------------------
// File : GseContext.h Data : 01.09.14 Versione : 1.5i1
// Contenuto : Dichiarazioni per contesti GSE ( Geometria, Scena, Esecuzione).
//
//
//
// Modifiche : 01.09.14 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkGeomDB.h"
#include "/EgtDev/Include/EGrScene.h"
#include "/EgtDev/Include/EGnCmdParser.h"
#include <windows.h>
//----------------------------------------------------------------------------
class GseContext
{
public :
IGeomDB* m_pGeomDB ;
Color m_colDef ;
HWND m_hWnd ;
IEGrScene* m_pScene ;
ICmdParser* m_pTscExec ;
std::string m_sFilePath ;
bool m_bEnableModified ;
bool m_bModified ;
int m_nCurrPart ;
int m_nCurrLayer ;
public :
GseContext( void)
: m_pGeomDB( nullptr), m_colDef( GRAY), m_hWnd( nullptr), m_pScene( nullptr), m_pTscExec( nullptr),
m_sFilePath(), m_bEnableModified( true), m_bModified( false),
m_nCurrPart( GDB_ID_NULL), m_nCurrLayer( GDB_ID_NULL)
{}
~GseContext( void)
{ Clear() ; }
void Clear( void)
{
if ( m_pTscExec != nullptr) {
delete m_pTscExec ;
m_pTscExec = nullptr ;
}
if ( m_pScene != nullptr) {
m_pScene->Destroy() ;
delete m_pScene ;
m_pScene = nullptr ;
}
m_hWnd = nullptr ;
if ( m_pGeomDB != nullptr) {
delete m_pGeomDB ;
m_pGeomDB = nullptr ;
}
m_sFilePath.clear() ;
m_bEnableModified = true ;
m_bModified = false ;
m_nCurrPart = GDB_ID_NULL ;
m_nCurrLayer = GDB_ID_NULL ;
}
} ;
//----------------------------------------------------------------------------
int CreateGseContext( void) ;
bool DeleteGseContext( int nInd) ;
bool ClearAllGseContexts( void) ;
GseContext* GetGseContext( int nInd) ;
IGeomDB* GetGeomDB( int nInd) ;
IEGrScene* GetScene( int nInd) ;
ICmdParser* GetTscExecutor( int nInd) ;
bool SetCurrGseContext( int nInd) ;
bool ResetCurrGseContext( void) ;
int GetIndCurrGseContext( void) ;
GseContext* GetCurrGseContext( void) ;
IGeomDB* GetCurrGeomDB( void) ;
IEGrScene* GetCurrScene( void) ;
ICmdParser* GetCurrTscExecutor( void) ;