Belle II Software  release-08-01-10
ZMQNoIdMessage Class Reference

A message without an associated socket ID. Is used in most cases. More...

#include <ZMQNoIdMessage.h>

Inheritance diagram for ZMQNoIdMessage:
Collaboration diagram for ZMQNoIdMessage:

Public Types

using MessageParts = std::array< zmq::message_t, ZMQModuleMessage::c_messageParts >
 The base class of the message parts.
 

Public Member Functions

std::string getData () const
 Get the data as string.
 
zmq::message_t & getDataMessage ()
 Get the data part.
 
zmq::message_t & getAdditionalDataMessage ()
 Get the additional data part.
 
bool isMessage (EMessageTypes isType) const
 The if the message is of a given type.
 
MessagePartsgetMessageParts ()
 Get a reference to the message parts.
 
const MessagePartsgetMessageParts () const
 Get a const reference to the message parts.
 
const zmq::message_t & getMessagePart () const
 Get the message part with the given index (const version)
 
zmq::message_t & getMessagePart ()
 Get the message part with the given index.
 
const char * getMessagePartAsCharArray () const
 Get the message part with the given index as char* (const version)
 
char * getMessagePartAsCharArray ()
 Get the message part with the given index as char*.
 
std::string getMessagePartAsString () const
 Get the message part with the given index as string (const version)
 

Static Public Member Functions

static void toSocket (std::unique_ptr< ZMQModuleMessage > message, const std::unique_ptr< zmq::socket_t > &socket)
 Send the message to the given socket. As the message is nullified, you have to move it in here.
 

Static Public Attributes

static constexpr const unsigned int c_type = 0
 Where the type is stored.
 
static constexpr const unsigned int c_data = 1
 Where the data is stored.
 
static constexpr const unsigned int c_additionalData = 2
 Where the additional data is stored.
 
static constexpr unsigned int c_messageParts
 The number of message parts this message carries.
 

Private Member Functions

 ZMQModuleMessage (const ZMQModuleMessage &)=delete
 Copy the constructors.
 
 ZMQModuleMessage ()=default
 Copy the constructors.
 
template<class ... T>
 ZMQModuleMessage (T &&... arguments)
 Copy the constructors.
 

Private Attributes

MessageParts m_messageParts
 The content of this message as an array of zmq messages. Will be set during constructor or when coming from a socket.
 

Friends

class ZMQMessageFactory
 

Detailed Description

A message without an associated socket ID. Is used in most cases.

Definition at line 21 of file ZMQNoIdMessage.h.


The documentation for this class was generated from the following files: