Revised OpenFlow Library  v0.6.0dev
 All Classes Files Functions Variables Friends Groups Pages
Public Member Functions | Friends | List of all members
rofl::ctimers Class Reference

List of timers objects of class rofl::ctimer. More...

#include <ctimers.h>

Public Member Functions

virtual ~ctimers ()
 ctimers destructor
 
 ctimers ()
 ctimers default constructor
 
 ctimers (const rofl::ctimers &timers)
 ctimers copy constructor
 
Operators
ctimersoperator= (const rofl::ctimers &t)
 Assignment operator.
 
Managing timers
bool empty ()
 Deletes all timers in this timer list.
 
rofl::ctimer get_next_timer ()
 Returns a copy of the next expiring timer in this timer list. More...
 
const rofl::ctimeridadd_timer (const rofl::ctimer &t)
 Inserts a new timer into the timer list. More...
 
const rofl::ctimeridreset (const rofl::ctimerid &timer_id, const rofl::ctimespec &timespec)
 Resets an existing timer identifier by its handle with a new timeout value. More...
 
rofl::ctimer get_expired_timer ()
 Returns the next timer from timer list, when it has already expired. More...
 
bool pending (const rofl::ctimerid &timer_id)
 Checks whether a certain timer identified by the given handle is still pending. More...
 
void cancel (const ctimerid &timer_id)
 Removes a timer identified by the given timer handle from this timer list. More...
 
void clear ()
 Removes all timers from this timer list.
 

Friends

std::ostream & operator<< (std::ostream &os, const rofl::ctimers &t)
 

Detailed Description

List of timers objects of class rofl::ctimer.

Member Function Documentation

const rofl::ctimerid& rofl::ctimers::add_timer ( const rofl::ctimer t)
inline

Inserts a new timer into the timer list.

Returns
rofl-common's timer handle
void rofl::ctimers::cancel ( const ctimerid timer_id)
inline

Removes a timer identified by the given timer handle from this timer list.

Parameters
timer_idtimer handle
rofl::ctimer rofl::ctimers::get_expired_timer ( )
inline

Returns the next timer from timer list, when it has already expired.

This method is used for reading in a loop all timers that have already expired. If no or no further timers have expired, an exception is thrown.

Returns
copy of rofl::ctimer instance that has expired
Exceptions
eTimersNotFoundno (or no further) expired timer in timer list
rofl::ctimer rofl::ctimers::get_next_timer ( )
inline

Returns a copy of the next expiring timer in this timer list.

Exceptions
eTimersNotFoundtimer list is empty
bool rofl::ctimers::pending ( const rofl::ctimerid timer_id)
inline

Checks whether a certain timer identified by the given handle is still pending.

Parameters
timer_idtimer handle
Returns
true, when the timer still exists
const rofl::ctimerid& rofl::ctimers::reset ( const rofl::ctimerid timer_id,
const rofl::ctimespec timespec 
)
inline

Resets an existing timer identifier by its handle with a new timeout value.

Please note, the returned timer handle differs from the one previously identifying the timer!

Parameters
timer_idhandle to existing timer
timespecnew timeout value
Returns
const reference to new timer handle
Exceptions
eTimersNotFoundtimer handle not found

The documentation for this class was generated from the following file: