OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
DynamicData.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_TDYNAMICDATA_HPP_
19 #define OMG_DDS_CORE_XTYPES_TDYNAMICDATA_HPP_
20 
21 #include <dds/core/Reference.hpp>
24 
25 namespace dds
26 {
27 namespace core
28 {
29 namespace xtypes
30 {
31 
32 class DynamicData;
33 
34 template <typename DDT, typename T>
35 void value(DDT& dd, uint32_t mid, const T& v);
36 
37 template <typename DDT, typename T>
38 T value(const DDT& dd, const std::string& mid, const T& v);
39 
40 template <typename DDT, typename T>
41 T value(const DDT& dd, uint32_t mid);
42 
43 template <typename DDT, typename T>
44 T value(const DDT& dd, const std::string& mid);
45 
46 
47 }
48 }
49 }
50 
58 {
59 public:
60  OMG_DDS_REF_TYPE(DynamicData, dds::core::Reference)
61 public:
62  DynamicData(const DynamicType& type);
63 
64 public:
65  template <typename T>
66  void value(uint32_T mid, const T& v) const;
67 
68  template <typename T>
69  T value(const std::string& mid, const T& v) const;
70 
71  template <typename T>
72  T value(uint32_T mid) const;
73 
74  template <typename T>
75  T value(const std::string& mid) const;
76 
77  DynamicType type() const;
78 
79  MemberType member_type(uint32_t id) const;
80  MemberType member_type(const std::string& name) const;
81 
82  uint32_t member_id(const std::string& name) const;
83 };
84 
85 
86 #endif /* OMG_DDS_CORE_XTYPES_TDYNAMICDATA_HPP_ */
void value(DDT &dd, uint32_t mid, const T &v)
uint32_t member_id(const std::string &name) const
Definition: array.hpp:23
MemberType member_type(uint32_t id) const
Base class for reference-counted objects.
Definition: Reference.hpp:94
DynamicData(const DynamicType &type)
void value(uint32_T mid, const T &v) const
DynamicType type() const