OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OpenDDS::DCPS::InternalDataWriter< T >::SampleHolder Class Reference

Public Member Functions

bool empty () const
 
void add_reader (InternalDataReader_rch reader, RcHandle< InternalEntity > writer)
 
void write (const T &sample, const DDS::DataWriterQos &qos)
 
void dispose ()
 

Private Member Functions

typedef OPENDDS_LIST (T) SampleList
 

Private Attributes

SampleList samples_
 

Detailed Description

template<typename T>
class OpenDDS::DCPS::InternalDataWriter< T >::SampleHolder

Definition at line 154 of file InternalDataWriter.h.

Member Function Documentation

◆ add_reader()

template<typename T>
void OpenDDS::DCPS::InternalDataWriter< T >::SampleHolder::add_reader ( InternalDataReader_rch  reader,
RcHandle< InternalEntity writer 
)
inline

Definition at line 158 of file InternalDataWriter.h.

References OpenDDS::DCPS::InternalDataWriter< T >::SampleHolder::samples_.

159  {
160  for (typename SampleList::const_iterator pos = samples_.begin(), limit = samples_.end(); pos != limit; ++pos) {
161  reader->write(writer, *pos);
162  }
163  }

◆ dispose()

template<typename T>
void OpenDDS::DCPS::InternalDataWriter< T >::SampleHolder::dispose ( )
inline

◆ empty()

template<typename T>
bool OpenDDS::DCPS::InternalDataWriter< T >::SampleHolder::empty ( void  ) const
inline

◆ OPENDDS_LIST()

template<typename T>
typedef OpenDDS::DCPS::InternalDataWriter< T >::SampleHolder::OPENDDS_LIST ( )
private

◆ write()

template<typename T>
void OpenDDS::DCPS::InternalDataWriter< T >::SampleHolder::write ( const T &  sample,
const DDS::DataWriterQos qos 
)
inline

Definition at line 165 of file InternalDataWriter.h.

References DDS::HistoryQosPolicy::depth, DDS::DataWriterQos::history, DDS::KEEP_LAST_HISTORY_QOS, DDS::HistoryQosPolicy::kind, and OpenDDS::DCPS::InternalDataWriter< T >::SampleHolder::samples_.

167  {
168  samples_.push_back(sample);
170  while (samples_.size() > static_cast<std::size_t>(qos.history.depth)) {
171  samples_.pop_front();
172  }
173  }
174  }
HistoryQosPolicy history
HistoryQosPolicyKind kind

Member Data Documentation

◆ samples_

template<typename T>
SampleList OpenDDS::DCPS::InternalDataWriter< T >::SampleHolder::samples_
private

The documentation for this class was generated from the following file: