Initial
This commit is contained in:
52
smtp/PTREX.HPP
Normal file
52
smtp/PTREX.HPP
Normal file
@@ -0,0 +1,52 @@
|
||||
#ifndef _SMTP_SMARTPOINTEREX_HPP_
|
||||
#define _SMTP_SMARTPOINTEREX_HPP_
|
||||
#ifndef _COMMON_SMARTPOINTER_HPP_
|
||||
#include <common/pointer.hpp>
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
class SmartPointerEx : public SmartPointer<T>
|
||||
{
|
||||
public:
|
||||
SmartPointerEx(void);
|
||||
SmartPointerEx(T FAR *lpSmartPointer,PointerDisposition::Disposition disposition=PointerDisposition::Assume);
|
||||
SmartPointerEx(const SmartPointer<T> &someSmartPointer);
|
||||
virtual ~SmartPointerEx();
|
||||
int operator < (const SmartPointerEx<T> &someSmartPointerEx)const;
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
SmartPointerEx<T>::SmartPointerEx(void)
|
||||
{
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
SmartPointerEx<T>::SmartPointerEx(T *lpSmartPointer,PointerDisposition::Disposition disposition)
|
||||
: SmartPointer<T>(lpSmartPointer,disposition)
|
||||
{
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
SmartPointerEx<T>::SmartPointerEx(const SmartPointer<T> &someSmartPointer)
|
||||
{
|
||||
(SmartPointer<T>&)*this=someSmartPointer;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
SmartPointerEx<T>::~SmartPointerEx()
|
||||
{
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
int SmartPointerEx<T>::operator <(const SmartPointerEx<T> &someSmartPointerEx)const
|
||||
{
|
||||
return *((T FAR*)((SmartPointer<T>&)*this))<*((T FAR*)((SmartPointer<T>&)someSmartPointerEx));
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user