32 #ifndef _Wolframe_SHARED_REFERENCE_HPP_INCLUDED
33 #define _Wolframe_SHARED_REFERENCE_HPP_INCLUDED
38 #include <boost/shared_ptr.hpp>
74 :
m_ref(boost::shared_ptr<Pointer>( new Pointer( ptr))){}
112 return *
m_ref->m_ptr;
Pointer(OBJ *ptr_=0)
Constructor.
Definition: sharedReference.hpp:57
OBJ * m_ptr
object pointer
Definition: sharedReference.hpp:54
boost::shared_ptr< Pointer > m_ref
shared reference
Definition: sharedReference.hpp:116
~Pointer()
Destructor.
Definition: sharedReference.hpp:60
Pointer for reference with another indirection to make the exchange of the object possible...
Definition: sharedReference.hpp:52
virtual ~SharedReference()
Destructor.
Definition: sharedReference.hpp:77
Shared reference to an object exchangeable for all owners in a single thread context.
Definition: sharedReference.hpp:47
SharedReference(const SharedReference &o)
Copy constructor.
Definition: sharedReference.hpp:68
SharedReference & operator=(const SharedReference &o)
Assignment.
Definition: sharedReference.hpp:80
SharedReference(OBJ *ptr=0)
Constructor.
Definition: sharedReference.hpp:73
OBJ * operator->() const
Pointer access operator.
Definition: sharedReference.hpp:103
void reset(OBJ *ptr=0)
Exchange the object (not thread safe access)
Definition: sharedReference.hpp:95
OBJ & operator*() const
Reference access operator.
Definition: sharedReference.hpp:110