8 #ifndef OPENDDS_DCPS_INTERNAL_DATA_WRITER_H 9 #define OPENDDS_DCPS_INTERNAL_DATA_WRITER_H 13 #ifndef ACE_LACKS_PRAGMA_ONCE 64 pos != limit; ++pos) {
65 pos->second.add_reader(reader, static_rchandle_cast<InternalEntity>(
rchandle_from(
this)));
97 const std::pair<typename InstanceMap::iterator, bool> p =
instance_map_.insert(std::make_pair(sample, SampleHolder()));
98 p.first->second.write(sample,
qos_);
101 for (
typename ReaderSet::const_iterator pos =
readers_.begin(), limit =
readers_.end(); pos != limit; ++pos) {
102 InternalDataReader_rch reader = pos->lock();
104 reader->write(static_rchandle_cast<InternalEntity>(
rchandle_from(
this)), sample);
114 typename InstanceMap::iterator pos =
instance_map_.find(sample);
116 pos->second.dispose();
120 for (
typename ReaderSet::const_iterator pos =
readers_.begin(), limit =
readers_.end(); pos != limit; ++pos) {
121 InternalDataReader_rch reader = pos->lock();
123 reader->dispose(static_rchandle_cast<InternalEntity>(
rchandle_from(
this)), sample);
136 for (
typename ReaderSet::const_iterator pos =
readers_.begin(), limit =
readers_.end(); pos != limit; ++pos) {
137 InternalDataReader_rch reader = pos->lock();
140 reader->dispose(static_rchandle_cast<InternalEntity>(
rchandle_from(
this)), sample);
142 reader->unregister_instance(static_rchandle_cast<InternalEntity>(
rchandle_from(
this)), sample);
151 typedef OPENDDS_SET(InternalDataReader_wrch) ReaderSet;
160 for (
typename SampleList::const_iterator pos =
samples_.begin(), limit =
samples_.end(); pos != limit; ++pos) {
161 reader->write(writer, *pos);
bool has_reader(InternalDataReader_rch reader)
RcHandle< T > rchandle_from(T *pointer)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
boolean autodispose_unregistered_instances
WeakRcHandle< InternalDataReader< T > > InternalDataReader_wrch
DurabilityQosPolicy durability
void dispose(const T &sample)
InstanceMap instance_map_
HistoryQosPolicyKind kind
typedef OPENDDS_MAP_T(T, SampleHolder) InstanceMap
RcHandle< InternalDataReader< T > > InternalDataReader_rch
InternalDataWriter(const DDS::DataWriterQos &qos)
void unregister_instance(const T &sample)
void write(const T &sample, const DDS::DataWriterQos &qos)
DurabilityQosPolicyKind kind
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
typedef OPENDDS_SET(InternalDataReader_wrch) ReaderSet
void add_reader(InternalDataReader_rch reader, RcHandle< InternalEntity > writer)
void add_reader(InternalDataReader_rch reader)
void write(const T &sample)
RcHandle< T > static_rchandle_cast(const RcHandle< U > &h)
void remove_reader(InternalDataReader_rch reader)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
WriterDataLifecycleQosPolicy writer_data_lifecycle
const DDS::DataWriterQos qos_
The Internal API and Implementation of OpenDDS.
InternalEntity_wrch publication_handle()
typedef OPENDDS_LIST(T) SampleList