An object that tracks scheduled events and automatically cancels them when it is destroyed. It is useful in situations where multiple instances of the same type of event can simultaneously be scheduled, and when the events should be limited to the lifetime of a container object. More...
#include <event-garbage-collector.h>
Classes | |
struct | EventIdLessThanTs |
Public Member Functions | |
void | Track (EventId event) |
Tracks a new event. | |
Private Types | |
typedef std::multiset< EventId, EventIdLessThanTs > | EventList |
Private Member Functions | |
void | Cleanup () |
void | Grow () |
void | Shrink () |
Private Attributes | |
EventList | m_events |
EventList::size_type | m_nextCleanupSize |
An object that tracks scheduled events and automatically cancels them when it is destroyed. It is useful in situations where multiple instances of the same type of event can simultaneously be scheduled, and when the events should be limited to the lifetime of a container object.
Definition at line 38 of file event-garbage-collector.h.