Robert Osfield
65c09c8e0d
From Tim Moore, improved doxygen comments
2010-05-17 14:43:41 +00:00
Robert Osfield
ccd9f31309
Removed signalUnreffed interface
2010-05-17 14:21:53 +00:00
Robert Osfield
f832198128
From Tim Moore, refactore WeakReference/Referenced to avoid signalling the observers when do a unref_nodelete.
2010-05-17 09:03:44 +00:00
Robert Osfield
2b2ea4487a
From Tim Moore, new more robust observer_ptr<> implementation
2010-05-14 12:14:14 +00:00
Robert Osfield
51924431cd
Fixed warnings
2010-04-13 09:42:53 +00:00
Robert Osfield
bb21136d92
Added missing _ptr = rp._ptr to constructor.
2010-02-22 08:39:33 +00:00
Robert Osfield
eca4361c4a
Clean up observer_ptr<> and removed the eronous casting of ptr in objectDeleted.
2010-02-19 19:50:55 +00:00
Robert Osfield
b807fc83fe
Added mutex lock to destructor.
2010-02-19 16:04:33 +00:00
Robert Osfield
8f11af8d3e
Replaced local mutex with getObserverMutex().
2010-02-19 15:41:42 +00:00
Robert Osfield
26a9e499a4
Fixed crash
2010-02-16 14:05:49 +00:00
Robert Osfield
a8e26f3a0c
Threads safety fixes based on suggestions from Tim Moore.
2010-02-16 11:10:49 +00:00
Robert Osfield
644b2e15d1
Refactored the osg::Observer to introduce a new bool Observer::objectUnreferenced(void*) method that adds
...
the extra capability of making it possible for Observers to assume ownership of a object that would otherwsie be deleted.
Added a thread safe ref_ptr<T> observer_ptr<T>::lock() method for robust access to an observed object. This
makes observer_ptr<> more equivilant to boosts weak_ptr.
2010-02-15 20:12:53 +00:00
Robert Osfield
1be388c705
Changed the const get(), operator*() and operator->() methods to return non const T versions
2008-03-14 11:06:35 +00:00
Robert Osfield
4ab9c6f5f4
Removed check from objectDeleted(void*) method as this was not catching cases
...
where the registered ptr was different from the deleted ptr - something that
can happen with multiple inheritance.
2006-11-26 22:27:09 +00:00
Robert Osfield
f1c2694c17
Updated copyright years.
2006-07-18 15:21:48 +00:00
Robert Osfield
8f2ffb7c2d
Added new observer_ptr templated smart pointer to allow one to retain pointers
...
to objects but have the pointer reset to null if that object is deleted.
2006-02-27 19:44:33 +00:00