OpenSplice ISO C++ 2 DCPS
v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
PrimitiveTypes.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_PRIMITIVE_TYPES_HPP_
19
#define OMG_DDS_CORE_XTYPES_PRIMITIVE_TYPES_HPP_
20
21
#include <
dds/core/xtypes/DynamicType.hpp
>
22
#include <
dds/core/xtypes/TypeKind.hpp
>
23
24
namespace
dds
25
{
26
namespace
core
27
{
28
namespace
xtypes
29
{
30
template
<
typename
T>
31
class
TPrimitiveType
;
32
33
template
<
typename
T>
34
struct
dynamic_type_traits
35
{
36
static
const
TypeKind
TYPE_ID
= TypeKind::NO_TYPE;
37
static
const
std::string
NAME
;
38
};
39
46
template
<
typename
T>
47
TPrimitiveType<T>
PrimitiveType
();
48
}
49
}
50
}
51
52
template
<
typename
T>
53
class
dds::core::xtypes::TPrimitiveType
:
public
dds::core::xtypes::DynamicType
54
{
55
public
:
56
TPrimitiveType
() : DynamicType(
dynamic_type_traits
<T>::
TYPE_ID
,
dynamic_type_traits
<T>::
NAME
) { }
57
};
58
59
template
<
typename
T>
60
dds::core::xtypes::TPrimitiveType<T>
61
dds::core::xtypes::PrimitiveType
()
62
{
63
static
dds::core::xtypes::TPrimitiveType<T>
t();
64
return
t;
65
}
66
67
// This include should be at the end since it provides
68
// template specializations.
69
#include <
dds/core/xtypes/detail/PrimitiveTypes.hpp
>
70
71
#endif
/* OMG_DDS_CORE_XTYPES_PRIMITIVE_TYPES_HPP_ */
dds::core::xtypes::dynamic_type_traits
Definition:
PrimitiveTypes.hpp:34
TypeKind.hpp
dds::core::xtypes::TPrimitiveType::TPrimitiveType
TPrimitiveType()
Definition:
PrimitiveTypes.hpp:56
DynamicType.hpp
dds::core::xtypes::TPrimitiveType
Definition:
PrimitiveTypes.hpp:31
dds
Definition:
array.hpp:23
dds::core::xtypes::PrimitiveType
TPrimitiveType< T > PrimitiveType()
dds::core::xtypes::dynamic_type_traits::NAME
static const std::string NAME
Definition:
PrimitiveTypes.hpp:37
PrimitiveTypes.hpp
dds::core::xtypes::dynamic_type_traits::TYPE_ID
static const TypeKind TYPE_ID
Definition:
PrimitiveTypes.hpp:36
include
dcps
C++
isocpp2
dds
core
xtypes
PrimitiveTypes.hpp
Generated by
1.8.13