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

Method assert_topic

dds/InfoRepo/DCPSInfo_i.cpp:180–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180OpenDDS::DCPS::TopicStatus TAO_DDS_DCPSInfo_i::assert_topic(
181 OpenDDS::DCPS::GUID_t_out topicId,
182 DDS::DomainId_t domainId,
183 const OpenDDS::DCPS::GUID_t& participantId,
184 const char * topicName,
185 const char * dataTypeName,
186 const DDS::TopicQos & qos,
187 bool /*hasDcpsKey -- only used for RTPS Discovery*/)
188{
189 ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, guard, this->lock_, OpenDDS::DCPS::INTERNAL_ERROR);
190 // Grab the domain.
191 DCPS_IR_Domain_Map::iterator where = this->domains_.find(domainId);
192
193 if (where == this->domains_.end()) {
194 throw OpenDDS::DCPS::Invalid_Domain();
195 }
196
197 // Grab the participant.
198 DCPS_IR_Participant* participantPtr
199 = where->second->participant(participantId);
200
201 if (0 == participantPtr) {
202 throw OpenDDS::DCPS::Invalid_Participant();
203 }
204
205 OpenDDS::DCPS::TopicStatus topicStatus
206 = where->second->add_topic(
207 topicId,
208 topicName,
209 dataTypeName,
210 qos,
211 participantPtr);
212
213 if (this->um_ && (participantPtr->isBitPublisher() == false)) {
214 Update::UTopic topic(domainId, topicId, participantId
215 , topicName, dataTypeName
216 , const_cast<DDS::TopicQos &>(qos));
217 this->um_->create(topic);
218
219 if (OpenDDS::DCPS::DCPS_debug_level > 4) {
220 OpenDDS::DCPS::RepoIdConverter converter(topicId);
221 ACE_DEBUG((LM_DEBUG,
222 ACE_TEXT("(%P|%t) TAO_DDS_DCPSInfo_i::assert_topic: ")
223 ACE_TEXT("pushing creation of topic %C in domain %d.\n"),
224 std::string(converter).c_str(),
225 domainId));
226 }
227 }
228 return topicStatus;
229}
230
231bool
232TAO_DDS_DCPSInfo_i::add_topic(const OpenDDS::DCPS::GUID_t& topicId,

Callers

nothing calls this directly

Calls 6

isBitPublisherMethod · 0.80
findMethod · 0.45
endMethod · 0.45
participantMethod · 0.45
add_topicMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected