Stxxl
1.4.0
|
Provides reference counting abilities for use with shared_object_pointer. More...
#include <shared_object.h>
Public Member Functions | |
shared_object () | |
shared_object (const shared_object &) | |
const shared_object & | operator= (const shared_object &) const |
shared_object & | operator= (const shared_object &) |
~shared_object () | |
Private Member Functions | |
void | new_reference () const |
Call whenever setting a pointer to the object. | |
bool | delete_reference () const |
Call whenever resetting (i.e. overwriting) a pointer to the object. IMPORTANT: In case of self-assignment, call AFTER new_reference(). | |
bool | unique () const |
if the shared_object is referenced by only one shared_object_pointer | |
Private Attributes | |
int | reference_count |
Provides reference counting abilities for use with shared_object_pointer.
Use as superclass of the actual object. Then either use shared_object_pointer as pointer to manage references and deletion, or just do normal new and delete.
Definition at line 196 of file shared_object.h.
stxxl::shared_object::shared_object | ( | ) | [inline] |
Definition at line 201 of file shared_object.h.
stxxl::shared_object::shared_object | ( | const shared_object & | ) | [inline] |
Definition at line 204 of file shared_object.h.
stxxl::shared_object::~shared_object | ( | ) | [inline] |
Definition at line 213 of file shared_object.h.
bool stxxl::shared_object::delete_reference | ( | ) | const [inline, private] |
Call whenever resetting (i.e. overwriting) a pointer to the object. IMPORTANT: In case of self-assignment, call AFTER new_reference().
Definition at line 226 of file shared_object.h.
void stxxl::shared_object::new_reference | ( | ) | const [inline, private] |
Call whenever setting a pointer to the object.
Definition at line 220 of file shared_object.h.
const shared_object& stxxl::shared_object::operator= | ( | const shared_object & | ) | const [inline] |
Definition at line 207 of file shared_object.h.
shared_object& stxxl::shared_object::operator= | ( | const shared_object & | ) | [inline] |
Definition at line 210 of file shared_object.h.
bool stxxl::shared_object::unique | ( | ) | const [inline, private] |
if the shared_object is referenced by only one shared_object_pointer
Definition at line 230 of file shared_object.h.
int stxxl::shared_object::reference_count [mutable, private] |
Definition at line 198 of file shared_object.h.