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

Method add_reader

dds/DCPS/InternalDataWriter.h:61–89  ·  view source on GitHub ↗

@name InternalTopic Interface @{

Source from the content-addressed store, hash-verified

59 /// @name InternalTopic Interface
60 /// @{
61 void add_reader(InternalDataReader_rch reader)
62 {
63 ACE_GUARD(ACE_Thread_Mutex, g, mutex_);
64
65 const SampleSequence& instances = reader->get_interesting_instances();
66
67 if (instances.empty()) {
68 readers_.insert(reader);
69
70 if (qos_.durability.kind == DDS::TRANSIENT_LOCAL_DURABILITY_QOS && reader->durable()) {
71 for (typename InstanceMap::iterator pos = instance_map_.begin(), limit = instance_map_.end();
72 pos != limit; ++pos) {
73 pos->second.add_reader(reader, static_rchandle_cast<InternalEntity>(rchandle_from(this)));
74 }
75 }
76 } else {
77 all_instance_readers_.insert(reader);
78 for (typename SampleSequence::const_iterator pos = instances.begin(), limit = instances.end();
79 pos != limit; ++ pos) {
80 instance_readers_[*pos].insert(reader);
81 if (qos_.durability.kind == DDS::TRANSIENT_LOCAL_DURABILITY_QOS && reader->durable()) {
82 typename InstanceMap::iterator pos2 = instance_map_.find(*pos);
83 if (pos2 != instance_map_.end()) {
84 pos2->second.add_reader(reader, static_rchandle_cast<InternalEntity>(rchandle_from(this)));
85 }
86 }
87 }
88 }
89 }
90
91 void remove_reader(InternalDataReader_rch reader)
92 {

Callers

nothing calls this directly

Calls 7

rchandle_fromFunction · 0.85
durableMethod · 0.80
emptyMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected