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

Method add

dds/InfoRepo/UpdateReceiver_T.cpp:102–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101template<class DataType>
102void
103UpdateReceiver<DataType>::add(OpenDDS::DCPS::unique_ptr<DataType> sample, OpenDDS::DCPS::unique_ptr<DDS::SampleInfo> info)
104{
105 if (OpenDDS::DCPS::DCPS_debug_level > 0) {
106 ACE_DEBUG((LM_DEBUG,
107 ACE_TEXT("(%P|%t) UpdateReceiver::add()\n")));
108 }
109
110 if (this->stop_)
111 return;
112
113 { // Protect the queue.
114 ACE_GUARD(ACE_SYNCH_MUTEX, guard, this->lock_);
115 this->queue_.push_back(DataInfo(sample.release(), info.release()));
116
117 if (OpenDDS::DCPS::DCPS_debug_level > 9) {
118 ACE_DEBUG((LM_DEBUG,
119 ACE_TEXT("(%P|%t) UpdateReceiver::add() - ")
120 ACE_TEXT(" %d samples waiting to process in 0x%x.\n"),
121 this->queue_.size(),
122 (void*)this));
123 }
124 }
125
126 this->workAvailable_.signal();
127}
128
129template<class DataType>
130int

Callers

nothing calls this directly

Calls 3

releaseMethod · 0.45
sizeMethod · 0.45
signalMethod · 0.45

Tested by

no test coverage detected