20 #ifndef OMG_DDS_CORE_DELEGATE_BUILTIN_TOPIC_TYPES_HPP_ 21 #define OMG_DDS_CORE_DELEGATE_BUILTIN_TOPIC_TYPES_HPP_ 24 #include <dds/topic/detail/TTopicImpl.hpp> 25 #include <dds/topic/detail/TBuiltinTopicImpl.hpp> 26 #include <org/opensplice/topic/BuiltinTopicDelegate.hpp> 27 #include <org/opensplice/topic/BuiltinTopic.hpp> 29 #if defined (OMG_DDS_X_TYPES_BUILTIN_TOPIC_TYPES_SUPPORT) 31 namespace dds {
namespace core {
namespace detail {
33 typedef dds::core::TBytesTopicType<org::opensplice::topic::BytesTopicTypeDelegate>
36 typedef dds::core::TStringTopicType<org::opensplice::topic::StringTopicTypeDelegate>
39 typedef dds::core::TKeyedBytesTopicType<org::opensplice::topic::KeyedBytesTopicTypeDelegate>
42 typedef dds::core::TKeyedStringTopicType<org::opensplice::topic::KeyedStringTopicTypeDelegate>
54 template <
typename DELEGATE>
55 dds::core::TBytesTopicType<DELEGATE>::TBytesTopicType() :
60 template <
typename DELEGATE>
61 dds::core::TBytesTopicType<DELEGATE>::TBytesTopicType(
const std::vector<uint8_t>& data) :
66 template <
typename DELEGATE>
67 dds::core::TBytesTopicType<DELEGATE>::operator std::vector<uint8_t>& ()
const 69 return this->delegate().value();
72 template <
typename DELEGATE>
73 const std::vector<uint8_t>& dds::core::TBytesTopicType<DELEGATE>::data()
const 75 return this->delegate().value();
78 template <
typename DELEGATE>
79 void dds::core::TBytesTopicType<DELEGATE>::data(
const std::vector<uint8_t>& data)
81 this->delegate().value(data);
90 template <
typename DELEGATE>
91 dds::core::TStringTopicType<DELEGATE>::TStringTopicType() :
96 template <
typename DELEGATE>
97 dds::core::TStringTopicType<DELEGATE>::TStringTopicType(
const std::string& data) :
102 template <
typename DELEGATE>
103 dds::core::TStringTopicType<DELEGATE>::operator std::string& ()
const 105 return this->delegate().value();
108 template <
typename DELEGATE>
109 const std::string& dds::core::TStringTopicType<DELEGATE>::data()
const 111 return this->delegate().value();
114 template <
typename DELEGATE>
115 void dds::core::TStringTopicType<DELEGATE>::data(
const std::string& data)
117 this->delegate().value(data);
126 template <
typename DELEGATE>
127 dds::core::TKeyedBytesTopicType<DELEGATE>::TKeyedBytesTopicType() :
132 template <
typename DELEGATE>
133 dds::core::TKeyedBytesTopicType<DELEGATE>::TKeyedBytesTopicType(
const std::string& key,
const std::vector<uint8_t>&
value) :
138 template <
typename DELEGATE>
139 const std::string& dds::core::TKeyedBytesTopicType<DELEGATE>::key()
const 141 return this->delegate().key();
144 template <
typename DELEGATE>
145 void dds::core::TKeyedBytesTopicType<DELEGATE>::key(
const std::string& key)
147 this->delegate().key(key);
150 template <
typename DELEGATE>
153 return this->delegate().value();
156 template <
typename DELEGATE>
159 this->delegate().value(value);
168 template <
typename DELEGATE>
169 dds::core::TKeyedStringTopicType<DELEGATE>::TKeyedStringTopicType() :
174 template <
typename DELEGATE>
175 dds::core::TKeyedStringTopicType<DELEGATE>::TKeyedStringTopicType(
const std::string& key,
const std::string& value) :
180 template <
typename DELEGATE>
181 const std::string& dds::core::TKeyedStringTopicType<DELEGATE>::key()
const 183 return this->delegate().key();
186 template <
typename DELEGATE>
187 void dds::core::TKeyedStringTopicType<DELEGATE>::key(
const std::string& key)
189 this->delegate().key(key);
192 template <
typename DELEGATE>
195 return this->delegate().value();
198 template <
typename DELEGATE>
201 this->delegate().value(value);
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.
dds::core::TStringTopicType< org::opensplice::topic::StringTopicTypeDelegate > StringTopicType
dds::core::TKeyedStringTopicType< org::opensplice::topic::KeyedStringTopicTypeDelegate > KeyedStringTopicType