lintel 0.2.0
Loading...
Searching...
No Matches
MessageQueueCore.h
Go to the documentation of this file.
1#ifndef LINTEL_MESSAGEQUEUECORE_H
2#define LINTEL_MESSAGEQUEUECORE_H
3
4#include <chrono>
5#include <cstddef>
6#include <cstdint>
7#include <memory>
8#include <string>
9
10namespace lintel {
18{
19private:
20 struct Impl;
21 std::unique_ptr<Impl> m_impl;
22
23public:
31 MessageQueueCore(std::string name, int32_t msgCount, std::size_t msgSize);
32
34
36
38
44 static void removeOf(const std::string &messageQueueName);
45
52 static int32_t numberMessagesOfIfExistsOf(const std::string &messageQueueName);
53
56
63 void sendOf(const void *message, std::size_t size);
64
73 bool trySendOf(const void *message, std::size_t size);
74
84 bool sendOfWithTimeout(const void *message, std::size_t size, const std::chrono::milliseconds &timeout);
85
92 void receiveOf(void *message, std::size_t size);
93
101 bool tryReceiveOf(void *message, std::size_t size);
102};
103
104}// namespace lintel
105#endif// LINTEL_MESSAGEQUEUECORE_H
Definition MessageQueueCore.h:18
bool trySendOf(const void *message, std::size_t size)
int32_t numberMessagesOf() const
void receiveOf(void *message, std::size_t size)
MessageQueueCore(const MessageQueueCore &)=delete
bool tryReceiveOf(void *message, std::size_t size)
static int32_t numberMessagesOfIfExistsOf(const std::string &messageQueueName)
void sendOf(const void *message, std::size_t size)
static void removeOf(const std::string &messageQueueName)
bool sendOfWithTimeout(const void *message, std::size_t size, const std::chrono::milliseconds &timeout)
MessageQueueCore(std::string name, int32_t msgCount, std::size_t msgSize)
MessageQueueCore & operator=(const MessageQueueCore &)=delete
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9