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

Method assert_topic

dds/DCPS/RTPS/Sedp.cpp:6300–6323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6298}
6299
6300DCPS::TopicStatus Sedp::assert_topic(
6301 GUID_t& topicId, const char* topicName,
6302 const char* dataTypeName, const DDS::TopicQos& qos,
6303 bool hasDcpsKey, DCPS::TopicCallbacks* topic_callbacks)
6304{
6305 ACE_GUARD_RETURN(ACE_Thread_Mutex, g, lock_, DCPS::INTERNAL_ERROR);
6306 DCPS::TopicDetailsMap::iterator iter = topics_.find(topicName);
6307 if (iter != topics_.end()) {
6308 if (iter->second.local_is_set() && iter->second.local_data_type_name() != dataTypeName) {
6309 return DCPS::CONFLICTING_TYPENAME;
6310 }
6311 topicId = iter->second.topic_id();
6312 iter->second.set_local(dataTypeName, qos, hasDcpsKey, topic_callbacks);
6313 return DCPS::FOUND;
6314 }
6315
6316 DCPS::TopicDetails& td = topics_[topicName];
6317 topicId = make_topic_guid();
6318 td.init(topicName, topicId);
6319 topic_names_[topicId] = topicName;
6320 td.set_local(dataTypeName, qos, hasDcpsKey, topic_callbacks);
6321
6322 return DCPS::CREATED;
6323}
6324
6325DCPS::TopicStatus Sedp::find_topic(
6326 const char* topicName,

Callers 1

enableMethod · 0.45

Calls 6

local_is_setMethod · 0.80
local_data_type_nameMethod · 0.80
set_localMethod · 0.80
findMethod · 0.45
endMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected