cabb0ac300
- modifiche per filtri selezione anche in DB geometrico.
94 lines
3.2 KiB
C++
94 lines
3.2 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 "/EgtDev/Include/EMkMachMgr.h"
|
|
#define NOMINMAX
|
|
#include <windows.h>
|
|
|
|
//----------------------------------------------------------------------------
|
|
class GseContext
|
|
{
|
|
public :
|
|
IGeomDB* m_pGeomDB ;
|
|
Color m_colDef ;
|
|
IMachMgr* m_pMachMgr ;
|
|
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 ;
|
|
int m_nObjFilterForSelect ;
|
|
|
|
public :
|
|
GseContext( void)
|
|
: m_pGeomDB( nullptr), m_colDef( GRAY), m_pMachMgr( nullptr), 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), m_nObjFilterForSelect(GEO_ZERODIM | GEO_CURVE | GEO_SURF | GEO_VOLUME | GEO_EXTRA)
|
|
{}
|
|
~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_pMachMgr != nullptr) {
|
|
delete m_pMachMgr ;
|
|
m_pMachMgr = 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 ;
|
|
m_nObjFilterForSelect = GEO_ZERODIM | GEO_CURVE | GEO_SURF | GEO_VOLUME | GEO_EXTRA ;
|
|
}
|
|
} ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
int CreateGseContext( void) ;
|
|
bool DeleteGseContext( int nInd) ;
|
|
bool GetAllGseContextOn( INTVECTOR& vOn) ;
|
|
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) ;
|
|
IMachMgr* GetCurrMachMgr( void) ;
|
|
IEGrScene* GetCurrScene( void) ;
|
|
ICmdParser* GetCurrTscExecutor( void) ;
|