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

#include <object.hpp>

Inheritance diagram for zmq::object_t:
Collaboration diagram for zmq::object_t:

Public Member Functions

 object_t (zmq::ctx_t *ctx_, uint32_t tid_)
 
 object_t (object_t *parent_)
 
virtual ~object_t ()
 
ctx_tget_ctx ()
 
uint32_t get_tid ()
 
void process_command (zmq::command_t &cmd_)
 
void send_bind (zmq::own_t *destination_, zmq::pipe_t *pipe_, bool inc_seqnum_=true)
 
void send_inproc_connected (zmq::socket_base_t *socket_)
 
void set_tid (uint32_t id)
 

Protected Member Functions

zmq::io_thread_tchoose_io_thread (uint64_t affinity_)
 
void connect_pending (const char *addr_, zmq::socket_base_t *bind_socket_)
 
void destroy_socket (zmq::socket_base_t *socket_)
 
zmq::endpoint_t find_endpoint (const char *addr_)
 
void log (const char *format_,...)
 
void pend_connection (const std::string &addr_, const endpoint_t &endpoint, pipe_t **pipes_)
 
virtual void process_activate_read ()
 
virtual void process_activate_write (uint64_t msgs_read_)
 
virtual void process_attach (zmq::i_engine *engine_)
 
virtual void process_bind (zmq::pipe_t *pipe_)
 
virtual void process_hiccup (void *pipe_)
 
virtual void process_own (zmq::own_t *object_)
 
virtual void process_pipe_term ()
 
virtual void process_pipe_term_ack ()
 
virtual void process_plug ()
 
virtual void process_reap (zmq::socket_base_t *socket_)
 
virtual void process_reaped ()
 
virtual void process_seqnum ()
 
virtual void process_stop ()
 
virtual void process_term (int linger_)
 
virtual void process_term_ack ()
 
virtual void process_term_req (zmq::own_t *object_)
 
int register_endpoint (const char *addr_, const zmq::endpoint_t &endpoint_)
 
void send_activate_read (zmq::pipe_t *destination_)
 
void send_activate_write (zmq::pipe_t *destination_, uint64_t msgs_read_)
 
void send_attach (zmq::session_base_t *destination_, zmq::i_engine *engine_, bool inc_seqnum_=true)
 
void send_done ()
 
void send_hiccup (zmq::pipe_t *destination_, void *pipe_)
 
void send_own (zmq::own_t *destination_, zmq::own_t *object_)
 
void send_pipe_term (zmq::pipe_t *destination_)
 
void send_pipe_term_ack (zmq::pipe_t *destination_)
 
void send_plug (zmq::own_t *destination_, bool inc_seqnum_=true)
 
void send_reap (zmq::socket_base_t *socket_)
 
void send_reaped ()
 
void send_stop ()
 
void send_term (zmq::own_t *destination_, int linger_)
 
void send_term_ack (zmq::own_t *destination_)
 
void send_term_req (zmq::own_t *destination_, zmq::own_t *object_)
 
int unregister_endpoint (const std::string &addr_, socket_base_t *socket_)
 
void unregister_endpoints (zmq::socket_base_t *socket_)
 

Private Member Functions

 object_t (const object_t &)
 
const object_toperator= (const object_t &)
 
void send_command (command_t &cmd_)
 

Private Attributes

zmq::ctx_tctx
 
uint32_t tid
 

Detailed Description

Definition at line 53 of file object.hpp.

Constructor & Destructor Documentation

zmq::object_t::object_t ( zmq::ctx_t ctx_,
uint32_t  tid_ 
)

Definition at line 42 of file object.cpp.

zmq::object_t::object_t ( object_t parent_)

Definition at line 48 of file object.cpp.

zmq::object_t::~object_t ( )
virtual

Definition at line 54 of file object.cpp.

zmq::object_t::object_t ( const object_t )
private

Member Function Documentation

zmq::io_thread_t * zmq::object_t::choose_io_thread ( uint64_t  affinity_)
protected

Definition at line 189 of file object.cpp.

References zmq::ctx_t::choose_io_thread(), and ctx.

Referenced by zmq::socket_base_t::bind(), zmq::socket_base_t::connect(), zmq::tcp_listener_t::in_event(), zmq::ipc_listener_t::in_event(), and zmq::session_base_t::start_connecting().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::connect_pending ( const char *  addr_,
zmq::socket_base_t bind_socket_ 
)
protected

Definition at line 179 of file object.cpp.

References zmq::ctx_t::connect_pending(), and ctx.

Referenced by zmq::socket_base_t::bind().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::destroy_socket ( zmq::socket_base_t socket_)
protected

Definition at line 184 of file object.cpp.

References ctx, and zmq::ctx_t::destroy_socket().

Referenced by zmq::socket_base_t::check_destroy().

Here is the call graph for this function:

Here is the caller graph for this function:

zmq::endpoint_t zmq::object_t::find_endpoint ( const char *  addr_)
protected

Definition at line 168 of file object.cpp.

References ctx, and zmq::ctx_t::find_endpoint().

Referenced by zmq::socket_base_t::connect(), and zmq::session_base_t::zap_connect().

Here is the call graph for this function:

Here is the caller graph for this function:

zmq::ctx_t * zmq::object_t::get_ctx ( )

Definition at line 68 of file object.cpp.

References ctx.

Referenced by zmq::socket_base_t::connect(), and zmq::socket_base_t::monitor().

Here is the caller graph for this function:

uint32_t zmq::object_t::get_tid ( )

Definition at line 58 of file object.cpp.

References tid.

Referenced by zmq::ctx_t::connect_inproc_sockets(), zmq::ctx_t::destroy_socket(), and send_command().

Here is the caller graph for this function:

void zmq::object_t::log ( const char *  format_,
  ... 
)
protected
const object_t& zmq::object_t::operator= ( const object_t )
private
void zmq::object_t::pend_connection ( const std::string &  addr_,
const endpoint_t endpoint,
pipe_t **  pipes_ 
)
protected

Definition at line 173 of file object.cpp.

References ctx, and zmq::ctx_t::pend_connection().

Referenced by zmq::socket_base_t::connect().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::process_activate_read ( )
protectedvirtual

Reimplemented in zmq::pipe_t.

Definition at line 379 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_activate_write ( uint64_t  msgs_read_)
protectedvirtual

Reimplemented in zmq::pipe_t.

Definition at line 384 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_attach ( zmq::i_engine engine_)
protectedvirtual

Reimplemented in zmq::session_base_t.

Definition at line 369 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_bind ( zmq::pipe_t pipe_)
protectedvirtual

Reimplemented in zmq::socket_base_t.

Definition at line 374 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_command ( zmq::command_t cmd_)

Definition at line 73 of file object.cpp.

References zmq::command_t::activate_read, zmq::command_t::activate_write, zmq::command_t::args_t::activate_write, zmq::command_t::args, zmq::command_t::attach, zmq::command_t::args_t::attach, zmq::command_t::bind, zmq::command_t::args_t::bind, zmq::command_t::done, zmq::command_t::args_t::engine, zmq::command_t::hiccup, zmq::command_t::args_t::hiccup, zmq::command_t::inproc_connected, zmq::command_t::args_t::linger, zmq::command_t::args_t::msgs_read, zmq::command_t::args_t::object, zmq::command_t::own, zmq::command_t::args_t::own, zmq::command_t::args_t::pipe, zmq::command_t::pipe_term, zmq::command_t::pipe_term_ack, zmq::command_t::plug, process_activate_read(), process_activate_write(), process_attach(), process_bind(), process_hiccup(), process_own(), process_pipe_term(), process_pipe_term_ack(), process_plug(), process_reap(), process_reaped(), process_seqnum(), process_stop(), process_term(), process_term_ack(), process_term_req(), zmq::command_t::reap, zmq::command_t::args_t::reap, zmq::command_t::reaped, zmq::command_t::args_t::socket, zmq::command_t::stop, zmq::command_t::term, zmq::command_t::args_t::term, zmq::command_t::term_ack, zmq::command_t::term_req, zmq::command_t::args_t::term_req, zmq::command_t::type, and zmq_assert.

Referenced by zmq::ctx_t::connect_inproc_sockets(), zmq::reaper_t::in_event(), zmq::io_thread_t::in_event(), and zmq::socket_base_t::process_commands().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::process_hiccup ( void *  pipe_)
protectedvirtual

Reimplemented in zmq::pipe_t.

Definition at line 389 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_own ( zmq::own_t object_)
protectedvirtual

Reimplemented in zmq::own_t.

Definition at line 364 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_pipe_term ( )
protectedvirtual

Reimplemented in zmq::pipe_t.

Definition at line 394 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_pipe_term_ack ( )
protectedvirtual

Reimplemented in zmq::pipe_t.

Definition at line 399 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_plug ( )
protectedvirtual

Reimplemented in zmq::session_base_t, zmq::socks_connecter_t, zmq::ipc_listener_t, zmq::ipc_connecter_t, zmq::tcp_connecter_t, and zmq::tcp_listener_t.

Definition at line 359 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_reap ( zmq::socket_base_t socket_)
protectedvirtual

Reimplemented in zmq::reaper_t.

Definition at line 419 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_reaped ( )
protectedvirtual

Reimplemented in zmq::reaper_t.

Definition at line 424 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_seqnum ( )
protectedvirtual

Reimplemented in zmq::own_t.

Definition at line 429 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_stop ( )
protectedvirtual

Reimplemented in zmq::socket_base_t, zmq::io_thread_t, and zmq::reaper_t.

Definition at line 354 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_term ( int  linger_)
protectedvirtual

Reimplemented in zmq::socket_base_t, zmq::session_base_t, zmq::own_t, zmq::socks_connecter_t, zmq::ipc_listener_t, zmq::ipc_connecter_t, zmq::tcp_connecter_t, and zmq::tcp_listener_t.

Definition at line 409 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_term_ack ( )
protectedvirtual

Reimplemented in zmq::own_t.

Definition at line 414 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

void zmq::object_t::process_term_req ( zmq::own_t object_)
protectedvirtual

Reimplemented in zmq::own_t.

Definition at line 404 of file object.cpp.

References zmq_assert.

Referenced by process_command().

Here is the caller graph for this function:

int zmq::object_t::register_endpoint ( const char *  addr_,
const zmq::endpoint_t endpoint_ 
)
protected

Definition at line 151 of file object.cpp.

References ctx, and zmq::ctx_t::register_endpoint().

Referenced by zmq::socket_base_t::bind().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_activate_read ( zmq::pipe_t destination_)
protected

Definition at line 251 of file object.cpp.

References zmq::command_t::activate_read, zmq::command_t::destination, send_command(), and zmq::command_t::type.

Referenced by zmq::pipe_t::flush().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_activate_write ( zmq::pipe_t destination_,
uint64_t  msgs_read_ 
)
protected

Definition at line 259 of file object.cpp.

References zmq::command_t::activate_write, zmq::command_t::args_t::activate_write, zmq::command_t::args, zmq::command_t::destination, zmq::command_t::args_t::msgs_read, send_command(), and zmq::command_t::type.

Referenced by zmq::pipe_t::read().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_bind ( zmq::own_t destination_,
zmq::pipe_t pipe_,
bool  inc_seqnum_ = true 
)
void zmq::object_t::send_command ( command_t cmd_)
private
void zmq::object_t::send_done ( )
protected

Definition at line 346 of file object.cpp.

References ctx, zmq::command_t::destination, zmq::command_t::done, zmq::ctx_t::send_command(), zmq::ctx_t::term_tid, and zmq::command_t::type.

Referenced by zmq::reaper_t::process_reaped(), and zmq::reaper_t::process_stop().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_hiccup ( zmq::pipe_t destination_,
void *  pipe_ 
)
protected

Definition at line 269 of file object.cpp.

References zmq::command_t::args, zmq::command_t::destination, zmq::command_t::hiccup, zmq::command_t::args_t::hiccup, zmq::command_t::args_t::pipe, send_command(), and zmq::command_t::type.

Referenced by zmq::pipe_t::hiccup().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_inproc_connected ( zmq::socket_base_t socket_)

Definition at line 338 of file object.cpp.

References zmq::command_t::destination, zmq::command_t::inproc_connected, send_command(), and zmq::command_t::type.

Referenced by zmq::ctx_t::connect_inproc_sockets().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_own ( zmq::own_t destination_,
zmq::own_t object_ 
)
protected

Definition at line 215 of file object.cpp.

References zmq::command_t::args, zmq::command_t::destination, zmq::own_t::inc_seqnum(), zmq::command_t::args_t::object, zmq::command_t::own, zmq::command_t::args_t::own, send_command(), and zmq::command_t::type.

Referenced by zmq::own_t::launch_child().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_pipe_term ( zmq::pipe_t destination_)
protected

Definition at line 278 of file object.cpp.

References zmq::command_t::destination, zmq::command_t::pipe_term, send_command(), and zmq::command_t::type.

Referenced by zmq::pipe_t::terminate().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_pipe_term_ack ( zmq::pipe_t destination_)
protected

Definition at line 286 of file object.cpp.

References zmq::command_t::destination, zmq::command_t::pipe_term_ack, send_command(), and zmq::command_t::type.

Referenced by zmq::pipe_t::process_delimiter(), zmq::pipe_t::process_pipe_term(), zmq::pipe_t::process_pipe_term_ack(), and zmq::pipe_t::terminate().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_plug ( zmq::own_t destination_,
bool  inc_seqnum_ = true 
)
protected

Definition at line 204 of file object.cpp.

References zmq::command_t::destination, zmq::own_t::inc_seqnum(), zmq::command_t::plug, send_command(), and zmq::command_t::type.

Referenced by zmq::own_t::launch_child().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_reap ( zmq::socket_base_t socket_)
protected

Definition at line 321 of file object.cpp.

References zmq::command_t::args, ctx, zmq::command_t::destination, zmq::ctx_t::get_reaper(), zmq::command_t::reap, zmq::command_t::args_t::reap, send_command(), zmq::command_t::args_t::socket, and zmq::command_t::type.

Referenced by zmq::socket_base_t::close().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_reaped ( )
protected

Definition at line 330 of file object.cpp.

References ctx, zmq::command_t::destination, zmq::ctx_t::get_reaper(), zmq::command_t::reaped, send_command(), and zmq::command_t::type.

Referenced by zmq::socket_base_t::check_destroy().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_stop ( )
protected

Definition at line 194 of file object.cpp.

References ctx, zmq::command_t::destination, zmq::ctx_t::send_command(), zmq::command_t::stop, tid, and zmq::command_t::type.

Referenced by zmq::reaper_t::stop(), zmq::io_thread_t::stop(), and zmq::socket_base_t::stop().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_term ( zmq::own_t destination_,
int  linger_ 
)
protected

Definition at line 304 of file object.cpp.

References zmq::command_t::args, zmq::command_t::destination, zmq::command_t::args_t::linger, send_command(), zmq::command_t::term, zmq::command_t::args_t::term, and zmq::command_t::type.

Referenced by zmq::own_t::process_own(), zmq::own_t::process_term(), and zmq::own_t::process_term_req().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_term_ack ( zmq::own_t destination_)
protected

Definition at line 313 of file object.cpp.

References zmq::command_t::destination, send_command(), zmq::command_t::term_ack, and zmq::command_t::type.

Referenced by zmq::own_t::check_term_acks().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::send_term_req ( zmq::own_t destination_,
zmq::own_t object_ 
)
protected

Definition at line 294 of file object.cpp.

References zmq::command_t::args, zmq::command_t::destination, zmq::command_t::args_t::object, send_command(), zmq::command_t::term_req, zmq::command_t::args_t::term_req, and zmq::command_t::type.

Referenced by zmq::own_t::terminate().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::set_tid ( uint32_t  id)

Definition at line 63 of file object.cpp.

References tid.

Referenced by zmq::ctx_t::connect_inproc_sockets().

Here is the caller graph for this function:

int zmq::object_t::unregister_endpoint ( const std::string &  addr_,
socket_base_t socket_ 
)
protected

Definition at line 157 of file object.cpp.

References ctx, and zmq::ctx_t::unregister_endpoint().

Referenced by zmq::socket_base_t::term_endpoint().

Here is the call graph for this function:

Here is the caller graph for this function:

void zmq::object_t::unregister_endpoints ( zmq::socket_base_t socket_)
protected

Definition at line 163 of file object.cpp.

References ctx, and zmq::ctx_t::unregister_endpoints().

Referenced by zmq::socket_base_t::process_term().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

uint32_t zmq::object_t::tid
private

Definition at line 142 of file object.hpp.

Referenced by get_tid(), send_stop(), and set_tid().