hmbdc
simplify-high-performance-messaging-programming
hmbdc
comm
Topic.hpp
1
#include "hmbdc/Copyright.hpp"
2
#pragma once
3
#include "hmbdc/text/TypedString.hpp"
4
#include <string>
5
6
namespace
hmbdc
{
namespace
comm {
7
8
extern
char
const
TOPIC[];
9
/**
10
* @brief topic as in the publish / subscribe communication paradigm
11
* @details recommended allowed letters are [a-z] [A-Z] [0-9] and /
12
* it has a length limit of 64 char
13
*/
14
struct
Topic
:
hmbdc::text::TypedString
<TOPIC, 64u> {
15
/**
16
* @brief construct an empty topic
17
*/
18
Topic
()
19
: TypedString()
20
{}
21
22
/**
23
* @brief ctor from a char* string
24
* @details truncated to be 64 char
25
*
26
* @param t topic string limited to 64 char
27
*/
28
Topic
(
char
const
* t)
29
: TypedString(t)
30
{}
31
32
/**
33
* @brief ctor from a std string
34
* @details truncated to be 64 char
35
*
36
* @param t topic string limited to 64 char
37
*/
38
Topic
(std::string t)
39
: TypedString(t)
40
{}
41
};
42
}}
hmbdc::comm::Topic::Topic
Topic(std::string t)
ctor from a std string
Definition:
Topic.hpp:38
hmbdc::comm::Topic
topic as in the publish / subscribe communication paradigm
Definition:
Topic.hpp:14
hmbdc::text::TypedString
Definition:
TypedString.hpp:15
hmbdc::comm::Topic::Topic
Topic(char const *t)
ctor from a char* string
Definition:
Topic.hpp:28
hmbdc::comm::Topic::Topic
Topic()
construct an empty topic
Definition:
Topic.hpp:18
hmbdc
Definition:
Base.hpp:12
Generated by
1.8.13