8 #ifndef MBase_SmartPtrI_h 9 #define MBase_SmartPtrI_h 34 template<
class ReferenceCountedT>
49 template<
class ReferenceCountedU>
52 if (!irSmartPtrI.IsNull())
54 mpData = irSmartPtrI.Get();
65 if (!irSmartPtrI.IsNull())
67 mpData = irSmartPtrI.Get();
78 #if defined(__IBMCPP__) || defined(WIN64) || defined(__GNUG__) || defined(__hpux) 82 template<
class ReferenceCountedU>
89 template<
class ReferenceCountedU>
93 mpData = irReturnPtrI.GiveUp();
132 template<
class ReferenceCountedU>
135 if (!irSmartPtrI.IsNull())
137 Reset(irSmartPtrI.Get());
148 if (!irSmartPtrI.IsNull())
150 Reset(irSmartPtrI.Get());
161 template<
class ReferenceCountedU>
166 mpData=irReturnPtrI.GiveUp();
170 #if defined(__IBMCPP__) || defined(WIN64) || defined(__GNUG__) || defined(__hpux) 179 #if defined(__IBMCPP__) || defined(WIN64) || defined(__GNUG__) || defined(__hpux) 182 mpData=irReturnPtrI.GiveUp();
199 ReferenceCountedT*
Get()
const throw()
209 template<
class ReferenceCountedU>
213 if(static_cast<ReferenceCountedU*>(mpData) != irSmartPtrI.Get())
215 Reset(reinterpret_cast<ReferenceCountedT*>(irSmartPtrI.Get()));
221 return mpData==iSmartBase.mpData;
226 return mpData<iSmartBase.mpData;
233 ReferenceCountedT* lpTemp=mpData;
251 void Dispose() throw()
255 ReferenceCountedT* lpDataTemp = mpData;
259 lpDataTemp->Release();
262 ReferenceCountedT* mpData;
266 #endif // MBase_SmartPtrI_h SmartPtrI & operator=(const SmartPtrI< ReferenceCountedT > &irSmartPtrI)
Definition: SmartPtrI.h:146
ReferenceCountedT * GiveUp()
Definition: SmartPtrI.h:231
void DownCastFrom(SmartPtrI< ReferenceCountedU > &irSmartPtrI)
Definition: SmartPtrI.h:210
SmartPtrI(const SmartPtrI< ReferenceCountedT > &irSmartPtrI)
Definition: SmartPtrI.h:63
bool IsNull() const
Definition: SmartPtrI.h:204
#define _ASSERTE(x)
Definition: Asserte.h:40
void Attach(ReferenceCountedT *ipData=NULL)
Definition: SmartPtrI.h:116
void Reset(ReferenceCountedT *ipData=NULL)
Definition: SmartPtrI.h:102
bool operator==(const SmartPtrI &iSmartBase) const
Definition: SmartPtrI.h:219
ReferenceCountedT * Get() const
Definition: SmartPtrI.h:199
SmartPtrI & operator=(const SmartPtrI< ReferenceCountedU > &irSmartPtrI)
Definition: SmartPtrI.h:133
ReturnPtrI< ReferenceCountedT > Return() const
Definition: SmartPtrI.h:246
Definition: Allocator.h:47
SmartPtrI(const SmartPtrI< ReferenceCountedU > &irSmartPtrI)
Definition: SmartPtrI.h:50
Definition: ReturnPtrI.h:47
SmartPtrI(ReferenceCountedT *ipData=NULL)
Definition: SmartPtrI.h:38
ReferenceCountedT & operator*() const
Definition: SmartPtrI.h:193
bool operator<(const SmartPtrI &iSmartBase) const
Definition: SmartPtrI.h:224
SmartPtrI & operator=(ReferenceCountedT *ipData)
Definition: SmartPtrI.h:124
SmartPtrI & operator=(ReturnPtrI< ReferenceCountedT > &irReturnPtrI)
Definition: SmartPtrI.h:173
#define NULL
Definition: Null.h:10
SmartPtrI(ReturnPtrI< ReferenceCountedU > &irReturnPtrI)
Definition: SmartPtrI.h:90
~SmartPtrI()
Definition: SmartPtrI.h:97
ReferenceCountedT * operator->() const
Definition: SmartPtrI.h:187
SmartPtrI & operator=(ReturnPtrI< ReferenceCountedU > &irReturnPtrI)
Definition: SmartPtrI.h:162
Definition: ReturnPtrI.h:22