Add support for callbacks
This commit is contained in:
@@ -14,7 +14,8 @@ template <class T>
|
||||
class SmartPointer
|
||||
{
|
||||
public:
|
||||
SmartPointer(void);
|
||||
// SmartPointer(void);
|
||||
SmartPointer(bool createNew=false);
|
||||
SmartPointer(T FAR *lpSmartPointer,PointerDisposition::Disposition disposition=PointerDisposition::Assume);
|
||||
SmartPointer(const SmartPointer<T> &someSmartPointer);
|
||||
virtual ~SmartPointer();
|
||||
@@ -36,11 +37,23 @@ private:
|
||||
PointerDisposition::Disposition mDisposition;
|
||||
};
|
||||
|
||||
// template <class T>
|
||||
// inline
|
||||
// SmartPointer<T>::SmartPointer(void)
|
||||
// : mlpSmartPointer(0), mDisposition(PointerDisposition::Assume)
|
||||
// {
|
||||
// }
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
SmartPointer<T>::SmartPointer(void)
|
||||
SmartPointer<T>::SmartPointer(bool createNew)
|
||||
: mlpSmartPointer(0), mDisposition(PointerDisposition::Assume)
|
||||
{
|
||||
if(createNew)
|
||||
{
|
||||
mlpSmartPointer = ::new T();
|
||||
mDisposition = PointerDisposition::Delete;
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
||||
Reference in New Issue
Block a user