OpenSplice ISO C++ 2 DCPS
v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
UnionType.hpp
Go to the documentation of this file.
1
/* Copyright 2010, Object Management Group, Inc.
2
* Copyright 2010, PrismTech, Corp.
3
* Copyright 2010, Real-Time Innovations, Inc.
4
* All rights reserved.
5
*
6
* Licensed under the Apache License, Version 2.0 (the "License");
7
* you may not use this file except in compliance with the License.
8
* You may obtain a copy of the License at
9
*
10
* http://www.apache.org/licenses/LICENSE-2.0
11
*
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
* See the License for the specific language governing permissions and
16
* limitations under the License.
17
*/
18
#ifndef OMG_DDS_CORE_XTYPES_T_UNION_TYPE_HPP_
19
#define OMG_DDS_CORE_XTYPES_T_UNION_TYPE_HPP_
20
21
#include <
dds/core/xtypes/DynamicType.hpp
>
22
#include <
dds/core/xtypes/UnionCase.hpp
>
23
#include <
dds/core/xtypes/PrimitiveTypes.hpp
>
24
#include <
dds/core/xtypes/detail/UnionType.hpp
>
25
#include <vector>
26
27
namespace
dds
28
{
29
namespace
core
30
{
31
namespace
xtypes
32
{
33
template
<
typename
DELEGATE>
34
class
TUnionForwardDeclaration
;
35
36
template
<
typename
T,
template
<
typename
Q>
class
DELEGATE =
detail::UnionType
>
37
class
UnionType
;
38
}
39
}
40
}
41
45
template
<
typename
DELEGATE>
46
class
dds::core::xtypes::TUnionForwardDeclaration
:
public
dds::core::xtypes::DynamicType<DELEGATE>
47
{
48
public
:
49
TUnionForwardDeclaration
(
const
std::string& name);
50
};
51
52
template
<
typename
T,
typename
DELEGATE>
53
class
dds::core::xtypes::UnionType
:
public
dds::core::xtypes::DynamicType<DELEGATE<T> >
54
{
55
public
:
56
57
UnionType
(
58
const
std::string& name,
59
const
TPrimitiveType<T>
& discriminator_type,
60
const
std::vector<
UnionCase<T>
>& cases);
61
62
UnionType
(
63
const
std::string& name,
64
const
TPrimitiveType<T>
& discriminator_type,
65
const
std::vector<
UnionCase<T>
>& cases,
66
const
Annotation
& annotation);
67
68
UnionType
(
69
const
std::string& name,
70
const
TPrimitiveType<T>
& discriminator_type,
71
const
std::vector<
UnionCase<T>
>& cases,
72
const
std::vector<Annotation>& annotations);
73
74
public
:
75
76
const
std::vector<UnionCase<T> >& members()
const
;
77
const
MemberType
& member(uint32_t
id
)
const
;
78
const
MemberType
& member(
const
std::string& name)
const
;
79
80
const
std::vector<Annotation>& annotations()
const
;
81
82
UnionType
add_member(
const
UnionCase<T>
& member)
const
;
83
UnionType
remove_member(
const
UnionCase<T>
& member)
const
;
84
85
UnionType
add_annotation(
const
Annotation
& annotation)
const
;
86
UnionType
remove_annotation(
const
Annotation
& annotation)
const
;
87
88
};
89
90
#endif
/* OMG_DDS_CORE_XTYPES_T_STRUCT_TYPE_HPP_ */
dds::core::xtypes::UnionType
Definition:
UnionType.hpp:37
dds::core::xtypes::Annotation
Definition:
Annotation.hpp:93
UnionCase.hpp
PrimitiveTypes.hpp
dds::core::xtypes::TUnionForwardDeclaration
Definition:
UnionType.hpp:34
DynamicType.hpp
dds::core::xtypes::TPrimitiveType
Definition:
PrimitiveTypes.hpp:31
dds::core::xtypes::UnionCase
Definition:
UnionCase.hpp:47
dds
Definition:
array.hpp:23
UnionType.hpp
dds::core::xtypes::detail::UnionType
Definition:
UnionType.hpp:28
dds::core::xtypes::TUnionForwardDeclaration::TUnionForwardDeclaration
TUnionForwardDeclaration(const std::string &name)
dds::core::xtypes::MemberType
Definition:
MemberType.hpp:64
include
dcps
C++
isocpp2
dds
core
xtypes
UnionType.hpp
Generated by
1.8.13