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
xtypes
PrimitiveTypes.hpp
Go to the documentation of this file.
1
#ifndef OMG_DDS_CORE_XTYPES_PRIMITIVE_TYPES_HPP_
2
#define OMG_DDS_CORE_XTYPES_PRIMITIVE_TYPES_HPP_
3
4
#include <
dds/core/xtypes/DynamicType.hpp
>
5
#include <
dds/core/xtypes/TypeKind.hpp
>
6
7
namespace
dds {
8
namespace
core {
9
namespace
xtypes {
10
template
<
typename
T>
11
class
TPrimitiveType
;
12
13
template
<
typename
T>
14
struct
dynamic_type_traits
{
15
static
const
TypeKind
TYPE_ID
= TypeKind::NO_TYPE;
16
static
const
std::string
NAME
;
17
};
18
25
template
<
typename
T>
26
TPrimitiveType<T>
PrimitiveType
();
27
}
28
}
29
}
30
31
template
<
typename
T>
32
class
dds::core::xtypes::TPrimitiveType
:
public
dds::core::xtypes::DynamicType
{
33
public
:
34
TPrimitiveType
() :
DynamicType
(
dynamic_type_traits
<T>::TYPE_ID,
dynamic_type_traits
<T>::NAME) { }
35
};
36
37
template
<
typename
T>
38
dds::core::xtypes::TPrimitiveType<T>
39
dds::core::xtypes::PrimitiveType
() {
40
static
dds::core::xtypes::TPrimitiveType<T>
t();
41
return
t;
42
}
43
44
// This include should be at the end since it provides
45
// tempalte specializations.
46
#include <
dds/core/xtypes/detail/PrimitiveTypes.hpp
>
47
48
#endif
/* OMG_DDS_CORE_XTYPES_PRIMITIVE_TYPES_HPP_ */
Generated on Sat Nov 3 2012 00:02:18 for DDS-PSM-C++ by
1.8.2