DDS-PSM-C++
1.0
ISO C++ API for OpenSplice DDS
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
src
hpp
dds
core
policy
CorePolicy.hpp
Go to the documentation of this file.
1
#ifndef OMG_DDS_CORE_POLICY_CORE_POLICY_HPP_
2
#define OMG_DDS_CORE_POLICY_CORE_POLICY_HPP_
3
4
/* Copyright 2010, Object Management Group, Inc.
5
* Copyright 2010, PrismTech, Corp.
6
* Copyright 2010, Real-Time Innovations, Inc.
7
* All rights reserved.
8
*
9
* Licensed under the Apache License, Version 2.0 (the "License");
10
* you may not use this file except in compliance with the License.
11
* You may obtain a copy of the License at
12
*
13
* http://www.apache.org/licenses/LICENSE-2.0
14
*
15
* Unless required by applicable law or agreed to in writing, software
16
* distributed under the License is distributed on an "AS IS" BASIS,
17
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
* See the License for the specific language governing permissions and
19
* limitations under the License.
20
*/
21
22
#include <
dds/core/policy/PolicyKind.hpp
>
23
#include <
dds/core/policy/detail/CorePolicy.hpp
>
24
#include <
dds/core/policy/detail/QosPolicyCount.hpp
>
25
26
27
28
//==============================================================================
29
// MACROS
30
//
31
#define OMG_DDS_POLICY_TRAITS(POLICY, ID) \
32
template <> \
33
class policy_id<POLICY> { \
34
public: \
35
static const dds::core::policy::QosPolicyId value = ID; \
36
}; \
37
template <> \
38
class policy_name<POLICY> { \
39
public:\
40
static const std::string& name(); \
41
};
42
43
#define OMG_DDS_DEFINE_POLICY_TRAITS(POLICY, NAME) \
44
const std::string& dds::core::policy::policy_name<POLICY>::name() { \
45
static std::string the_name = #NAME; \
46
return the_name; \
47
}
48
49
50
namespace
dds {
namespace
core {
namespace
policy {
51
52
//==============================================================================
53
// Policy Trait Classes
54
55
template
<
typename
Policy>
56
class
policy_id
{ };
57
58
template
<
typename
Policy>
59
class
policy_name
{ };
60
61
62
63
#ifdef OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT
64
typedef
uint16_t DataRepresentationId;
65
66
typedef
std::vector<DataRepresentationId> DataRepresentationIdSeq;
67
#endif
68
69
typedef
dds::core::policy::detail::Deadline
70
Deadline
;
71
72
typedef
dds::core::policy::detail::DestinationOrder
73
DestinationOrder
;
74
75
typedef
dds::core::policy::detail::Durability
76
Durability
;
77
78
typedef
dds::core::policy::detail::EntityFactory
79
EntityFactory
;
80
81
typedef
dds::core::policy::detail::GroupData
82
GroupData
;
83
84
typedef
dds::core::policy::detail::History
85
History
;
86
87
typedef
dds::core::policy::detail::LatencyBudget
88
LatencyBudget
;
89
90
typedef
dds::core::policy::detail::Lifespan
91
Lifespan
;
92
93
typedef
dds::core::policy::detail::Liveliness
94
Liveliness
;
95
96
typedef
dds::core::policy::detail::Ownership
97
Ownership
;
98
99
#ifdef OMG_DDS_OWNERSHIP_SUPPORT
100
typedef
dds::core::policy::detail::OwnershipStrength
101
OwnershipStrength;
102
#endif // OMG_DDS_OWNERSHIP_SUPPORT
103
104
typedef
dds::core::policy::detail::Partition
105
Partition
;
106
107
template
<
typename
Policy>
108
class
policy_id
;
109
110
template
<
typename
Policy>
111
class
policy_name
;
112
113
typedef
dds::core::policy::detail::Presentation
114
Presentation
;
115
116
typedef ::dds::core::policy::detail::QosPolicyCount
QosPolicyCount
;
117
118
typedef
std::vector<QosPolicyCount>
QosPolicyCountSeq
;
119
120
typedef
uint32_t
QosPolicyId
;
121
122
typedef
dds::core::policy::detail::ReaderDataLifecycle
123
ReaderDataLifecycle
;
124
125
typedef
dds::core::policy::detail::Reliability
126
Reliability
;
127
128
typedef
dds::core::policy::detail::ResourceLimits
129
ResourceLimits
;
130
131
typedef
dds::core::policy::detail::TimeBasedFilter
132
TimeBasedFilter
;
133
134
typedef
dds::core::policy::detail::TopicData
135
TopicData
;
136
137
typedef
dds::core::policy::detail::TransportPriority
138
TransportPriority
;
139
140
typedef
dds::core::policy::detail::UserData
141
UserData
;
142
143
typedef
dds::core::policy::detail::WriterDataLifecycle
144
WriterDataLifecycle
;
145
146
#ifdef OMG_DDS_PERSISTENCE_SUPPORT
147
typedef ::dds::core::policy::detail::DurabilityService
148
DurabilityService;
149
#endif // OMG_DDS_PERSISTENCE_SUPPORT
150
151
#ifdef OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT
152
// TODO
153
#endif
154
155
156
157
OMG_DDS_POLICY_TRAITS
(
UserData
, 1)
158
OMG_DDS_POLICY_TRAITS
(
Durability
, 2)
159
OMG_DDS_POLICY_TRAITS
(
Presentation
, 3)
160
OMG_DDS_POLICY_TRAITS
(
Deadline
, 4)
161
OMG_DDS_POLICY_TRAITS
(
LatencyBudget
, 5)
162
OMG_DDS_POLICY_TRAITS
(
Ownership
, 6)
163
164
#ifdef OMG_DDS_OWNERSHIP_SUPPORT
165
OMG_DDS_POLICY_TRAITS
(OwnershipStrength, 7)
166
#endif // OMG_DDS_OWNERSHIP_SUPPORT
167
168
OMG_DDS_POLICY_TRAITS
(
Liveliness
, 8)
169
OMG_DDS_POLICY_TRAITS
(
TimeBasedFilter
, 9)
170
OMG_DDS_POLICY_TRAITS
(
Partition
, 10)
171
OMG_DDS_POLICY_TRAITS
(
Reliability
, 11)
172
OMG_DDS_POLICY_TRAITS
(
DestinationOrder
, 12)
173
OMG_DDS_POLICY_TRAITS
(
History
, 13)
174
OMG_DDS_POLICY_TRAITS
(
ResourceLimits
, 14)
175
OMG_DDS_POLICY_TRAITS
(
EntityFactory
, 15)
176
OMG_DDS_POLICY_TRAITS
(
WriterDataLifecycle
, 16)
177
OMG_DDS_POLICY_TRAITS
(
ReaderDataLifecycle
, 17)
178
OMG_DDS_POLICY_TRAITS
(
TopicData
, 18)
179
OMG_DDS_POLICY_TRAITS
(
GroupData
, 19)
180
OMG_DDS_POLICY_TRAITS
(
TransportPriority
, 20)
181
OMG_DDS_POLICY_TRAITS
(
Lifespan
, 21)
182
183
#ifdef OMG_DDS_PERSISTENCE_SUPPORT
184
OMG_DDS_POLICY_TRAITS
(DurabilityService, 22)
185
#endif // OMG_DDS_PERSISTENCE_SUPPORT
186
187
188
189
} } }
190
191
192
#endif
/* OMG_DDS_CORE_POLICY_CORE_POLICY_HPP_ */
Generated on Sat Nov 3 2012 00:02:18 for DDS-PSM-C++ by
1.8.2