MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / collect

Method collect

dds/DCPS/DataCollector_T.cpp:26–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25template<typename DatumType>
26void
27DataCollector<DatumType>::collect(const DatumType& datum)
28{
29 if (this->onFull_ == Unbounded) {
30 this->buffer_.push_back(datum);
31
32 } else {
33 // writeAt == bound only when we either have no buffer (bound == 0) or
34 // when we are full with no wrapping (writeAt == bound)
35 if (this->writeAt_ != this->bound_) {
36 this->buffer_[ this->writeAt_++] = datum;
37
38 // This datum filled the buffer.
39 if (this->writeAt_ == this->bound_) {
40 this->full_ = true;
41
42 if (this->onFull_ == KeepNewest) {
43 this->writeAt_ = 0;
44 }
45 }
46 }
47 }
48}
49
50template<typename DatumType>
51unsigned int

Callers 2

massif-diff.pyFile · 0.80
addMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected