added reset()

This commit is contained in:
Jeff Hill
2001-04-17 00:14:42 +00:00
parent 1ec6f444b7
commit 76560ce7c3

View File

@@ -15,8 +15,9 @@ public:
epics_auto_ptr<T> & operator = ( const epics_auto_ptr<T> & rhs );
T & operator * () const;
T * operator -> () const;
T* get () const;
T* release ();
T * get () const;
T * release ();
void reset ( T * p = 0 );
private:
T *p;
};
@@ -58,7 +59,7 @@ inline T * epics_auto_ptr<T>::operator -> () const
}
template < class T >
inline T * epics_auto_ptr<T>::get() const
inline T * epics_auto_ptr<T>::get () const
{
return this->p;
}
@@ -71,4 +72,11 @@ inline T * epics_auto_ptr<T>::release ()
return pTmp;
}
template < class T >
inline void epics_auto_ptr<T>::reset ( T * pIn )
{
delete this->p;
this->p = pIn;
}
#endif // ifndef epicsMemoryH