-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUserData.h
52 lines (42 loc) · 1.25 KB
/
UserData.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once
#include"BaseLib/CommonDefines.h"
#include"BaseLib/Export.h"
namespace BaseLib { namespace Policy {
/**
* @brief
*
* The purpose of this QoS is to allow the application to attach additional
* information to the created Entity objects such that when a remote application
* discovers their existence it can access that information and use it for its
* own purposes. One possible use of this QoS is to attach security credentials
* or some other information that can be used by the remote application to
* authenticate the source. In combination with operations such as
* ignore_participant, ignore_publication, ignore_subscription,
* and ignore_topic these QoS can assist an application to define and enforce
* its own security policies. The use of this QoS is not limited to security,
* rather it offers a simple, yet flexible extensibility mechanism.
*/
class DLL_STATE UserData
{
typedef std::vector<uint8_t> ByteSeq;
public:
UserData()
: value_()
{ }
UserData(const ByteSeq& seq)
: value_(seq)
{ }
virtual ~UserData()
{ }
static UserData Empty()
{
return UserData();
}
const ByteSeq& GetValue() const
{
return value_;
}
private:
ByteSeq value_;
};
}}