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

Helper class for creating new ID/No-ID messages. More...

#include <ZMQMessageFactory.h>

Static Public Member Functions

static auto createMessage (const std::string &msgIdentity, const EMessageTypes msgType, const std::unique_ptr< EvtMessage > &eventMessage)
 Create an ID Message out of an identity, the type and an event message.
 
static auto createMessage (const std::string &msgIdentity, const EMessageTypes msgType, const std::string &msgData="")
 Create an ID Message out of an identity, the type and a string.
 
static auto createMessage (const std::string &msgIdentity, const EMessageTypes msgType, zmq::message_t msgData)
 Create an ID Message out of an identity, the type and another zmq message.
 
static auto createMessage (const std::string &msgIdentity, std::unique_ptr< ZMQNoIdMessage > shortMessage)
 Create an ID Message out of an identity and an already received message.
 
static auto createMessage (const EMessageTypes msgType, const std::string &msgData="")
 Create a No-ID Message out of an identity, the type and a string.
 
static auto createMessage (const EMessageTypes msgType, int msgData)
 Create a No-ID Message out of an identity, the type and an int.
 
static auto createMessage (const EMessageTypes msgType, const StoreObjPtr< EventMetaData > &evtMetaData)
 Create a No-ID Message out of an identity, the type and an event meta data.
 
static auto createMessage (const EMessageTypes msgType, zmq::message_t msgData)
 Create a No-ID Message out of the type and another zmq message.
 
static auto createMessage (const EMessageTypes msgType, zmq::message_t msgData, zmq::message_t additionalData)
 Create a No-ID Message out of the type, another zmq message and an additional message.
 
static auto createMessage (zmq::message_t msgType, zmq::message_t msgData)
 Create a No-ID Message out of an identity, the type and another zmq message.
 
static auto createMessage (const EMessageTypes msgType, const std::unique_ptr< EvtMessage > &eventMessage)
 Create a No-ID Message out of an identity, the type and an event message.
 
static auto createMessage (const EMessageTypes msgType, const std::unique_ptr< EvtMessage > &eventMessage, zmq::message_t additionalData)
 Create a No-ID Message out of an identity, the type, an event message, and and additional message.
 
static auto stripIdentity (std::unique_ptr< ZMQIdMessage > message)
 Create a No-ID Message out of an ID message.
 
template<class AMessage >
static std::unique_ptr< AMessage > fromSocket (const std::unique_ptr< zmq::socket_t > &socket)
 Create a message of the given type by receiving a message from the socket.
 

Static Private Member Functions

template<class T , class... Args>
static std::unique_ptr< T > createMessage (Args &&... args)
 Small helper constructor to create a unique_ptr out of some arguments, as std::make_unique is not working with protected constructors.
 

Detailed Description

Helper class for creating new ID/No-ID messages.

Definition at line 24 of file ZMQMessageFactory.h.


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