DDS-PSM-C++  1.0
ISO C++ API for OpenSplice DDS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
PrimitiveTypes.hpp
Go to the documentation of this file.
1 #ifndef OMG_DDS_CORE_XTYPES_DETAIL_PRIMITIVE_TYPES_HPP_
2 #define OMG_DDS_CORE_XTYPES_DETAIL_PRIMITIVE_TYPES_HPP_
3 
5 
6 // This template specialization have the intent to provide guidelines
7 // implementors of this specification. Notice that this define only a subset
8 // of primitive types, thus more work for you to do...
9 namespace dds {
10  namespace core {
11  namespace xtypes {
12  // Notice that const char* const is used instead of std::string
13  // to limit initialization issues with ctors.
14  template<>
15  struct dynamic_type_traits<uint8_t> {
16  static const TypeKind TYPE_ID = TypeKind::UINT_8_TYPE;
17  static const char* const NAME; // "uint8_t"
18  };
19 
20  template<>
21  struct dynamic_type_traits<int16_t> {
22  static const TypeKind TYPE_ID = TypeKind::INT_16_TYPE;
23  static const char* const NAME; // "uint16_t"
24  };
25 
26 
27  template<>
28  struct dynamic_type_traits<uint16_t> {
29  static const TypeKind TYPE_ID = TypeKind::UINT_16_TYPE;
30  static const char* const NAME; // "int16_t"
31  };
32 
33  template<>
34  struct dynamic_type_traits<int32_t> {
35  static const TypeKind TYPE_ID = TypeKind::INT_32_TYPE;
36  static const char* const NAME; // "int16_t"
37  };
38 
39  template<>
40  struct dynamic_type_traits<uint32_t> {
41  static const TypeKind TYPE_ID = TypeKind::UINT_32_TYPE;
42  static const char* const NAME; // "uint32_t"
43  };
44 
45  }
46  }
47 }
48 
49 
50 #endif /* OMG_DDS_CORE_XTYPES_DETAIL_PRIMITIVE_TYPES_HPP_ */