EgtGeomKernel :
- modifiche per Copy di oggetti Geo.
This commit is contained in:
+26
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user