EgtGeomKernel 1.5c6 :
- aggiunta gestione attributi Level, Mode e Status - aggiunti comandi per assegnarli.
This commit is contained in:
+148
-5
@@ -189,21 +189,21 @@ GdbIterator::GoToPrev( void)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
GdbType
|
||||
int
|
||||
GdbIterator::GetGdbType( void) const
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return GDB_NONE ;
|
||||
return GDB_TY_NONE ;
|
||||
|
||||
// se oggetto geometrico
|
||||
if ( GetGdbGeo( m_pCurrObj) != nullptr)
|
||||
return GDB_GEO ;
|
||||
return GDB_TY_GEO ;
|
||||
// se gruppo
|
||||
else if ( GetGdbGroup( m_pCurrObj) != nullptr)
|
||||
return GDB_GROUP ;
|
||||
return GDB_TY_GROUP ;
|
||||
// altro
|
||||
else
|
||||
return GDB_NONE ;
|
||||
return GDB_TY_NONE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -288,6 +288,138 @@ GdbIterator::GetParentId( void) const
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Attributes
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::SetLevel( int nLevel)
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// assegno il livello
|
||||
return m_pCurrObj->SetLevel( nLevel) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::RevertLevel( void)
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// ripristino il livello precedente
|
||||
return m_pCurrObj->RevertLevel() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::GetLevel( int& nLevel) const
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// recupero il livello
|
||||
return m_pCurrObj->GetLevel( nLevel) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::GetCalcLevel( int& nLevel) const
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// recupero il livello calcolato
|
||||
return m_pCurrObj->GetCalcLevel( nLevel) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::SetMode( int nMode)
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// assegno il modo
|
||||
return m_pCurrObj->SetMode( nMode) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::RevertMode( void)
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// ripristino il modo precedente
|
||||
return m_pCurrObj->RevertMode() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::GetMode( int& nMode) const
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// recupero il modo
|
||||
return m_pCurrObj->GetMode( nMode) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::GetCalcMode( int& nMode) const
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// recupero il modo calcolato
|
||||
return m_pCurrObj->GetCalcMode( nMode) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::SetStatus( int nStat)
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// assegno lo stato
|
||||
return m_pCurrObj->SetStatus( nStat) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::RevertStatus( void)
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// ripristino lo stato precedente
|
||||
return m_pCurrObj->RevertStatus() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::GetStatus( int& nStat) const
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// recupero lo stato
|
||||
return m_pCurrObj->GetStatus( nStat) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::GetCalcStatus( int& nStat) const
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// recupero lo stato calcolato
|
||||
return m_pCurrObj->GetCalcStatus( nStat) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::SetColor( Color cCol)
|
||||
@@ -310,6 +442,17 @@ GdbIterator::GetColor( Color& cCol) const
|
||||
return m_pCurrObj->GetColor( cCol) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::GetCalcColor( Color& cCol) const
|
||||
{
|
||||
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
|
||||
return false ;
|
||||
|
||||
// recupero il colore calcolato
|
||||
return m_pCurrObj->GetCalcColor( cCol) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbIterator::SetName( const string& sName)
|
||||
|
||||
Reference in New Issue
Block a user