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

#include <mtrie.hpp>

Collaboration diagram for zmq::mtrie_t:

Public Member Functions

 mtrie_t ()
 
 ~mtrie_t ()
 
bool add (unsigned char *prefix_, size_t size_, zmq::pipe_t *pipe_)
 
void match (unsigned char *data_, size_t size_, void(*func_)(zmq::pipe_t *pipe_, void *arg_), void *arg_)
 
void rm (zmq::pipe_t *pipe_, void(*func_)(unsigned char *data_, size_t size_, void *arg_), void *arg_, bool call_on_uniq_)
 
bool rm (unsigned char *prefix_, size_t size_, zmq::pipe_t *pipe_)
 

Private Types

typedef std::set< zmq::pipe_t * > pipes_t
 

Private Member Functions

 mtrie_t (const mtrie_t &)
 
bool add_helper (unsigned char *prefix_, size_t size_, zmq::pipe_t *pipe_)
 
bool is_redundant () const
 
const mtrie_toperator= (const mtrie_t &)
 
void rm_helper (zmq::pipe_t *pipe_, unsigned char **buff_, size_t buffsize_, size_t maxbuffsize_, void(*func_)(unsigned char *data_, size_t size_, void *arg_), void *arg_, bool call_on_uniq_)
 
bool rm_helper (unsigned char *prefix_, size_t size_, zmq::pipe_t *pipe_)
 

Private Attributes

unsigned short count
 
unsigned short live_nodes
 
unsigned char min
 
union {
   class mtrie_t *   node
 
   class mtrie_t **   table
 
next
 
pipes_tpipes
 

Detailed Description

Definition at line 45 of file mtrie.hpp.

Member Typedef Documentation

typedef std::set<zmq::pipe_t*> zmq::mtrie_t::pipes_t
private

Definition at line 84 of file mtrie.hpp.

Constructor & Destructor Documentation

zmq::mtrie_t::mtrie_t ( )

Definition at line 46 of file mtrie.cpp.

zmq::mtrie_t::~mtrie_t ( )

Definition at line 54 of file mtrie.cpp.

References count, LIBZMQ_DELETE, next, pipes, and zmq_assert.

zmq::mtrie_t::mtrie_t ( const mtrie_t )
private

Member Function Documentation

bool zmq::mtrie_t::add ( unsigned char *  prefix_,
size_t  size_,
zmq::pipe_t pipe_ 
)

Definition at line 72 of file mtrie.cpp.

References add_helper().

Referenced by zmq::xpub_t::xattach_pipe(), zmq::xpub_t::xread_activated(), and zmq::xpub_t::xsetsockopt().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zmq::mtrie_t::add_helper ( unsigned char *  prefix_,
size_t  size_,
zmq::pipe_t pipe_ 
)
private

Definition at line 77 of file mtrie.cpp.

References alloc_assert, count, live_nodes, min, next, and pipes.

Referenced by add().

Here is the caller graph for this function:

bool zmq::mtrie_t::is_redundant ( ) const
private

Definition at line 438 of file mtrie.cpp.

References live_nodes, and pipes.

Referenced by rm_helper().

Here is the caller graph for this function:

void zmq::mtrie_t::match ( unsigned char *  data_,
size_t  size_,
void(*)(zmq::pipe_t *pipe_, void *arg_)  func_,
void *  arg_ 
)

Definition at line 395 of file mtrie.cpp.

References count, min, next, node, pipes, and table.

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

Here is the caller graph for this function:

const mtrie_t& zmq::mtrie_t::operator= ( const mtrie_t )
private
void zmq::mtrie_t::rm ( zmq::pipe_t pipe_,
void(*)(unsigned char *data_, size_t size_, void *arg_)  func_,
void *  arg_,
bool  call_on_uniq_ 
)

Definition at line 160 of file mtrie.cpp.

References rm_helper().

Referenced by zmq::xpub_t::xpipe_terminated(), zmq::xpub_t::xread_activated(), and zmq::xpub_t::xsetsockopt().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zmq::mtrie_t::rm ( unsigned char *  prefix_,
size_t  size_,
zmq::pipe_t pipe_ 
)

Definition at line 293 of file mtrie.cpp.

References rm_helper().

Here is the call graph for this function:

void zmq::mtrie_t::rm_helper ( zmq::pipe_t pipe_,
unsigned char **  buff_,
size_t  buffsize_,
size_t  maxbuffsize_,
void(*)(unsigned char *data_, size_t size_, void *arg_)  func_,
void *  arg_,
bool  call_on_uniq_ 
)
private

Definition at line 169 of file mtrie.cpp.

References alloc_assert, count, LIBZMQ_DELETE, live_nodes, min, next, node, pipes, and zmq_assert.

Referenced by rm(), and rm_helper().

Here is the caller graph for this function:

bool zmq::mtrie_t::rm_helper ( unsigned char *  prefix_,
size_t  size_,
zmq::pipe_t pipe_ 
)
private

Definition at line 298 of file mtrie.cpp.

References alloc_assert, count, is_redundant(), LIBZMQ_DELETE, live_nodes, min, next, pipes, rm_helper(), and zmq_assert.

Here is the call graph for this function:

Member Data Documentation

unsigned short zmq::mtrie_t::count
private

Definition at line 88 of file mtrie.hpp.

Referenced by add_helper(), match(), rm_helper(), and ~mtrie_t().

unsigned short zmq::mtrie_t::live_nodes
private

Definition at line 89 of file mtrie.hpp.

Referenced by add_helper(), is_redundant(), and rm_helper().

unsigned char zmq::mtrie_t::min
private

Definition at line 87 of file mtrie.hpp.

Referenced by add_helper(), match(), and rm_helper().

union { ... } zmq::mtrie_t::next

Referenced by add_helper(), match(), rm_helper(), and ~mtrie_t().

class mtrie_t* zmq::mtrie_t::node

Definition at line 91 of file mtrie.hpp.

Referenced by match(), and rm_helper().

pipes_t* zmq::mtrie_t::pipes
private

Definition at line 85 of file mtrie.hpp.

Referenced by add_helper(), is_redundant(), match(), rm_helper(), and ~mtrie_t().

class mtrie_t** zmq::mtrie_t::table

Definition at line 92 of file mtrie.hpp.

Referenced by match().