OpenDDS  Snapshot(2023/04/28-20:55)
DataCollector_T.inl
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
9 
10 namespace OpenDDS {
11 namespace DCPS {
12 
13 #ifndef OPENDDS_SAFETY_PROFILE
14 template<typename DatumType>
16 std::ostream& operator<<(
17  std::ostream& str,
19 {
20  return value.insert(str);
21 }
22 #endif //OPENDDS_SAFETY_PROFILE
23 
24 template<typename DatumType>
26 DataCollector<DatumType>::DataCollector(unsigned int bound, OnFull onFull)
27  : buffer_(bound),
28  writeAt_(0),
29  bound_(bound),
30  full_(false),
31  onFull_(onFull)
32 {
33  if (this->onFull_ == Unbounded) {
34  this->buffer_.clear();
35  }
36 }
37 
38 #ifndef OPENDDS_SAFETY_PROFILE
39 template<typename DatumType>
43 {
44  this->collect(datum);
45  return *this;
46 }
47 #endif //OPENDDS_SAFETY_PROFILE
48 
49 } // namespace DCPS
50 } // namespace OpenDDS
51 
const LogLevel::Value value
Definition: debug.cpp:61
ACE_CDR::Boolean operator<<(Serializer &serializer, CoherentChangeControl &value)
Marshal/Insertion into a buffer.
ACE_INLINE std::ostream & operator<<(std::ostream &str, const DataCollector< DatumType > &value)
Insert collected data onto an ostream.
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
#define ACE_INLINE
Collect data in a buffer.
DataCollector(unsigned int bound=0, OnFull onFull=KeepOldest)
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28