Stxxl
1.4.0
|
Behaves much like a Pointer, plus deleteing the referred object with it's last reference and ability to unify, i.e. make and refer a copy if the original object was shared. More...
#include <shared_object.h>
Public Member Functions | |
shared_object_pointer () | |
shared_object_pointer (C *pointer) | |
shared_object_pointer (const shared_object_pointer &shared_pointer) | |
shared_object_pointer & | operator= (const shared_object_pointer &shared_pointer) |
shared_object_pointer & | operator= (C *pointer) |
~shared_object_pointer () | |
C & | operator* () const |
C * | operator-> () const |
operator C * () const | |
C * | get () const |
bool | operator== (const shared_object_pointer &shared_pointer) const |
operator bool () const | |
bool | valid () const |
bool | empty () const |
bool | unique () const |
if the object is referred by this shared_object_pointer only | |
void | unify () |
Make and refer a copy if the original object was shared. | |
Private Member Functions | |
void | new_reference () |
void | new_reference (C *o) |
void | delete_reference () |
Private Attributes | |
C * | ptr |
Behaves much like a Pointer, plus deleteing the referred object with it's last reference and ability to unify, i.e. make and refer a copy if the original object was shared.
Use with objects derived from shared_object. Similar to boost/shared_ptr.
Definition at line 27 of file shared_object.h.
stxxl::shared_object_pointer< C >::shared_object_pointer | ( | ) | [inline] |
Definition at line 41 of file shared_object.h.
stxxl::shared_object_pointer< C >::shared_object_pointer | ( | C * | pointer | ) | [inline] |
Definition at line 44 of file shared_object.h.
stxxl::shared_object_pointer< C >::shared_object_pointer | ( | const shared_object_pointer< C > & | shared_pointer | ) | [inline] |
Definition at line 48 of file shared_object.h.
stxxl::shared_object_pointer< C >::~shared_object_pointer | ( | ) | [inline] |
Definition at line 63 of file shared_object.h.
void stxxl::shared_object_pointer< C >::delete_reference | ( | ) | [inline, private] |
Definition at line 37 of file shared_object.h.
bool stxxl::shared_object_pointer< C >::empty | ( | ) | const [inline] |
Definition at line 93 of file shared_object.h.
C* stxxl::shared_object_pointer< C >::get | ( | ) | const [inline] |
Definition at line 81 of file shared_object.h.
void stxxl::shared_object_pointer< C >::new_reference | ( | ) | [inline, private] |
Definition at line 31 of file shared_object.h.
Referenced by stxxl::shared_object_pointer< swappable_block_matrix_type >::new_reference().
void stxxl::shared_object_pointer< C >::new_reference | ( | C * | o | ) | [inline, private] |
Definition at line 34 of file shared_object.h.
stxxl::shared_object_pointer< C >::operator bool | ( | ) | const [inline] |
Definition at line 87 of file shared_object.h.
stxxl::shared_object_pointer< C >::operator C * | ( | ) | const [inline] |
Definition at line 78 of file shared_object.h.
C& stxxl::shared_object_pointer< C >::operator* | ( | ) | const [inline] |
Definition at line 66 of file shared_object.h.
C* stxxl::shared_object_pointer< C >::operator-> | ( | ) | const [inline] |
Definition at line 72 of file shared_object.h.
shared_object_pointer& stxxl::shared_object_pointer< C >::operator= | ( | const shared_object_pointer< C > & | shared_pointer | ) | [inline] |
Definition at line 52 of file shared_object.h.
shared_object_pointer& stxxl::shared_object_pointer< C >::operator= | ( | C * | pointer | ) | [inline] |
Definition at line 55 of file shared_object.h.
bool stxxl::shared_object_pointer< C >::operator== | ( | const shared_object_pointer< C > & | shared_pointer | ) | const [inline] |
Definition at line 84 of file shared_object.h.
void stxxl::shared_object_pointer< C >::unify | ( | ) | [inline] |
Make and refer a copy if the original object was shared.
Definition at line 101 of file shared_object.h.
bool stxxl::shared_object_pointer< C >::unique | ( | ) | const [inline] |
if the object is referred by this shared_object_pointer only
Definition at line 97 of file shared_object.h.
bool stxxl::shared_object_pointer< C >::valid | ( | ) | const [inline] |
Definition at line 90 of file shared_object.h.
C* stxxl::shared_object_pointer< C >::ptr [private] |
Definition at line 29 of file shared_object.h.
Referenced by stxxl::shared_object_pointer< swappable_block_matrix_type >::operator=(), and stxxl::shared_object_pointer< swappable_block_matrix_type >::operator==().