EgtGeomKernel :

- modifiche per Copy di oggetti Geo.
This commit is contained in:
Dario Sassi
2014-03-26 18:28:52 +00:00
parent 0a1c571048
commit 7d64584eba
22 changed files with 1803 additions and 112 deletions
+26 -5
View File
@@ -52,16 +52,37 @@ GeoVector3d::Set( const Vector3d& vtV)
GeoVector3d*
GeoVector3d::Clone( void) const
{
GeoVector3d* pGVt ;
// alloco oggetto
pGVt = new(nothrow) GeoVector3d ;
if ( pGVt != nullptr)
*pGVt = *(const_cast<GeoVector3d*>(this)) ;
GeoVector3d* pGVt = new(nothrow) GeoVector3d ;
if ( pGVt != nullptr) {
if ( ! pGVt->Copy( *this)) {
delete pGVt ;
return nullptr ;
}
}
return pGVt ;
}
//----------------------------------------------------------------------------
bool
GeoVector3d::Copy( const IGeoObj* pGObjSrc)
{
const GeoVector3d* pGV = dynamic_cast<const GeoVector3d*>( pGObjSrc) ;
if ( pGV == nullptr)
return false ;
return Copy( *pGV) ;
}
//----------------------------------------------------------------------------
bool
GeoVector3d::Copy( const GeoVector3d& clSrc)
{
if ( &clSrc == this)
return true ;
return Set( clSrc.m_vtV) ;
}
//----------------------------------------------------------------------------
const string&
GeoVector3d::GetTitle( void) const