#include <OTC/refcnt/cresptr.hh> template<class T> class OTC_CResPtr {
public:
OTC_CResPtr();
OTC_CResPtr(T const* theItem);
OTC_CResPtr(OTC_CResPtr<T> const& theRP);
~OTC_CResPtr();
inline T const* item() const;
inline T const* operator->() const;
inline operator T const*() const;
inline T const& operator*() const;
inline OTC_Boolean operator!() const;
inline OTC_Boolean operator==(int theItem) const;
inline OTC_Boolean operator!=(int theItem) const;
inline OTC_Boolean operator==(T const* theItem) const;
inline OTC_Boolean operator!=(T const* theItem) const;
void setItem(OTC_CResPtr<T> const& theRP);
void setItem(T const* theItem);
OTC_CResPtr<T>& operator=(OTC_CResPtr<T> const& theRP);
OTC_CResPtr<T>& operator=(T const* theItem);
u_int numRefs() const;
protected:
inline T* _item() const;
T* _itemNoNull() const;
};
OTC_Resource
.
OTC_CResPtr();
OTC_CResPtr(T const* theItem);
theItem
.
OTC_CResPtr(OTC_CResPtr<T> const& theRP);
theRP
.
~OTC_CResPtr();
inline T const* item() const;
inline T const* operator->() const;
inline operator T const*() const;
inline T const& operator*() const;
inline OTC_Boolean operator!() const;
inline OTC_Boolean operator==(int theItem) const;
inline OTC_Boolean operator!=(int theItem) const;
inline OTC_Boolean operator==(T const* theItem) const;
inline OTC_Boolean operator!=(T const* theItem) const;
void setItem(OTC_CResPtr<T> const& theRP);
theRP
.
void setItem(T const* theItem);
theItem
.
OTC_CResPtr<T>& operator=(OTC_CResPtr<T> const& theRP);
theRP
.
OTC_CResPtr<T>& operator=(T const* theItem);
theItem
.
u_int numRefs() const;
0
if this
class does not reference an object.
OTC_Resource