OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
BuiltinTopicTypes.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_TBUILTIN_TOPIC_TYPES_HPP_
19 #define OMG_DDS_CORE_TBUILTIN_TOPIC_TYPES_HPP_
20 
21 
22 #if defined (OMG_DDS_X_TYPES_BUILTIN_TOPIC_TYPES_SUPPORT)
23 namespace dds
24 {
25 namespace core
26 {
27 
28 
29 class BytesTopicType;
30 
31 
32 class StringTopicType;
33 
34 
36 
37 
39 }
40 }
41 
42 
52 {
53 public:
58 
62  BytesTopicType(const std::vector<uint8_t>& data);
63 
67  operator std::vector<uint8_t>& () const;
68 
72  const std::vector<uint8_t>& data() const;
73 
77  void data(const std::vector<uint8_t>& data);
78 };
79 
80 
90 {
91 public:
96 
100  StringTopicType(const std::string& data);
101 
105  operator std::string& () const;
106 
110  const std::string& data() const;
111 
115  void data(const std::string& data);
116 };
117 
118 
128 {
129 public:
134 
138  KeyedStringTopicType(const std::string& key, const std::string& value);
139 
143  const std::string& key() const;
144 
148  void key(const std::string& key);
149 
153  const std::string& value() const;
154 
158  void value(const std::string& value);
159 };
160 
161 
171 {
172 public:
177 
181  KeyedBytesTopicType(const std::string& key, const std::vector<uint8_t>& value);
182 
186  const std::string& key() const;
187 
191  void key(const std::string& key);
192 
196  const std::vector<uint8_t>& value() const;
197 
201  void value(const std::vector<uint8_t>& value);
202 };
203 
204 
205 #endif /* OMG_DDS_X_TYPES_BUILTIN_TOPIC_TYPES_SUPPORT */
206 
207 #endif /* OMG_DDS_CORE_TBUILTIN_TOPIC_TYPES_HPP_ */
Class that is a built-in topic type that can be used to readily create Topics, DataReaders and DataWr...
void value(DDT &dd, uint32_t mid, const T &v)
dds::core::TKeyedBytesTopicType< org::opensplice::topic::KeyedBytesTopicTypeDelegate > KeyedBytesTopicType
dds::core::TBytesTopicType< org::opensplice::topic::BytesTopicTypeDelegate > BytesTopicType
This class is the base for various value-type dds objects.
Definition: Value.hpp:28
Class that is a built-in topic type that can be used to readily create Topics, DataReaders and DataWr...
const std::vector< uint8_t > & data() const
dds::core::TStringTopicType< org::opensplice::topic::StringTopicTypeDelegate > StringTopicType
Definition: array.hpp:23
Class that is a built-in topic type that can be used to readily create Topics, DataReaders and DataWr...
dds::core::TKeyedStringTopicType< org::opensplice::topic::KeyedStringTopicTypeDelegate > KeyedStringTopicType
Class that is a built-in topic type that can be used to readily create Topics, DataReaders and DataWr...