From 954874dbd665047e2fa16f290724bbf55cfda0e7 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 28 Apr 2016 09:20:13 -0400 Subject: [PATCH] drop epicsMemory.h --- src/ca/client/oldAccess.h | 1 - src/ca/client/templateInstances.cpp | 1 - src/ca/client/udpiiu.h | 1 - src/ca/client/virtualCircuit.h | 1 - src/ioc/db/dbCAC.h | 1 - src/ioc/db/dbChannelIO.h | 1 - src/libCom/cppStd/Makefile | 1 - src/libCom/cppStd/epicsMemory.h | 115 ---------------------------- 8 files changed, 122 deletions(-) delete mode 100644 src/libCom/cppStd/epicsMemory.h diff --git a/src/ca/client/oldAccess.h b/src/ca/client/oldAccess.h index 875b086fe..c893eeb68 100644 --- a/src/ca/client/oldAccess.h +++ b/src/ca/client/oldAccess.h @@ -34,7 +34,6 @@ #endif #include "tsFreeList.h" -#include "epicsMemory.h" #include "compilerDependencies.h" #include "osiSock.h" diff --git a/src/ca/client/templateInstances.cpp b/src/ca/client/templateInstances.cpp index dd8b5113e..f83366087 100644 --- a/src/ca/client/templateInstances.cpp +++ b/src/ca/client/templateInstances.cpp @@ -67,7 +67,6 @@ template class tsFreeList < oldSubscription, 1024, epicsMutexNOOP >; template class tsFreeList < putCallback, 1024, epicsMutexNOOP >; template class tsFreeList < repeaterClient, 0x20 >; template class epicsSingleton < localHostName >; -template class epics_auto_ptr < epics_auto_ptr < class searchTimer >, eapt_array >; template unsigned comBuf :: push ( const double * pValue, unsigned nElem ); template unsigned comBuf :: push ( const float * pValue, unsigned nElem ); template unsigned comBuf :: push ( const int * pValue, unsigned nElem ); diff --git a/src/ca/client/udpiiu.h b/src/ca/client/udpiiu.h index 595b8daad..b5ea2f20a 100644 --- a/src/ca/client/udpiiu.h +++ b/src/ca/client/udpiiu.h @@ -34,7 +34,6 @@ #include "osiSock.h" #include "epicsThread.h" -#include "epicsMemory.h" #include "epicsTime.h" #include "tsMinMax.h" #include "tsDLList.h" diff --git a/src/ca/client/virtualCircuit.h b/src/ca/client/virtualCircuit.h index 017b99d0e..4309aac1e 100644 --- a/src/ca/client/virtualCircuit.h +++ b/src/ca/client/virtualCircuit.h @@ -25,7 +25,6 @@ #ifndef virtualCircuith #define virtualCircuith -#include "epicsMemory.h" #include "tsDLList.h" #include "tsMinMax.h" diff --git a/src/ioc/db/dbCAC.h b/src/ioc/db/dbCAC.h index 7847f0a2b..92d6a2689 100644 --- a/src/ioc/db/dbCAC.h +++ b/src/ioc/db/dbCAC.h @@ -43,7 +43,6 @@ #include "resourceLib.h" #include "cacIO.h" #include "compilerDependencies.h" -#include "epicsMemory.h" #ifdef dbCACh_restore_epicsExportSharedSymbols # define epicsExportSharedSymbols diff --git a/src/ioc/db/dbChannelIO.h b/src/ioc/db/dbChannelIO.h index e1b63d760..42c9cb5c9 100644 --- a/src/ioc/db/dbChannelIO.h +++ b/src/ioc/db/dbChannelIO.h @@ -36,7 +36,6 @@ #endif #include "compilerDependencies.h" -#include "epicsMemory.h" #ifdef dbChannelIOh_restore_epicsExportSharedSymbols # define epicsExportSharedSymbols diff --git a/src/libCom/cppStd/Makefile b/src/libCom/cppStd/Makefile index 989b87eb0..782c4da25 100644 --- a/src/libCom/cppStd/Makefile +++ b/src/libCom/cppStd/Makefile @@ -10,5 +10,4 @@ SRC_DIRS += $(LIBCOM)/cppStd INC += epicsAlgorithm.h INC += epicsExcept.h -INC += epicsMemory.h diff --git a/src/libCom/cppStd/epicsMemory.h b/src/libCom/cppStd/epicsMemory.h deleted file mode 100644 index 49c9ebecc..000000000 --- a/src/libCom/cppStd/epicsMemory.h +++ /dev/null @@ -1,115 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -// epicsMemoryH.h -// Author: Jeff Hill -// Date: March 2001 - -#ifndef epicsMemoryH -#define epicsMemoryH - -enum epics_auto_ptr_type { - eapt_scalar, eapt_array }; - -template < class T, epics_auto_ptr_type PT = eapt_scalar > -class epics_auto_ptr { -public: - typedef T element_type; - explicit epics_auto_ptr ( T * p = 0 ) throw (); - epics_auto_ptr ( epics_auto_ptr & rhs ) throw (); - ~epics_auto_ptr() throw (); - epics_auto_ptr & operator = ( epics_auto_ptr & rhs ) throw (); - T & operator * () const throw (); - T * operator -> () const throw (); - T & operator [] ( unsigned index ) const throw (); - T * get () const throw (); - T * release () throw (); - void reset ( T * p = 0 ) throw (); -private: - T * p; - void destroyTarget () throw (); -}; - -template < class T, epics_auto_ptr_type PT > -inline epics_auto_ptr::epics_auto_ptr ( T *pIn ) throw () : -p ( pIn ) {} - -template < class T, epics_auto_ptr_type PT > -inline epics_auto_ptr:: - epics_auto_ptr ( epics_auto_ptr & ap ) throw () : - p ( ap.release() ) {} - -template < class T, epics_auto_ptr_type PT > -inline void epics_auto_ptr::destroyTarget () throw () -{ - if ( PT == eapt_scalar ) { - delete this->p; - } - else { - delete [] this->p; - } -} - -template < class T, epics_auto_ptr_type PT > -inline epics_auto_ptr::~epics_auto_ptr () throw () -{ - this->destroyTarget (); -} - -template < class T, epics_auto_ptr_type PT > -inline epics_auto_ptr & epics_auto_ptr::operator = - ( epics_auto_ptr & rhs ) throw () -{ - if ( &rhs != this) { - this->destroyTarget (); - this->p = rhs.release (); - } - return *this; -} - -template < class T, epics_auto_ptr_type PT > -inline T & epics_auto_ptr::operator * () const throw() -{ - return * this->p; -} - -template < class T, epics_auto_ptr_type PT > -inline T * epics_auto_ptr::operator -> () const throw () -{ - return this->p; -} - -template < class T, epics_auto_ptr_type PT > -T & epics_auto_ptr::operator [] ( unsigned index ) const throw () -{ - return this->p [ index ]; -} - -template < class T, epics_auto_ptr_type PT > -inline T * epics_auto_ptr::get () const throw () -{ - return this->p; -} - -template < class T, epics_auto_ptr_type PT > -inline T * epics_auto_ptr::release () throw () -{ - T *pTmp = this->p; - this->p = 0; - return pTmp; -} - -template < class T, epics_auto_ptr_type PT > -inline void epics_auto_ptr::reset ( T * pIn ) throw () -{ - this->destroyTarget (); - this->p = pIn; -} - -#endif // ifndef epicsMemoryH