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

Method assert_topic

tests/DCPS/FindTopic/LocalDiscovery.cpp:92–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92TopicStatus LocalDiscovery::assert_topic(
93 GUID_t_out guid,
94 DDS::DomainId_t,
95 const GUID_t&,
96 const char* topicName,
97 const char* typeName,
98 const DDS::TopicQos&,
99 bool,
100 TopicCallbacks*)
101{
102 const std::map<std::string, TopicDetails>::iterator iter = topics_.find(topicName);
103 if (iter == topics_.end()) {
104 TopicDetails& td = topics_[topicName];
105 guid = make_guid(td.entity_id_ = next_topic_id_);
106 ++next_topic_id_.entityKey[0];
107 td.type_ = typeName;
108 return CREATED;
109 }
110 guid = make_guid(iter->second.entity_id_);
111 ++iter->second.refcount_;
112 return FOUND;
113}
114
115TopicStatus LocalDiscovery::find_topic(
116 DDS::DomainId_t,

Callers 1

pubsubFunction · 0.45

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected