OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
DynamicType.hpp
Go to the documentation of this file.
1 #ifndef OMG_DDS_CORE_XTYPES_T_DYNAMIC_TYPE_HPP_
2 #define OMG_DDS_CORE_XTYPES_T_DYNAMIC_TYPE_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 <string>
23 #include <vector>
24 #include <dds/core/conformance.hpp>
25 #include <dds/core/Reference.hpp>
27 
28 #if defined (OMG_DDS_X_TYPES_DYNANIC_TYPE_SUPPORT)
29 
30 namespace dds
31 {
32 namespace core
33 {
34 namespace xtypes
35 {
36 
37 class DynamicType;
38 
39 template <typename T>
40 bool isPrimitiveType(const DynamicType<T>& t);
41 
42 template <typename T>
43 bool isConstructedType(const DynamicType<T>& t);
44 
45 template <typename T>
46 bool isCollectionType(const DynamicType<T>& t);
47 
48 template <typename T>
49 bool isAggregationType(const DynamicType<T>& t);
50 }
51 }
52 }
53 
54 
59 class dds::core::xtypes::DynamicType : public dds::core::Reference
60 {
61 public:
62  OMG_DDS_REF_TYPE(DynamicType, dds::core::Reference)
63 
64 protected:
65  DynamicType(const std::string& name, TypeKind kind);
66  DynamicType(const std::string& name, TypeKind kind, const Annotation& annotation);
67  DynamicType(const std::string& name, TypeKind kind, const std::vector<Annotation>& annotations);
68  template <typename FWI>
69  DynamicType(const std::string& name, TypeKind kind, const FWI& annotation_begin, const FWI& annotation_end);
70  DynamicType(const DyamicType& other);
71  ~DynamicType();
72 public:
76  TypeKind kind() const;
77 
81  const std::string& name() const;
82 
83  const std::vector<Annotation>& annotations() const;
84 
85 public:
86  bool operator == (const DynamicType& that) const;
87 
88 };
89 
90 
91 #endif // defined(OMG_DDS_EXTENSIBLE_AND_DYNAMIC_TOPIC_TYPE_SUPPORT)
92 
93 
94 #endif // !defined(OMG_DDS_CORE_XTYPES_T_DYNAMIC_TYPE_HPP_)
Definition: array.hpp:23
Base class for reference-counted objects.
Definition: Reference.hpp:94
bool operator==(const R &ref) const
TAnnotation< detail::Annotation > Annotation
Definition: Annotations.hpp:30