drop epicsMemory.h
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
#endif
|
||||
|
||||
#include "tsFreeList.h"
|
||||
#include "epicsMemory.h"
|
||||
#include "compilerDependencies.h"
|
||||
#include "osiSock.h"
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
#include "osiSock.h"
|
||||
#include "epicsThread.h"
|
||||
#include "epicsMemory.h"
|
||||
#include "epicsTime.h"
|
||||
#include "tsMinMax.h"
|
||||
#include "tsDLList.h"
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#ifndef virtualCircuith
|
||||
#define virtualCircuith
|
||||
|
||||
#include "epicsMemory.h"
|
||||
#include "tsDLList.h"
|
||||
#include "tsMinMax.h"
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#include "resourceLib.h"
|
||||
#include "cacIO.h"
|
||||
#include "compilerDependencies.h"
|
||||
#include "epicsMemory.h"
|
||||
|
||||
#ifdef dbCACh_restore_epicsExportSharedSymbols
|
||||
# define epicsExportSharedSymbols
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#endif
|
||||
|
||||
#include "compilerDependencies.h"
|
||||
#include "epicsMemory.h"
|
||||
|
||||
#ifdef dbChannelIOh_restore_epicsExportSharedSymbols
|
||||
# define epicsExportSharedSymbols
|
||||
|
||||
@@ -10,5 +10,4 @@
|
||||
SRC_DIRS += $(LIBCOM)/cppStd
|
||||
INC += epicsAlgorithm.h
|
||||
INC += epicsExcept.h
|
||||
INC += epicsMemory.h
|
||||
|
||||
|
||||
@@ -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<T,PT> & rhs ) throw ();
|
||||
~epics_auto_ptr() throw ();
|
||||
epics_auto_ptr<T,PT> & operator = ( epics_auto_ptr<T,PT> & 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<T,PT>::epics_auto_ptr ( T *pIn ) throw () :
|
||||
p ( pIn ) {}
|
||||
|
||||
template < class T, epics_auto_ptr_type PT >
|
||||
inline epics_auto_ptr<T,PT>::
|
||||
epics_auto_ptr ( epics_auto_ptr<T,PT> & ap ) throw () :
|
||||
p ( ap.release() ) {}
|
||||
|
||||
template < class T, epics_auto_ptr_type PT >
|
||||
inline void epics_auto_ptr<T,PT>::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<T,PT>::~epics_auto_ptr () throw ()
|
||||
{
|
||||
this->destroyTarget ();
|
||||
}
|
||||
|
||||
template < class T, epics_auto_ptr_type PT >
|
||||
inline epics_auto_ptr<T,PT> & epics_auto_ptr<T,PT>::operator =
|
||||
( epics_auto_ptr<T,PT> & 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<T,PT>::operator * () const throw()
|
||||
{
|
||||
return * this->p;
|
||||
}
|
||||
|
||||
template < class T, epics_auto_ptr_type PT >
|
||||
inline T * epics_auto_ptr<T,PT>::operator -> () const throw ()
|
||||
{
|
||||
return this->p;
|
||||
}
|
||||
|
||||
template < class T, epics_auto_ptr_type PT >
|
||||
T & epics_auto_ptr<T,PT>::operator [] ( unsigned index ) const throw ()
|
||||
{
|
||||
return this->p [ index ];
|
||||
}
|
||||
|
||||
template < class T, epics_auto_ptr_type PT >
|
||||
inline T * epics_auto_ptr<T,PT>::get () const throw ()
|
||||
{
|
||||
return this->p;
|
||||
}
|
||||
|
||||
template < class T, epics_auto_ptr_type PT >
|
||||
inline T * epics_auto_ptr<T,PT>::release () throw ()
|
||||
{
|
||||
T *pTmp = this->p;
|
||||
this->p = 0;
|
||||
return pTmp;
|
||||
}
|
||||
|
||||
template < class T, epics_auto_ptr_type PT >
|
||||
inline void epics_auto_ptr<T,PT>::reset ( T * pIn ) throw ()
|
||||
{
|
||||
this->destroyTarget ();
|
||||
this->p = pIn;
|
||||
}
|
||||
|
||||
#endif // ifndef epicsMemoryH
|
||||
Reference in New Issue
Block a user