The Sparta Modeling Framework
|
A class that will track the lifetime of the object it points to. More...
#include <LifeTracker.hpp>
Public Member Functions | |
LifeTracker (TrackedObjectT *obj) | |
Public Attributes | |
TrackedObjectT * | tracked_object |
A class that will track the lifetime of the object it points to.
This class, which derives from std::shared_ptr, allows a developer to "wrap" a non-shared_ptr object with a lifetime time bomb. Receivers of this class can create a std::weak_ptr to it and check for expiration. See example below and in the Utils test.
Definition at line 67 of file LifeTracker.hpp.
|
inline |
Definition at line 70 of file LifeTracker.hpp.
TrackedObjectT* sparta::utils::LifeTracker< TrackedObjectT >::tracked_object |
Definition at line 75 of file LifeTracker.hpp.