24namespace shamrock::solvergraph {
95 inline void trace_state_update(T &
object) {
106 on_event(this->uuid, event_info_builder());
std::uint64_t u64
64 bit unsigned integer
A class that provides unique identifiers (UUID) to instances.
WithUUID & operator=(const WithUUID &)=delete
would duplicate the uuid
static void(* on_state_update)(T &object)
Called when the state of a tracked object changes (e.g. edges are rebound).
~LifetimeTracker()
Destructor, notifies destruction (unless already notified, or moved from).
static void(* on_create)(u64 uuid)
Called when a tracked object is created.
LifetimeTracker(LifetimeTracker &&) noexcept=default
Move constructor: transfers the uuid to this and invalidates other.
void trace_create()
Notifies creation of the tracked object.
void trace_event(F &&event_info_builder)
LifetimeTracker()
Constructor, notifies the creation of the tracked object.
static void(* on_destroy)(u64 uuid)
Called when a tracked object is destroyed.
LifetimeTracker(const LifetimeTracker &)=delete
would duplicate the UUID
LifetimeTracker & operator=(const LifetimeTracker &)=delete
would duplicate the UUID
static void(* on_event)(u64 uuid, std::string_view s)
Called when an operation is performed on a tracked object (e.g. evaluation).
void trace_destroy()
Fires the destroy notification, if not already fired or moved from. Idempotent.
namespace for basic c++ utilities