1 #ifndef OMG_DDS_PUB_DETAIL_DATA_WRITER_HPP_ 2 #define OMG_DDS_PUB_DETAIL_DATA_WRITER_HPP_ 25 #include <org/opensplice/core/EntityDelegate.hpp> 26 #include <org/opensplice/topic/TopicTraits.hpp> 27 #include <org/opensplice/core/ScopedLock.hpp> 28 #include <org/opensplice/pub/AnyDataWriterDelegate.hpp> 39 class DataWriterListener;
60 class dds::pub::detail::DataWriter :
public ::org::opensplice::pub::AnyDataWriterDelegate {
63 typedef typename ::dds::core::smart_ptr_traits< DataWriter<T> >::ref_type ref_type;
64 typedef typename ::dds::core::smart_ptr_traits< DataWriter<T> >::weak_ref_type weak_ref_type;
67 const ::dds::topic::Topic<T>& topic,
72 virtual ~DataWriter();
74 void init(ObjectDelegate::weak_ref_type weak_ref);
76 void write(
const T& sample);
80 void write(
const T& sample, const ::dds::core::InstanceHandle&
instance);
82 void write(
const T& sample,
83 const ::dds::core::InstanceHandle&
instance,
91 void writedispose(
const T& sample);
95 void writedispose(
const T& sample, const ::dds::core::InstanceHandle&
instance);
97 void writedispose(
const T& sample,
98 const ::dds::core::InstanceHandle&
instance,
106 template <
typename FWIterator>
107 void writedispose(
const FWIterator& begin,
const FWIterator& end);
109 template <
typename FWIterator>
110 void writedispose(
const FWIterator& begin,
const FWIterator& end,
113 template <
typename SamplesFWIterator,
typename HandlesFWIterator>
114 void writedispose(
const SamplesFWIterator& data_begin,
115 const SamplesFWIterator& data_end,
116 const HandlesFWIterator& handle_begin,
117 const HandlesFWIterator& handle_end);
119 template <
typename SamplesFWIterator,
typename HandlesFWIterator>
120 void writedispose(
const SamplesFWIterator& data_begin,
121 const SamplesFWIterator& data_end,
122 const HandlesFWIterator& handle_begin,
123 const HandlesFWIterator& handle_end,
126 const ::dds::core::InstanceHandle register_instance(
const T& key,
129 void unregister_instance(const ::dds::core::InstanceHandle& handle,
132 void unregister_instance(
const T& sample,
135 void dispose_instance(const ::dds::core::InstanceHandle& handle,
138 void dispose_instance(
const T& sample,
142 const ::dds::core::InstanceHandle& h);
144 T& key_value(T& sample, const ::dds::core::InstanceHandle& h);
152 void listener(DataWriterListener<T>* listener,
153 const ::dds::core::status::StatusMask& mask);
155 DataWriterListener<T>* listener()
const;
157 virtual void close();
161 virtual void listener_notify(ObjectDelegate::ref_type source,
162 uint32_t triggerMask,
DataWriter allows the application to set the value of the sample to be published under a given Topic...
A TopicInstance encapsulates a dds::sub::Sample and its associated dds::core::InstanceHandle.
Topic is the most basic description of the data to be published and subscribed.
Class to hold the handle associated with in sample instance.
StatusMask is a bitmap or bitset field.
DataWriter events Listener.
This object provides the basic mechanism for an application to specify Quality of Service attributes ...
The Publisher acts on the behalf of one or several DataWriter objects that belong to it...
dds::sub::functors::InstanceManipulatorFunctor instance(const dds::core::InstanceHandle &h)