|
void | arm (timeout_t timeout) |
| Arm event to trigger at specified timeout.
|
|
void | attach (TimerQueue *queue) |
| Attach event to a timer queue.
|
|
void | detach (void) |
| Detach event from a timer queue.
|
|
void | disarm (void) |
| Disarm event.
|
|
timeout_t | get (void) const |
| Time remaining until expired.
|
|
TimerQueue * | list (void) const |
| Get the timer queue we are attached to.
|
|
timeout_t | operator* () const |
|
void | update (void) |
| Notify timer queue that the timer has been updated.
|
|
virtual | ~event () |
| Detaches from queue when destroyed.
|
|
void | delist (void) |
| Remove our object from the list it is currently part of.
|
|
void | enlist (OrderedIndex *index) |
| Attach our object to a linked list.
|
|
void | enlistHead (OrderedIndex *index) |
| Attach our object to the start of a linked list though an ordered index.
|
|
void | enlistTail (OrderedIndex *index) |
| Attach our object to the end of a linked list though an ordered index.
|
|
DLinkedObject * | getNext (void) const |
| Get next node in the list when iterating.
|
|
DLinkedObject * | getPrev (void) const |
| Get previous node in the list for reverse iteration.
|
|
virtual void | insert (DLinkedObject *object) |
| Insert object, method in derived object.
|
|
void | insertHead (DLinkedObject *object) |
| Insert object in front of our object.
|
|
void | insertTail (DLinkedObject *object) |
| Insert object behind our object.
|
|
bool | is_head (void) const |
| Test if we are at the head of a list.
|
|
bool | is_tail (void) const |
| Test if we are at the end of a list.
|
|
DLinkedObject & | operator*= (DLinkedObject *object) |
| Insert object in list with our object.
|
|
DLinkedObject & | operator+= (DLinkedObject *object) |
| Insert object behind our object.
|
|
DLinkedObject & | operator-= (DLinkedObject *object) |
| Insert object in front of our object.
|
|
void | delist (OrderedIndex *index) |
| Remove our ordered object from an existing index.
|
|
void | enlistHead (OrderedIndex *index) |
| List our ordered object at start of a linked list on an index.
|
|
void | enlistTail (OrderedIndex *index) |
| List our ordered object at end of a linked list on an index.
|
|
OrderedObject * | getNext (void) const |
| Get next ordered member when iterating.
|
|
void | delist (LinkedObject **root) |
| Locate and remove ourselves from a list of objects.
|
|
void | enlist (LinkedObject **root) |
| Add our object to an existing linked list through a pointer.
|
|
LinkedObject * | getNext (void) const |
| Get next effective object when iterating.
|
|
bool | is_member (LinkedObject *list) const |
| Search to see if we are a member of a specific list.
|
|
virtual void | release (void) |
| Release list, mark as no longer linked.
|
|
virtual void | retain (void) |
| Retain by marking as self referenced list.
|
|
ObjectProtocol * | copy (void) |
| Retain (increase retention of) object when copying.
|
|
void | operator++ (void) |
| Increase retention operator.
|
|
void | operator-- (void) |
| Decrease retention operator.
|
|
virtual | ~ObjectProtocol () |
| Required virtual destructor.
|
|
|
| event (timeout_t expire) |
| Construct a timer event object and initially arm.
|
|
| event (TimerQueue *queue, timeout_t expire) |
| Construct an armed timer event object and attach to queue.
|
|
virtual void | expired (void)=0 |
| Event method to call in derived class when timer expires.
|
|
virtual timeout_t | timeout (void) |
| Expected next timeout for the timer.
|
|
bool | is_active (void) const |
| Check if timer active.
|
|
bool | update (void) |
| Check if timer has been updated since last check.
|
|
void | clear (void) |
| Clear pending timer, has no value.
|
|
timeout_t | get (void) const |
| Get remaining time until the timer expires.
|
|
| operator bool () const |
| Check if timer expired for is() expression.
|
|
bool | operator! () const |
| Check if timer has expired.
|
|
bool | operator!= (const Timer &timer) const |
| Compare timers if not same timeout.
|
|
timeout_t | operator* () const |
| Get remaining time until timer expires by reference.
|
|
Timer & | operator+= (time_t expire) |
| Adjust timer expiration.
|
|
Timer & | operator+= (timeout_t expire) |
| Adjust timer expiration.
|
|
timeout_t | operator- (const Timer &timer) |
| Compute difference between two timers.
|
|
Timer & | operator-= (time_t expire) |
| Adjust timer expiration.
|
|
Timer & | operator-= (timeout_t expire) |
| Adjust timer expiration.
|
|
bool | operator< (const Timer &timer) const |
| Compare timers if earlier timeout than another timer.
|
|
bool | operator<= (const Timer &timer) const |
| Compare timers if earlier than or equal to another timer.
|
|
Timer & | operator= (time_t expire) |
| Set timer expiration.
|
|
Timer & | operator= (timeout_t expire) |
| Set timer expiration.
|
|
bool | operator== (const Timer &timer) const |
| Compare timers if same timeout.
|
|
bool | operator> (const Timer &timer) const |
| Compare timers if later timeout than another timer.
|
|
bool | operator>= (const Timer &timer) const |
| Compare timers if later than or equal to another timer.
|
|
void | set (time_t expire) |
| Set the timer to expire.
|
|
void | set (timeout_t expire) |
| Set the timer to expire.
|
|
void | set (void) |
| Set (update) the timer with current time.
|
|
| Timer () |
| Construct an untriggered timer set to the time of creation.
|
|
| Timer (const Timer ©) |
| Construct a timer from a copy of another timer.
|
|
| Timer (time_t offset) |
| Construct a triggered timer that expires at specified offset.
|
|
| Timer (timeout_t offset) |
| Construct a triggered timer that expires at specified offset.
|
|
| DLinkedObject () |
| Construct an unlinked object.
|
|
| DLinkedObject (const DLinkedObject &from) |
|
| DLinkedObject (OrderedIndex *index) |
| Construct and add our object to an existing double linked list at end.
|
|
virtual | ~DLinkedObject () |
| Delete linked list object.
|
|
void | delist (void) |
| Remove our object from the list it is currently part of.
|
|
void | enlist (OrderedIndex *index) |
| Attach our object to a linked list.
|
|
void | enlistHead (OrderedIndex *index) |
| Attach our object to the start of a linked list though an ordered index.
|
|
void | enlistTail (OrderedIndex *index) |
| Attach our object to the end of a linked list though an ordered index.
|
|
DLinkedObject * | getNext (void) const |
| Get next node in the list when iterating.
|
|
DLinkedObject * | getPrev (void) const |
| Get previous node in the list for reverse iteration.
|
|
virtual void | insert (DLinkedObject *object) |
| Insert object, method in derived object.
|
|
void | insertHead (DLinkedObject *object) |
| Insert object in front of our object.
|
|
void | insertTail (DLinkedObject *object) |
| Insert object behind our object.
|
|
bool | is_head (void) const |
| Test if we are at the head of a list.
|
|
bool | is_tail (void) const |
| Test if we are at the end of a list.
|
|
DLinkedObject & | operator*= (DLinkedObject *object) |
| Insert object in list with our object.
|
|
DLinkedObject & | operator+= (DLinkedObject *object) |
| Insert object behind our object.
|
|
DLinkedObject & | operator-= (DLinkedObject *object) |
| Insert object in front of our object.
|
|
| OrderedObject () |
| Construct an ordered object unattached.
|
|
| OrderedObject (const OrderedObject &from) |
|
| OrderedObject (OrderedIndex *index) |
| Construct an ordered object aot end of a an index.
|
|
void | delist (OrderedIndex *index) |
| Remove our ordered object from an existing index.
|
|
void | enlistHead (OrderedIndex *index) |
| List our ordered object at start of a linked list on an index.
|
|
void | enlistTail (OrderedIndex *index) |
| List our ordered object at end of a linked list on an index.
|
|
OrderedObject * | getNext (void) const |
| Get next ordered member when iterating.
|
|
| LinkedObject () |
| Construct base class unattached to anyone.
|
|
| LinkedObject (const LinkedObject &from) |
|
| LinkedObject (LinkedObject **root) |
| Construct base class attached to a chain of objects.
|
|
void | delist (LinkedObject **root) |
| Locate and remove ourselves from a list of objects.
|
|
void | enlist (LinkedObject **root) |
| Add our object to an existing linked list through a pointer.
|
|
LinkedObject * | getNext (void) const |
| Get next effective object when iterating.
|
|
bool | is_member (LinkedObject *list) const |
| Search to see if we are a member of a specific list.
|
|
virtual void | release (void) |
| Release list, mark as no longer linked.
|
|
virtual void | retain (void) |
| Retain by marking as self referenced list.
|
|
ObjectProtocol * | copy (void) |
| Retain (increase retention of) object when copying.
|
|
void | operator++ (void) |
| Increase retention operator.
|
|
void | operator-- (void) |
| Decrease retention operator.
|
|
virtual | ~ObjectProtocol () |
| Required virtual destructor.
|
|
A timer event object that lives on a timer queue.
Timer events are triggered through the timer queue's expire method. Timer events also modify the queue when they are changed, particularly to force re-evaluation of the expiration period. This class is not used by itself but rather as a base class for a timer event object.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 282 of file timers.h.