| 209 | } |
| 210 | |
| 211 | void |
| 212 | ManagerImpl::destroy( |
| 213 | const Update::IdPath& id, |
| 214 | Update::ItemType type, |
| 215 | Update::ActorType actor) |
| 216 | { |
| 217 | // |
| 218 | // Do not propagate any destroy() messages within the FederationDomain. |
| 219 | // This domain will be managed separately. |
| 220 | // |
| 221 | if (id.domain == this->config_.federationDomain()) { |
| 222 | return; |
| 223 | } |
| 224 | |
| 225 | switch (type) { |
| 226 | case Update::Topic: { |
| 227 | if (CORBA::is_nil(this->topicWriter_.in())) { |
| 228 | // Decline to publish data until we can. |
| 229 | return; |
| 230 | } |
| 231 | |
| 232 | TopicUpdate sample = TopicUpdate(); |
| 233 | sample.sender = this->id().id(); |
| 234 | sample.action = DestroyEntity; |
| 235 | |
| 236 | sample.id = id.id; |
| 237 | sample.domain = id.domain; |
| 238 | sample.participant = id.participant; |
| 239 | |
| 240 | if (OpenDDS::DCPS::DCPS_debug_level > 9) { |
| 241 | OpenDDS::DCPS::RepoIdConverter part_converter(sample.participant); |
| 242 | OpenDDS::DCPS::RepoIdConverter topic_converter(sample.id); |
| 243 | ACE_DEBUG((LM_DEBUG, |
| 244 | ACE_TEXT("(%P|%t) Federator::ManagerImpl::destroy( TopicUpdate): ") |
| 245 | ACE_TEXT("repo %d - [ domain %d/ participant %C/ topic %C ]\n"), |
| 246 | this->id().id(), |
| 247 | sample.domain, |
| 248 | std::string(part_converter).c_str(), |
| 249 | std::string(topic_converter).c_str())); |
| 250 | } |
| 251 | |
| 252 | this->topicWriter_->write(sample, DDS::HANDLE_NIL); |
| 253 | } |
| 254 | break; |
| 255 | |
| 256 | case Update::Participant: { |
| 257 | if (CORBA::is_nil(this->participantWriter_.in())) { |
| 258 | // Decline to publish data until we can. |
| 259 | return; |
| 260 | } |
| 261 | |
| 262 | ParticipantUpdate sample = ParticipantUpdate(); |
| 263 | sample.sender = this->id().id(); |
| 264 | sample.action = DestroyEntity; |
| 265 | |
| 266 | sample.domain = id.domain; |
| 267 | sample.id = id.id; |
| 268 |
nothing calls this directly
no test coverage detected