DDS-PSM-C++  1.0
ISO C++ API for OpenSplice DDS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
TypeKind.hpp
Go to the documentation of this file.
1 #ifndef OMG_DDS_XTYPE_
2 #define OMG_DDS_TYPE_OBJECT_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 <bitset>
25 
26 
27 
28 #if defined(OMG_DDS_X_TYPES_DYNANIC_TYPE_SUPPORT)
29 
30 
31 // --- Shared meta-data: -------------------------------------------------
32 
33 namespace dds {
34  namespace core {
35  namespace xtypes {
36  struct TypeKind_def {
37  enum type
38  {
39  NO_TYPE = 0, // sentinel indicating "null" value
40  PRIMITIVE_TYPE = 0x4000,
41  CONSTRUCTED_TYPE = 0x8000,
42  COLLECTION_TYPE = 0x0200,
43  AGGREGATION_TYPE = 0x0100,
44  ANNOTATION_TYPE = 0x0080,
45 
46  BOOLEAN_TYPE = PRIMITIVE_TYPE | 0x0001,
47  UINT_8_TYPE = PRIMITIVE_TYPE | 0x0002,
48  INT_16_TYPE = PRIMITIVE_TYPE | 0x0003,
49  UINT_16_TYPE = PRIMITIVE_TYPE | 0x0004,
50  INT_32_TYPE = PRIMITIVE_TYPE | 0x0005,
51  UINT_32_TYPE = PRIMITIVE_TYPE | 0x0006,
52  INT_64_TYPE = PRIMITIVE_TYPE | 0x0007,
53  UINT_64_TYPE = PRIMITIVE_TYPE | 0x0008,
54  FLOAT_32_TYPE = PRIMITIVE_TYPE | 0x0009,
55  FLOAT_64_TYPE = PRIMITIVE_TYPE | 0x000A,
56  FLOAT_128_TYPE = PRIMITIVE_TYPE | 0x000B,
57  CHAR_8_TYPE = PRIMITIVE_TYPE | 0x000C,
58  CHAR_32_TYPE = PRIMITIVE_TYPE | 0x000D,
59 
60  ENUMERATION_TYPE = CONSTRUCTED_TYPE | 0x0001,
61  BITSET_TYPE = CONSTRUCTED_TYPE | 0x0002,
62  ALIAS_TYPE = CONSTRUCTED_TYPE | 0x0003,
63 
64  ARRAY_TYPE = CONSTRUCTED_TYPE | COLLECTION_TYPE | 0x0004,
65  SEQUENCE_TYPE = CONSTRUCTED_TYPE | COLLECTION_TYPE | 0x0005,
66  STRING_TYPE = CONSTRUCTED_TYPE | COLLECTION_TYPE | 0x0006,
67  MAP_TYPE = CONSTRUCTED_TYPE | COLLECTION_TYPE | 0x0007,
68 
69  UNION_TYPE = CONSTRUCTED_TYPE | AGGREGATION_TYPE | 0x0008,
70  STRUCTURE_TYPE = CONSTRUCTED_TYPE | AGGREGATION_TYPE | 0x0009,
71  };
72  };
73 
74  typedef dds::core::safe_enum<TypeKind_def> TypeKind;
75  }
76  }
77 }
78 
79 #endif // OMG_DDS_X_TYPES_DYNANIC_TYPE_SUPPORT
80 
81 
82 #endif // !defined(OMG_DDS_TYPE_OBJECT_HPP_)