libqi-api
2.0.6.8
|
#include <trackable.hpp>
Public Member Functions | |
Trackable (T *ptr) | |
~Trackable () | |
boost::shared_ptr< T > | lock () |
boost::weak_ptr< T > | weakPtr () |
void | wait () |
Protected Member Functions | |
void | destroy () |
Object tracking by blocking destruction while shared pointers are present.
Inherit from Trackable to allow a form of tracking that blocks destruction while shared pointers are held. This allows using your class without a shared_ptr wrapper.
Definition at line 40 of file trackable.hpp.
qi::Trackable< T >::Trackable | ( | T * | ptr | ) | [inline] |
Definition at line 21 of file trackable.hxx.
qi::Trackable< T >::~Trackable | ( | ) | [inline] |
Definition at line 54 of file trackable.hxx.
void qi::Trackable< T >::destroy | ( | ) | [inline, protected] |
*Must* be called by parent class destructor, first thing. Can block until lock holders terminate
Definition at line 28 of file trackable.hxx.
boost::shared_ptr< T > qi::Trackable< T >::lock | ( | ) | [inline] |
Definition at line 67 of file trackable.hxx.
void qi::Trackable< T >::wait | ( | ) | [inline] |
Blocks until destroy() is called and all shared_ptr built from weak_ptr() are deleted.
Definition at line 35 of file trackable.hxx.
boost::weak_ptr< T > qi::Trackable< T >::weakPtr | ( | ) | [inline] |
Definition at line 73 of file trackable.hxx.