From c57e13b4f81734e5135f597d7e8e8f80f620241c Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 18 May 2017 18:20:45 +0000 Subject: [PATCH] Include : - aggiunto a PtrOwner il costruttore di copia - modifiche varie. --- EGkCurve.h | 2 ++ EMkMachiningConst.h | 19 ++++++++++--------- EgtPointerOwner.h | 2 ++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/EGkCurve.h b/EGkCurve.h index 9c47580..33ae3de 100644 --- a/EGkCurve.h +++ b/EGkCurve.h @@ -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 CICURVEPVECTOR ; // vettore di puntatori a const ICurve typedef std::vector ICURVEPVECTOR ; // vettore di puntatori a ICurve typedef std::list ICURVEPLIST ; // lista di puntatori a ICurve +typedef std::vector> POCRVVECTOR ; // vettore di puntatori esclusivi a ICurve diff --git a/EMkMachiningConst.h b/EMkMachiningConst.h index 62df52c..3825534 100644 --- a/EMkMachiningConst.h +++ b/EMkMachiningConst.h @@ -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 diff --git a/EgtPointerOwner.h b/EgtPointerOwner.h index 519fb6c..09ac7ea 100644 --- a/EgtPointerOwner.h +++ b/EgtPointerOwner.h @@ -21,6 +21,8 @@ class PtrOwner public : explicit PtrOwner( void) : m_pT( nullptr) {} explicit PtrOwner( T* pT) : m_pT( pT) {} + explicit PtrOwner( PtrOwner&& RPT) : m_pT( Release( RPT)) {} + PtrOwner( const PtrOwner& 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 ; }