EgtGeomKernel 2.5a2 :

- aggiunte funzioni GetAllInfo per recuperare tutte le info di una entità.
This commit is contained in:
DarioS
2023-01-30 09:40:53 +01:00
parent 368bd80c69
commit 078f730512
9 changed files with 86 additions and 6 deletions
+33
View File
@@ -1618,6 +1618,39 @@ GdbIterator::RemoveInfo( const string& sKey)
return m_pCurrObj->RemoveInfo( sKey) ;
}
//----------------------------------------------------------------------------
bool
GdbIterator::GetAllInfo( STRVECTOR& vsInfo) const
{
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
return false ;
// recupero tutte le Info
return m_pCurrObj->GetAllInfo( vsInfo) ;
}
//----------------------------------------------------------------------------
bool
GdbIterator::CopyAllInfoFrom( const IGdbIterator& iIter)
{
if ( m_pGDB == nullptr || m_pCurrObj == nullptr)
return false ;
// recupero l'oggetto sorgente
const GdbIterator* pIter = dynamic_cast<const GdbIterator*> (&iIter) ;
if ( pIter == nullptr || pIter->m_pGDB != m_pGDB || pIter->m_pCurrObj == nullptr)
return false ;
const GdbObj* pGdbObjSou = pIter->m_pCurrObj ;
// copio tutte le Info
if ( m_pCurrObj != pGdbObjSou && pGdbObjSou->m_pAttribs != nullptr) {
m_pCurrObj->GetSafeAttribs() ;
return ( m_pCurrObj->m_pAttribs != nullptr && m_pCurrObj->m_pAttribs->CopyAllInfoFrom( *(pGdbObjSou->m_pAttribs))) ;
}
else
return true ;
}
//----------------------------------------------------------------------------
// TextureData
//----------------------------------------------------------------------------