libzmq  master
ZeroMQ C++ Core Engine (LIBZMQ)
zmq::poller_base_t Class Reference

#include <poller_base.hpp>

Collaboration diagram for zmq::poller_base_t:

Classes

struct  timer_info_t
 

Public Member Functions

 poller_base_t ()
 
virtual ~poller_base_t ()
 
void add_timer (int timeout_, zmq::i_poll_events *sink_, int id_)
 
void cancel_timer (zmq::i_poll_events *sink_, int id_)
 
int get_load ()
 

Protected Member Functions

void adjust_load (int amount_)
 
uint64_t execute_timers ()
 

Private Types

typedef std::multimap< uint64_t, timer_info_ttimers_t
 

Private Member Functions

 poller_base_t (const poller_base_t &)
 
const poller_base_toperator= (const poller_base_t &)
 

Private Attributes

clock_t clock
 
atomic_counter_t load
 
timers_t timers
 

Detailed Description

Definition at line 43 of file poller_base.hpp.

Member Typedef Documentation

typedef std::multimap<uint64_t, timer_info_t> zmq::poller_base_t::timers_t
private

Definition at line 82 of file poller_base.hpp.

Constructor & Destructor Documentation

zmq::poller_base_t::poller_base_t ( )

Definition at line 35 of file poller_base.cpp.

zmq::poller_base_t::~poller_base_t ( )
virtual

Definition at line 39 of file poller_base.cpp.

References get_load(), and zmq_assert.

Here is the call graph for this function:

zmq::poller_base_t::poller_base_t ( const poller_base_t )
private

Member Function Documentation

void zmq::poller_base_t::add_timer ( int  timeout_,
zmq::i_poll_events sink_,
int  id_ 
)

Definition at line 59 of file poller_base.cpp.

References clock, zmq::clock_t::now_ms(), and timers.

Here is the call graph for this function:

void zmq::poller_base_t::adjust_load ( int  amount_)
protected

Definition at line 50 of file poller_base.cpp.

References zmq::atomic_counter_t::add(), load, and zmq::atomic_counter_t::sub().

Here is the call graph for this function:

void zmq::poller_base_t::cancel_timer ( zmq::i_poll_events sink_,
int  id_ 
)

Definition at line 66 of file poller_base.cpp.

References timers, and zmq_assert.

uint64_t zmq::poller_base_t::execute_timers ( )
protected

Definition at line 79 of file poller_base.cpp.

References clock, zmq::clock_t::now_ms(), and timers.

Here is the call graph for this function:

int zmq::poller_base_t::get_load ( )

Definition at line 45 of file poller_base.cpp.

References zmq::atomic_counter_t::get(), and load.

Referenced by ~poller_base_t().

Here is the call graph for this function:

Here is the caller graph for this function:

const poller_base_t& zmq::poller_base_t::operator= ( const poller_base_t )
private

Member Data Documentation

clock_t zmq::poller_base_t::clock
private

Definition at line 74 of file poller_base.hpp.

Referenced by add_timer(), and execute_timers().

atomic_counter_t zmq::poller_base_t::load
private

Definition at line 87 of file poller_base.hpp.

Referenced by adjust_load(), and get_load().

timers_t zmq::poller_base_t::timers
private

Definition at line 83 of file poller_base.hpp.

Referenced by add_timer(), cancel_timer(), and execute_timers().