EgtInterface 1.5j4 :
- ora si imposta un context corrente anche per le API come per LUA - il context corrente di LUA coincide con quello delle API.
This commit is contained in:
+34
-34
@@ -25,9 +25,9 @@ using namespace std ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtExistsObj( int nGseCtx, int nId)
|
||||
__stdcall EgtExistsObj( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico se esiste l'oggetto
|
||||
return ( pGeomDB->ExistsObj( nId) ? TRUE : FALSE) ;
|
||||
@@ -35,9 +35,9 @@ BOOL
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtGetGroupObjs( int nGseCtx, int nId)
|
||||
__stdcall EgtGetGroupObjs( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// recupero il numero di oggetti nel gruppo
|
||||
return ( pGeomDB->GetGroupObjs( nId)) ;
|
||||
@@ -45,9 +45,9 @@ int
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtGetFirstInGroup( int nGseCtx, int nGroupId)
|
||||
__stdcall EgtGetFirstInGroup( int nGroupId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// recupero il primo oggetto nel gruppo
|
||||
return pGeomDB->GetFirstInGroup( nGroupId) ;
|
||||
@@ -55,9 +55,9 @@ __stdcall EgtGetFirstInGroup( int nGseCtx, int nGroupId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtGetNext( int nGseCtx, int nId)
|
||||
__stdcall EgtGetNext( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// recupero il prossimo oggetto nello stesso gruppo
|
||||
return pGeomDB->GetNext( nId) ;
|
||||
@@ -65,9 +65,9 @@ __stdcall EgtGetNext( int nGseCtx, int nId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtGetLastInGroup( int nGseCtx, int nGroupId)
|
||||
__stdcall EgtGetLastInGroup( int nGroupId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// recupero l'ultimo oggetto nel gruppo
|
||||
return pGeomDB->GetLastInGroup( nGroupId) ;
|
||||
@@ -75,9 +75,9 @@ __stdcall EgtGetLastInGroup( int nGseCtx, int nGroupId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtGetPrev( int nGseCtx, int nId)
|
||||
__stdcall EgtGetPrev( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// recupero il precedente oggetto nello stesso gruppo
|
||||
return pGeomDB->GetPrev( nId) ;
|
||||
@@ -85,9 +85,9 @@ __stdcall EgtGetPrev( int nGseCtx, int nId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetBBox( int nGseCtx, int nId, int nFlag, double ptMin[3], double ptMax[3])
|
||||
__stdcall EgtGetBBox( int nId, int nFlag, double ptMin[3], double ptMax[3])
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// recupero il bounding box locale dell'oggetto
|
||||
BBox3d b3Loc ;
|
||||
@@ -104,9 +104,9 @@ __stdcall EgtGetBBox( int nGseCtx, int nId, int nFlag, double ptMin[3], double p
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetBBoxGlob( int nGseCtx, int nId, int nFlag, double ptMin[3], double ptMax[3])
|
||||
__stdcall EgtGetBBoxGlob( int nId, int nFlag, double ptMin[3], double ptMax[3])
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// recupero il bounding box globale dell'oggetto
|
||||
BBox3d b3Loc ;
|
||||
@@ -123,9 +123,9 @@ __stdcall EgtGetBBoxGlob( int nGseCtx, int nId, int nFlag, double ptMin[3], doub
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtCopy( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAfter)
|
||||
__stdcall EgtCopy( int nSouId, int nRefId, int nSonBeforeAfter)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// eseguo la copia
|
||||
return pGeomDB->Copy( nSouId, GDB_ID_NULL, nRefId, nSonBeforeAfter) ;
|
||||
@@ -133,9 +133,9 @@ __stdcall EgtCopy( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAfter)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtCopyGlob( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAfter)
|
||||
__stdcall EgtCopyGlob( int nSouId, int nRefId, int nSonBeforeAfter)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// eseguo la copia mantenendo la posizione in globale
|
||||
return pGeomDB->CopyGlob( nSouId, GDB_ID_NULL, nRefId, nSonBeforeAfter) ;
|
||||
@@ -143,9 +143,9 @@ __stdcall EgtCopyGlob( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAfter)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtRelocate( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAfter)
|
||||
__stdcall EgtRelocate( int nSouId, int nRefId, int nSonBeforeAfter)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// eseguo la rilocazione
|
||||
return ( pGeomDB->Relocate( nSouId, nRefId, nSonBeforeAfter) ? TRUE : FALSE) ;
|
||||
@@ -153,9 +153,9 @@ __stdcall EgtRelocate( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAfter)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtRelocateGlob( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAfter)
|
||||
__stdcall EgtRelocateGlob( int nSouId, int nRefId, int nSonBeforeAfter)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// eseguo la rilocazione mantenendo la posizione in globale
|
||||
return ( pGeomDB->RelocateGlob( nSouId, nRefId, nSonBeforeAfter) ? TRUE : FALSE) ;
|
||||
@@ -163,9 +163,9 @@ __stdcall EgtRelocateGlob( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAf
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtErase( int nGseCtx, int nId)
|
||||
__stdcall EgtErase( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// eseguo la cancellazione
|
||||
return ( pGeomDB->Erase( nId) ? TRUE : FALSE) ;
|
||||
@@ -173,9 +173,9 @@ __stdcall EgtErase( int nGseCtx, int nId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtGetType( int nGseCtx, int nId)
|
||||
__stdcall EgtGetType( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_TY_NONE)
|
||||
// recupero il tipo GDB
|
||||
int nType = pGeomDB->GetGdbType( nId) ;
|
||||
@@ -195,9 +195,9 @@ __stdcall EgtGetType( int nGseCtx, int nId)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetTitle( int nGseCtx, int nId, wchar_t*& wsTitle)
|
||||
__stdcall EgtGetTitle( int nId, wchar_t*& wsTitle)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// recupero l'oggetto geometrico
|
||||
const IGeoObj* pGeoObj = pGeomDB->GetGeoObj( nId) ;
|
||||
@@ -210,9 +210,9 @@ __stdcall EgtGetTitle( int nGseCtx, int nId, wchar_t*& wsTitle)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGroupDump( int nGseCtx, int nId, wchar_t*& wsDump)
|
||||
__stdcall EgtGroupDump( int nId, wchar_t*& wsDump)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// preparo l'intestazione
|
||||
string sDump = "Group " + ToString( nId) + "\r\n" ;
|
||||
@@ -250,9 +250,9 @@ __stdcall EgtGroupDump( int nGseCtx, int nId, wchar_t*& wsDump)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGeoObjDump( int nGseCtx, int nId, wchar_t*& wsDump)
|
||||
__stdcall EgtGeoObjDump( int nId, wchar_t*& wsDump)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ;
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// recupero l'oggetto geometrico
|
||||
const IGeoObj* pGeoObj = pGeomDB->GetGeoObj( nId) ;
|
||||
|
||||
Reference in New Issue
Block a user