OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
MemberType.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_TMEMBER_TYPE_HPP
19 #define OMG_DDS_CORE_XTYPES_TMEMBER_TYPE_HPP
20 
21 namespace dds
22 {
23 namespace core
24 {
25 namespace xtypes
26 {
27 
28 class MemberType;
29 
30 template <typename T>
31 bool isOptional(const MemberType<T>& m);
32 
33 template <typename T>
34 bool isShared(const MemberType<T>& m);
35 
36 template <typename T>
37 bool isKey(const MemberType<T>& m);
38 
39 template <typename T>
40 bool isMustUnderstand(const MemberType<T>& m);
41 
42 template <typename T>
43 bool isBitset(const MemberType<T>& m);
44 
45 template <typename T>
46 bool hasBitbound(const MemberType<T>& m);
47 
48 template <typename T>
49 int32_t getBitbound(const MemberType<T>& m);
50 
51 template <typename T>
52 bool hasId(const MemberType<T>& m);
53 
54 template <typename T>
55 int32_t getId(const MemberType<T>& m);
56 }
57 }
58 }
59 
65 {
66 public:
67  OMG_DDS_REF_TYPE(MemberType, dds::core::Reference)
68 
69 public:
70  MemberType(const std::string& name, const dds::core::xtypes::DynamicType& type);
71 
72  MemberType(const std::string& name,
73  const dds::core::xtypes::DynamicType& type,
74  const Annotation& annotation
75  );
76 
77  template <typename AnnotationIter>
78  MemberType(const std::string& name,
79  const dds::core::xtypes::DynamicType& type,
80  const AnnotationIter& begin,
81  const AnnotationIter& end);
82 
83 
84  MemberType(const std::string& name,
85  const dds::core::xtypes::DynamicType& type,
86  const std::vector<Annotation>& annotations
87  );
88 
89 public:
90  const std::string& name() const;
91  const dds::core::xtypes::DynamicType& type() const;
92 
93 public:
94  MemberType add_annotation(const Annotation& annotation);
95  MemberType remove_annotation(const Annotation& annotation);
96 };
97 
98 #endif /* OMG_DDS_CORE_XTYPES_TMEMBER_TYPE_HPP */
bool isMustUnderstand(const MemberType< T > &m)
int32_t getId(const MemberType< T > &m)
bool isOptional(const MemberType< T > &m)
bool isBitset(const MemberType< T > &m)
MemberType(const std::string &name, const dds::core::xtypes::DynamicType &type)
bool hasBitbound(const MemberType< T > &m)
bool hasId(const MemberType< T > &m)
MemberType remove_annotation(const Annotation &annotation)
const std::string & name() const
int32_t getBitbound(const MemberType< T > &m)
const dds::core::xtypes::DynamicType & type() const
Definition: array.hpp:23
bool isShared(const MemberType< T > &m)
bool isKey(const MemberType< T > &m)
Base class for reference-counted objects.
Definition: Reference.hpp:94
MemberType add_annotation(const Annotation &annotation)