Overview Tutorial API reference Examples Build Download | ZmqMessage 0.1 - 21 Oct 2011 |
#include <ZmqMessage.hpp>
Inheritance diagram for ZmqMessage::Multipart:
Public Member Functions | |
virtual | ~Multipart () |
Multipart * | detach () |
bool | has_part (size_t idx) |
void | reserve (size_t sz) |
template<typename T> | |
iterator< T > | begin (bool binary_mode=false) const |
iterator< ZMQMESSAGE_STRING_CLASS > | beginstr () const |
template<typename T> | |
iterator< T > | iter_at (size_t pos, bool binary_mode=false) const |
template<typename T> | |
iterator< T > | end () const |
iterator< ZMQMESSAGE_STRING_CLASS > | endstr () const |
size_t | size () const |
zmq::message_t & | operator[] (size_t i) throw (NoSuchPartError) |
zmq::message_t * | release (size_t i) |
std::auto_ptr< zmq::message_t > | release_ptr (size_t i) |
Protected Member Functions | |
void | check_has_part (size_t n) const throw (NoSuchPartError) |
Protected Attributes | |
MsgPtrVec | parts_ |
Friends | |
class | Sink |
void | send (zmq::socket_t &sock, Multipart &multipart, bool nonblock) throw (ZmqErrorType) |
Classes | |
class | iterator |
Input iterator to iterate over message parts. More... |
virtual ZmqMessage::Multipart::~Multipart | ( | ) | [inline, virtual] |
iterator<T> ZmqMessage::Multipart::begin | ( | bool | binary_mode = false |
) | const [inline] |
Obtain iterator that yields values of type T.
binary_mode,: | how to convert message part to T: interprete as string data (if binary_mode is false) or interpret as binary data (if true). T must be explicitly specified: it = multipart.begin<std::string>(); |
iterator<ZMQMESSAGE_STRING_CLASS> ZmqMessage::Multipart::beginstr | ( | ) | const [inline] |
Obtain iterator that yields values of default string type.
void ZmqMessage::Multipart::check_has_part | ( | size_t | n | ) | const throw (NoSuchPartError) [protected] |
Multipart * ZmqMessage::Multipart::detach | ( | ) |
Detach heap-allocated Multipart message owning all the parts of this multipart. After this operation, current object owns no message parts.
iterator<T> ZmqMessage::Multipart::end | ( | ) | const [inline] |
End iterator that yields values of type T.
iterator<ZMQMESSAGE_STRING_CLASS> ZmqMessage::Multipart::endstr | ( | ) | const [inline] |
End iterator that yields values of default string type.
bool ZmqMessage::Multipart::has_part | ( | size_t | idx | ) | [inline] |
Does this multipart message has a part at given index (and owns it)
iterator<T> ZmqMessage::Multipart::iter_at | ( | size_t | pos, | |
bool | binary_mode = false | |||
) | const [inline] |
Obtain iterator positioned to message part at specified index
pos | index, counts from 0. | |
binary_mode,: | how to convert message part to non-string type: interprete as string data (if binary_mode is false) or interpret as binary data (if true). |
zmq::message_t & ZmqMessage::Multipart::operator[] | ( | size_t | i | ) | throw (NoSuchPartError) |
Get reference to zmq::message_t by index
zmq::message_t * ZmqMessage::Multipart::release | ( | size_t | i | ) |
Release (disown) message at specified index.
std::auto_ptr<zmq::message_t> ZmqMessage::Multipart::release_ptr | ( | size_t | i | ) | [inline] |
void ZmqMessage::Multipart::reserve | ( | size_t | sz | ) | [inline] |
Reserve enough memory for given number of message parts
size_t ZmqMessage::Multipart::size | ( | ) | const [inline] |
void send | ( | zmq::socket_t & | sock, | |
Multipart & | multipart, | |||
bool | nonblock | |||
) | throw (ZmqErrorType) [friend] |
Send given message to destination socket
friend class Sink [friend] |
MsgPtrVec ZmqMessage::Multipart::parts_ [protected] |