17 #ifndef KITE_ROUTING_EVENT_LOOP_H
18 #define KITE_ROUTING_EVENT_LOOP_H
36 inline Element (
size_t id=0,
size_t timestamp=0 );
42 class CompareByTimestamp {
44 inline bool operator() (
const Element& lhs,
const Element& rhs );
50 inline const std::vector<Element>&
getElements ()
const;
52 void erase (
size_t id );
54 std::vector<Element> _elements;
62 inline RoutingEventLoop::Element::Element (
size_t id,
size_t timestamp )
63 : _id(id), _timestamp(timestamp), _count(1)
67 inline bool RoutingEventLoop::CompareByTimestamp::operator() (
const RoutingEventLoop::Element& lhs,
const RoutingEventLoop::Element& rhs )
68 {
return lhs._timestamp > rhs._timestamp; }
73 inline const std::vector<RoutingEventLoop::Element>&
84 #endif // KITE_ROUTING_EVENT_LOOP_H
bool isLooping() const
Definition: RoutingEventLoop.h:71
void erase(size_t id)
Definition: RoutingEventLoop.cpp:65
RoutingEventLoop(size_t depth=10, int limit=20)
Definition: RoutingEventLoop.cpp:31
Simple loop dectector for RoutingEvent.
Definition: RoutingEventLoop.h:32
int getMaxCount() const
Definition: RoutingEventLoop.h:72
void update(size_t id)
Definition: RoutingEventLoop.cpp:40
const std::vector< Element > & getElements() const
Definition: RoutingEventLoop.h:74