9 #ifndef P6REFCOUNTED_H__
10 #define P6REFCOUNTED_H__ 1
59 operator I*()
const {
return static_cast<I*
>(
m_pRaw); }
70 return reinterpret_cast<I**
>(&
m_pRaw);
76 return reinterpret_cast<I**
>(&
m_pRaw);
83 *pRaw =
reinterpret_cast<I*
>(
m_pRaw);
97 return reinterpret_cast<I*
>(
m_pRaw);
P6R::P6ERR(* P6ASSERT)(const P6R::P6WCHAR *pszExpr, const P6R::P6CHAR *pszFile, P6R::P6UINT32 nLine)
P6BOOL operator==(I *pI) const
void attach(I *pIface)
Take ownership of a new interface without addref().
void swap(I **pRaw)
Exchange ownership.
p6RefCounted(I *ip=0)
Construct from a raw pointer of the correct type Must be derrived from p6ICom.
I ** addressofWithRelease()
void swap(p6RefCountedBase< I > &rhs)
Exchange ownership.
I * detach()
Detach the owned inteface and return a dumb pointer without release().
This is a non-COM based interface that is used (along with the P6_REFCOUNTED macro) for reference cou...
p6RefCounted(const p6RefCounted< I > &rSI)
Copy.
#define P6COMMETHOD_(type)
p6RefCounted< I > & operator=(I *ip)
Assign from a dumb pointer of the correct type.
virtual P6R::P6INT32 release()=0
p6RefCounted< I > & operator=(const p6RefCounted< I > &cp)
Assign from a smart pointer of the correct type.
P6BOOL operator<(I *pI) const
virtual P6R::P6INT32 addref()=0
P6BOOL operator!=(I *pI) const
p6RefCountedBase(I *pRawPtr=NULL)
void detach(I **ppIface)
Detach the owned interface without release().