34 #ifndef __EST_THANDLE_H__ 35 #define __EST_THANDLE_H__ 69 template<
class BoxT,
class ObjectT>
90 if (ptr && ptr->is_unreferenced())
96 int shareing(
void)
const {
return ptr?(ptr->refcount() > 1):0; }
101 (h.ptr)->inc_refcount();
104 if (ptr && ptr->is_unreferenced())
116 t_ptr->inc_refcount();
119 if (ptr && ptr->is_unreferenced())
125 operator ObjectT *() {
126 return ptr?(ptr->object_ptr()):(ObjectT *)
NULL;
129 operator const ObjectT *()
const {
130 return ptr?(ptr->object_ptr()):(
const ObjectT *)
NULL;
137 const ObjectT&
operator *()
const {
return *(ptr->object_ptr()); }
139 const ObjectT*
operator ->()
const {
return (ptr->object_ptr()); }
143 {
return a.ptr==b.ptr; }
145 {
return !( a==b ); }
147 friend std::ostream & operator << (std::ostream &s, const EST_THandle< BoxT, ObjectT > &a)
148 { (void)a;
return s <<
"HANDLE"; }
const ObjectT * operator->() const
EST_THandle & operator=(EST_THandle h)
const ObjectT & operator*() const
int operator==(const BoxT *p) const
int operator!=(const BoxT *p) const
EST_THandle(const EST_THandle &cp)