Include :

- aggiunto a PtrOwner il costruttore di copia
- modifiche varie.
This commit is contained in:
Dario Sassi
2017-05-18 18:20:45 +00:00
parent f5ed42497e
commit c57e13b4f8
3 changed files with 14 additions and 9 deletions
+2
View File
@@ -17,6 +17,7 @@
#include "/EgtDev/Include/EGkPolyLine.h"
#include "/EgtDev/Include/EGkPolyArc.h"
#include "/EgtDev/Include/EGkPlane3d.h"
#include "/EgtDev/Include/EgtPointerOwner.h"
//----------------------------------------------------------------------------
class __declspec( novtable) ICurve : public IGeoObj
@@ -107,3 +108,4 @@ inline ICurve* GetCurve( IGeoObj* pGObj)
typedef std::vector<const ICurve*> CICURVEPVECTOR ; // vettore di puntatori a const ICurve
typedef std::vector<ICurve*> ICURVEPVECTOR ; // vettore di puntatori a ICurve
typedef std::list<ICurve*> ICURVEPLIST ; // lista di puntatori a ICurve
typedef std::vector<PtrOwner<ICurve>> POCRVVECTOR ; // vettore di puntatori esclusivi a ICurve
+10 -9
View File
@@ -23,15 +23,16 @@ const int MGP_INT = 0x2000 ;
const int MGP_DOU = 0x4000 ;
const int MGP_STR = 0x8000 ;
// Costanti tipo parametri generali delle lavorazioni
enum MgpType { MGP_NONE = 0,
MGP_COMP3A = ( MGP_BOOL + 0),
MGP_COMP5A = ( MGP_BOOL + 1),
MGP_SPLITARCS = ( MGP_INT + 0),
MGP_SAFEZ = ( MGP_DOU + 0),
MGP_EXTRALONCUTREG = ( MGP_DOU + 1),
MGP_EXTRARONDRIREG = ( MGP_DOU + 2),
MGP_HOLEDIAMTOLER = ( MGP_DOU + 3),
MGP_EXTSAWARCMINRAD =( MGP_DOU + 4)} ;
enum MgpType { MGP_NONE = 0,
MGP_COMP3A = ( MGP_BOOL + 0),
MGP_COMP5A = ( MGP_BOOL + 1),
MGP_SPLITARCS = ( MGP_INT + 0),
MGP_SAFEZ = ( MGP_DOU + 0),
MGP_EXTRALONCUTREG = ( MGP_DOU + 1),
MGP_EXTRARONDRIREG = ( MGP_DOU + 2),
MGP_HOLEDIAMTOLER = ( MGP_DOU + 3),
MGP_EXTSAWARCMINRAD = ( MGP_DOU + 4),
MGP_INTSAWARCMAXSIDEANG =( MGP_DOU + 5)} ;
//----------------------------------------------------------------------------
// Costanti per tipologia di split arcs
+2
View File
@@ -21,6 +21,8 @@ class PtrOwner
public :
explicit PtrOwner( void) : m_pT( nullptr) {}
explicit PtrOwner( T* pT) : m_pT( pT) {}
explicit PtrOwner( PtrOwner<T>&& RPT) : m_pT( Release( RPT)) {}
PtrOwner( const PtrOwner<T>& RPT) = delete ;
~PtrOwner( void) { Reset() ; }
bool Set( T* pT) { Reset() ; m_pT = pT ; return ( m_pT != nullptr) ; }
void Reset( void) { if ( m_pT != nullptr) delete m_pT ; m_pT = nullptr ; }