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

#include <dist.hpp>

Collaboration diagram for zmq::dist_t:

Public Member Functions

 dist_t ()
 
 ~dist_t ()
 
void activated (zmq::pipe_t *pipe_)
 
void attach (zmq::pipe_t *pipe_)
 
bool check_hwm ()
 
bool has_out ()
 
void match (zmq::pipe_t *pipe_)
 
void pipe_terminated (zmq::pipe_t *pipe_)
 
void reverse_match ()
 
int send_to_all (zmq::msg_t *msg_)
 
int send_to_matching (zmq::msg_t *msg_)
 
void unmatch ()
 

Private Types

typedef array_t< zmq::pipe_t, 2 > pipes_t
 

Private Member Functions

 dist_t (const dist_t &)
 
void distribute (zmq::msg_t *msg_)
 
const dist_toperator= (const dist_t &)
 
bool write (zmq::pipe_t *pipe_, zmq::msg_t *msg_)
 

Private Attributes

pipes_t::size_type active
 
pipes_t::size_type eligible
 
pipes_t::size_type matching
 
bool more
 
pipes_t pipes
 

Detailed Description

Definition at line 46 of file dist.hpp.

Member Typedef Documentation

Definition at line 93 of file dist.hpp.

Constructor & Destructor Documentation

zmq::dist_t::dist_t ( )

Definition at line 37 of file dist.cpp.

zmq::dist_t::~dist_t ( )

Definition at line 45 of file dist.cpp.

References zmq::array_t< T, ID >::empty(), pipes, and zmq_assert.

Here is the call graph for this function:

zmq::dist_t::dist_t ( const dist_t )
private

Member Function Documentation

void zmq::dist_t::activated ( zmq::pipe_t pipe_)

Definition at line 124 of file dist.cpp.

References active, eligible, zmq::array_t< T, ID >::index(), more, pipes, zmq::array_t< T, ID >::size(), and zmq::array_t< T, ID >::swap().

Referenced by zmq::xsub_t::xwrite_activated(), zmq::xpub_t::xwrite_activated(), zmq::radio_t::xwrite_activated(), and zmq::dish_t::xwrite_activated().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::dist_t::attach ( zmq::pipe_t pipe_)

Definition at line 50 of file dist.cpp.

References active, eligible, more, pipes, zmq::array_t< T, ID >::push_back(), zmq::array_t< T, ID >::size(), and zmq::array_t< T, ID >::swap().

Referenced by zmq::xsub_t::xattach_pipe(), zmq::xpub_t::xattach_pipe(), zmq::dish_t::xattach_pipe(), and zmq::radio_t::xattach_pipe().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zmq::dist_t::check_hwm ( )

Definition at line 226 of file dist.cpp.

References matching, and pipes.

Referenced by zmq::xpub_t::xsend().

Here is the caller graph for this function:

void zmq::dist_t::distribute ( zmq::msg_t msg_)
private

Definition at line 163 of file dist.cpp.

References zmq::msg_t::add_refs(), zmq::msg_t::close(), errno_assert, zmq::msg_t::init(), zmq::msg_t::is_vsm(), matching, pipes, zmq::msg_t::rm_refs(), unlikely, and write().

Referenced by send_to_matching().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zmq::dist_t::has_out ( )

Definition at line 205 of file dist.cpp.

Referenced by zmq::xpub_t::xhas_out(), and zmq::radio_t::xhas_out().

Here is the caller graph for this function:

void zmq::dist_t::match ( zmq::pipe_t pipe_)

Definition at line 68 of file dist.cpp.

References eligible, zmq::array_t< T, ID >::index(), matching, pipes, and zmq::array_t< T, ID >::swap().

Referenced by zmq::xpub_t::mark_as_matching(), and zmq::radio_t::xsend().

Here is the call graph for this function:

Here is the caller graph for this function:

const dist_t& zmq::dist_t::operator= ( const dist_t )
private
void zmq::dist_t::pipe_terminated ( zmq::pipe_t pipe_)

Definition at line 104 of file dist.cpp.

References active, eligible, zmq::array_t< T, ID >::erase(), zmq::array_t< T, ID >::index(), matching, pipes, and zmq::array_t< T, ID >::swap().

Referenced by zmq::xsub_t::xpipe_terminated(), zmq::radio_t::xpipe_terminated(), zmq::xpub_t::xpipe_terminated(), and zmq::dish_t::xpipe_terminated().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::dist_t::reverse_match ( )

Definition at line 83 of file dist.cpp.

References eligible, matching, pipes, zmq::array_t< T, ID >::swap(), and unmatch().

Referenced by zmq::xpub_t::xsend().

Here is the call graph for this function:

Here is the caller graph for this function:

int zmq::dist_t::send_to_all ( zmq::msg_t msg_)

Definition at line 140 of file dist.cpp.

References active, matching, and send_to_matching().

Referenced by zmq::dish_t::xjoin(), zmq::dish_t::xleave(), and zmq::xsub_t::xsend().

Here is the call graph for this function:

Here is the caller graph for this function:

int zmq::dist_t::send_to_matching ( zmq::msg_t msg_)

Definition at line 146 of file dist.cpp.

References active, distribute(), eligible, zmq::msg_t::flags, zmq::msg_t::more, and more.

Referenced by send_to_all(), zmq::xpub_t::xsend(), and zmq::radio_t::xsend().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::dist_t::unmatch ( )

Definition at line 99 of file dist.cpp.

References matching.

Referenced by reverse_match(), zmq::xpub_t::xsend(), and zmq::radio_t::xsend().

Here is the caller graph for this function:

bool zmq::dist_t::write ( zmq::pipe_t pipe_,
zmq::msg_t msg_ 
)
private

Definition at line 210 of file dist.cpp.

References active, eligible, zmq::msg_t::flags, zmq::pipe_t::flush(), zmq::array_t< T, ID >::index(), matching, zmq::msg_t::more, pipes, zmq::array_t< T, ID >::swap(), and zmq::pipe_t::write().

Referenced by distribute().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

pipes_t::size_type zmq::dist_t::active
private

Definition at line 102 of file dist.hpp.

Referenced by activated(), attach(), pipe_terminated(), send_to_all(), send_to_matching(), and write().

pipes_t::size_type zmq::dist_t::eligible
private

Definition at line 109 of file dist.hpp.

Referenced by activated(), attach(), match(), pipe_terminated(), reverse_match(), send_to_matching(), and write().

pipes_t::size_type zmq::dist_t::matching
private
bool zmq::dist_t::more
private

Definition at line 112 of file dist.hpp.

Referenced by activated(), attach(), and send_to_matching().

pipes_t zmq::dist_t::pipes
private