5#ifndef ATHENAINTERPROCESS_SHAREDQUEUE_H
6#define ATHENAINTERPROCESS_SHAREDQUEUE_H
12#include <boost/interprocess/ipc/message_queue.hpp>
29 bool do_unlink =
true );
35 std::string
name()
const;
37 virtual bool try_send(
const std::string& );
38 virtual bool send(
const std::string& );
49 operator bool()
const {
66 boost::interprocess::message_queue*
m_queue;
81 catch(boost::interprocess::interprocess_exception&) {
100 unsigned int priority = 0;
101 std::size_t recvd_size = 0;
102 bool receive_ok =
true;
106 m_queue->receive(&
data,
sizeof(T),recvd_size,priority);
109 receive_ok =
m_queue->try_receive(&
data,
sizeof(T),recvd_size,priority);
112 catch(boost::interprocess::interprocess_exception&) {
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
char data[hepevt_bytes_allocation_ATLAS]
bool do_receive_basic(T &, bool)
virtual std::string try_receive()
void copy(const SharedQueue &other)
bool do_send_basic(T, bool)
virtual bool try_send(const std::string &)
bool try_receive_basic(T &)
SharedQueue & operator=(const SharedQueue &other)
virtual std::string receive()
boost::interprocess::message_queue * operator->()
virtual bool send(const std::string &)
boost::interprocess::message_queue * m_queue
static const std::size_t MAX_MSG_SIZE
static const int SHAREDQUEUE_MAX_MSG