| 90 | } |
| 91 | |
| 92 | TopicStatus 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 | |
| 115 | TopicStatus LocalDiscovery::find_topic( |
| 116 | DDS::DomainId_t, |