#include <scim_pointer.h>
Collaboration diagram for scim::Pointer< T >:
Public Member Functions | |
Constructors | |
Pointer (T *object=0) | |
Pointer (Pointer &src) | |
template<typename T1> | Pointer (const Pointer< T1 > &src) |
~Pointer () | |
Pointer & | operator= (T *object) |
Pointer & | operator= (const Pointer &src) |
template<typename T1> Pointer & | operator= (const Pointer< T1 > &src) |
Accessors | |
T & | operator * () const |
T * | operator-> () const |
operator T * () const | |
T * | get () const |
bool | null () const |
Returns true if the Pointer has no dumb pointer. | |
Methods | |
T * | release () |
void | reset (T *object=0) |
Friends | |
template<typename T1, typename T2> bool | operator== (const Pointer< T1 > &t1, const Pointer< T2 > &t2) |
Pointer is a standard auto_ptr-like smart pointer for managing heap allocated reference counted objects. T must be a class derived from scim::ReferencedObject.
Definition at line 56 of file scim_pointer.h.
|
Construct a new smart pointer. <
Definition at line 80 of file scim_pointer.h. |
|
Copy constructor. <
Definition at line 89 of file scim_pointer.h. |
|
Copy constructor. <
Definition at line 99 of file scim_pointer.h. |
|
Destructor. < Decreases the object reference count. Definition at line 109 of file scim_pointer.h. |
|
Assignment operator. <
Definition at line 116 of file scim_pointer.h. |
|
Assignment operator. <
Definition at line 127 of file scim_pointer.h. |
|
Assignment operator. <
Definition at line 139 of file scim_pointer.h. |
|
Dereference operator. <
Definition at line 155 of file scim_pointer.h. |
|
Member selection operator. <
Definition at line 162 of file scim_pointer.h. |
|
Conversion operator. < Converts a Pointer into its dumb pointer: the C pointer it manages. < Normally it is considered pretty evil to mix smart and regular pointers. < In scim you can safely if you just follow the reference counting rules < for each of them. You can never call delete on Pointer either because < you don't call delete on scim objects; you call unref(). Definition at line 169 of file scim_pointer.h. |
|
Returns the dumb pointer; the regular C pointer managed by the Pointer. <
Definition at line 180 of file scim_pointer.h. Referenced by scim::Pointer< BackEndBase >::operator *(), scim::Pointer< BackEndBase >::operator T *(), scim::Pointer< BackEndBase >::operator->(), scim::Pointer< BackEndBase >::operator=(), and scim::Pointer< BackEndBase >::Pointer(). |
|
Returns true if the Pointer has no dumb pointer.
Definition at line 187 of file scim_pointer.h. |
|
Releases the dumb pointer. <
Definition at line 197 of file scim_pointer.h. |
|
Sets a new dumb pointer for the Pointer to manage. <
Definition at line 212 of file scim_pointer.h. |
|
Compares two Pointers. <
Definition at line 229 of file scim_pointer.h. |