Overview Tutorial API reference Examples Build Download | ZmqMessage 0.1 - 21 Oct 2011 |
#include "zmq.hpp"
#include <string>
#include <stdexcept>
Go to the source code of this file.
Namespaces | |
namespace | ZmqMessage |
Classes | |
class | ZmqMessage::DefaultExceptionTemplate< Tag > |
Defines | |
#define | ZMQMESSAGE_STRING_CLASS std::string |
#define | ZMQMESSAGE_LOG_STREAM_NONE if(1); else std::cerr |
#define | ZMQMESSAGE_LOG_TERM std::endl |
#define | ZMQMESSAGE_EXCEPTION_MACRO(name) |
#define | ZMQMESSAGE_WRAP_ZMQ_ERROR 1 |
Typedefs | |
typedef zmq::error_t | ZmqMessage::ZmqErrorType |
Functions | |
void | ZmqMessage::throw_zmq_error (const char *err) |
Copyright (c) 2010-2011 Phorm, Inc. GNU LGPL v 3.0, see http://www.gnu.org/licenses/lgpl-3.0-standalone.html
#define ZMQMESSAGE_EXCEPTION_MACRO | ( | name | ) |
Value:
class name##_tag {}; \
typedef ::ZmqMessage::DefaultExceptionTemplate<name##_tag> name
#define ZMQMESSAGE_LOG_STREAM_NONE if(1); else std::cerr |
Use this constant to disable logging completely.
#define ZMQMESSAGE_LOG_STREAM ZMQMESSAGE_LOG_STREAM_NONE
#define ZMQMESSAGE_LOG_TERM std::endl |
Streamable literal that is appended (<<) to every log record. If your logging system doesn-t require terminal (such as new line) you can
#define ZMQMESSAGE_LOG_TERM ""
#define ZMQMESSAGE_STRING_CLASS std::string |
Class that is default string representation. Must satisfy the requirements of the string concept. String concept requires a class to be both constructible on const char* and size_t and have data() and length() accessor methods:
class MyString { MyString(const char*, size_t); const char* data() const; size_t length() const; };
#define ZMQMESSAGE_WRAP_ZMQ_ERROR 1 |
if defined, zmq::error_t
will be wrapped with exception generated according to ZMQMESSAGE_EXCEPTION_MACRO and named ZmqException
. Otherwise, it's thrown upwards as is. For non header-only builds must be the same in shared library and client code, just like ZMQMESSAGE_EXCEPTION_MACRO