#include <include/EST_THandle.h>
Public Member Functions | |
EST_THandle (void) | |
EST_THandle (BoxT *p) | |
EST_THandle (const EST_THandle &cp) | |
~EST_THandle (void) | |
bool | null () const |
int | shareing (void) const |
EST_THandle & | operator= (EST_THandle h) |
EST_THandle & | operator= (BoxT *t_ptr) |
operator ObjectT * () | |
operator const ObjectT * () const | |
int | operator== (const BoxT *p) const |
int | operator!= (const BoxT *p) const |
const ObjectT & | operator* () const |
ObjectT & | operator* () |
const ObjectT * | operator-> () const |
ObjectT * | operator-> () |
Friends | |
int | operator== (const EST_THandle< BoxT, ObjectT > &a, const EST_THandle< BoxT, ObjectT > &b) |
int | operator!= (const EST_THandle< BoxT, ObjectT > &a, const EST_THandle< BoxT, ObjectT > &b) |
std::ostream & | operator<< (std::ostream &s, const EST_THandle< BoxT, ObjectT > &a) |
A `smart' pointer which does reference counting.
Behaves almost like a pointer as far as naive code is concerned, but keeps count of how many handles are holding on to the contents and deletes it when there are none.
You need to be careful there are no dumb C++ pointers to things which are being handled this way.
Things to be handled should implement the same interface as EST_Handleable (either by taking that as a superclass or by reimplementing it) and in addition define object_ptr()
. See EST_TBox for an example.
There are two parameter types. In most cases the thing which contains the reference count and the data it represents will be the same object, but in the case of boxed values it may not be, so you can specify the type of both independently.
Definition at line 70 of file EST_THandle.h.
|
inline |
Definition at line 77 of file EST_THandle.h.
|
inline |
Definition at line 79 of file EST_THandle.h.
|
inline |
Definition at line 81 of file EST_THandle.h.
|
inline |
Definition at line 87 of file EST_THandle.h.
|
inline |
Definition at line 94 of file EST_THandle.h.
|
inline |
Definition at line 96 of file EST_THandle.h.
|
inline |
Definition at line 98 of file EST_THandle.h.
|
inline |
Definition at line 113 of file EST_THandle.h.
|
inline |
Definition at line 125 of file EST_THandle.h.
|
inline |
Definition at line 129 of file EST_THandle.h.
|
inline |
Definition at line 134 of file EST_THandle.h.
|
inline |
Definition at line 135 of file EST_THandle.h.
|
inline |
Definition at line 137 of file EST_THandle.h.
|
inline |
Definition at line 138 of file EST_THandle.h.
|
inline |
Definition at line 139 of file EST_THandle.h.
|
inline |
Definition at line 140 of file EST_THandle.h.
|
friend |
Definition at line 142 of file EST_THandle.h.
|
friend |
Definition at line 144 of file EST_THandle.h.
|
friend |
Definition at line 147 of file EST_THandle.h.