Stxxl  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
stxxl::shared_object_pointer< C > Class Template Reference

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>

Inheritance diagram for stxxl::shared_object_pointer< C >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 shared_object_pointer ()
 shared_object_pointer (C *pointer)
 shared_object_pointer (const shared_object_pointer &shared_pointer)
shared_object_pointeroperator= (const shared_object_pointer &shared_pointer)
shared_object_pointeroperator= (C *pointer)
 ~shared_object_pointer ()
Coperator* () const
Coperator-> () const
 operator C * () const
Cget () 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

Cptr

Detailed Description

template<class C>
class stxxl::shared_object_pointer< C >

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.


Constructor & Destructor Documentation

template<class C>
stxxl::shared_object_pointer< C >::shared_object_pointer ( ) [inline]

Definition at line 41 of file shared_object.h.

template<class C>
stxxl::shared_object_pointer< C >::shared_object_pointer ( C pointer) [inline]

Definition at line 44 of file shared_object.h.

template<class C>
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.

template<class C>
stxxl::shared_object_pointer< C >::~shared_object_pointer ( ) [inline]

Definition at line 63 of file shared_object.h.


Member Function Documentation

template<class C>
void stxxl::shared_object_pointer< C >::delete_reference ( ) [inline, private]

Definition at line 37 of file shared_object.h.

template<class C>
bool stxxl::shared_object_pointer< C >::empty ( ) const [inline]

Definition at line 93 of file shared_object.h.

template<class C>
C* stxxl::shared_object_pointer< C >::get ( ) const [inline]

Definition at line 81 of file shared_object.h.

template<class C>
void stxxl::shared_object_pointer< C >::new_reference ( ) [inline, private]
template<class C>
void stxxl::shared_object_pointer< C >::new_reference ( C o) [inline, private]

Definition at line 34 of file shared_object.h.

template<class C>
stxxl::shared_object_pointer< C >::operator bool ( ) const [inline]

Definition at line 87 of file shared_object.h.

template<class C>
stxxl::shared_object_pointer< C >::operator C * ( ) const [inline]

Definition at line 78 of file shared_object.h.

template<class C>
C& stxxl::shared_object_pointer< C >::operator* ( ) const [inline]

Definition at line 66 of file shared_object.h.

template<class C>
C* stxxl::shared_object_pointer< C >::operator-> ( ) const [inline]

Definition at line 72 of file shared_object.h.

template<class C>
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.

template<class C>
shared_object_pointer& stxxl::shared_object_pointer< C >::operator= ( C pointer) [inline]

Definition at line 55 of file shared_object.h.

template<class C>
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.

template<class C>
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.

template<class C>
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.

template<class C>
bool stxxl::shared_object_pointer< C >::valid ( ) const [inline]

Definition at line 90 of file shared_object.h.


Member Data Documentation

template<class C>
C* stxxl::shared_object_pointer< C >::ptr [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines