| 425 | |
| 426 | |
| 427 | DDS::Topic_ptr |
| 428 | DomainParticipantImpl::create_topic_i( |
| 429 | const char * topic_name, |
| 430 | const char * type_name, |
| 431 | const DDS::TopicQos & qos, |
| 432 | DDS::TopicListener_ptr a_listener, |
| 433 | DDS::StatusMask mask, |
| 434 | int topic_mask) |
| 435 | { |
| 436 | DDS::TopicQos topic_qos; |
| 437 | |
| 438 | if (qos == TOPIC_QOS_DEFAULT) { |
| 439 | this->get_default_topic_qos(topic_qos); |
| 440 | |
| 441 | } else { |
| 442 | topic_qos = qos; |
| 443 | } |
| 444 | |
| 445 | OPENDDS_NO_OWNERSHIP_KIND_EXCLUSIVE_COMPATIBILITY_CHECK(qos, DDS::Topic::_nil()); |
| 446 | OPENDDS_NO_OWNERSHIP_PROFILE_COMPATIBILITY_CHECK(qos, DDS::Topic::_nil()); |
| 447 | OPENDDS_NO_DURABILITY_SERVICE_COMPATIBILITY_CHECK(qos, DDS::Topic::_nil()); |
| 448 | OPENDDS_NO_DURABILITY_KIND_TRANSIENT_PERSISTENT_COMPATIBILITY_CHECK(qos, DDS::Topic::_nil()); |
| 449 | |
| 450 | if (!Qos_Helper::valid(topic_qos)) { |
| 451 | if (DCPS_debug_level > 0) { |
| 452 | ACE_ERROR((LM_ERROR, |
| 453 | ACE_TEXT("(%P|%t) ERROR: ") |
| 454 | ACE_TEXT("DomainParticipantImpl::create_topic, ") |
| 455 | ACE_TEXT("invalid qos.\n"))); |
| 456 | } |
| 457 | return DDS::Topic::_nil(); |
| 458 | } |
| 459 | |
| 460 | if (!Qos_Helper::consistent(topic_qos)) { |
| 461 | if (DCPS_debug_level > 0) { |
| 462 | ACE_ERROR((LM_ERROR, |
| 463 | ACE_TEXT("(%P|%t) ERROR: ") |
| 464 | ACE_TEXT("DomainParticipantImpl::create_topic, ") |
| 465 | ACE_TEXT("inconsistent qos.\n"))); |
| 466 | } |
| 467 | return DDS::Topic::_nil(); |
| 468 | } |
| 469 | |
| 470 | // See if there is a Topic with the same name. |
| 471 | TopicMap::mapped_type* entry = 0; |
| 472 | bool found = false; |
| 473 | { |
| 474 | ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, |
| 475 | tao_mon, |
| 476 | this->topics_protector_, |
| 477 | DDS::Topic::_nil()); |
| 478 | |
| 479 | #if !defined(OPENDDS_NO_CONTENT_FILTERED_TOPIC) || !defined(OPENDDS_NO_MULTI_TOPIC) |
| 480 | if (topic_descrs_.count(topic_name)) { |
| 481 | if (DCPS_debug_level > 3) { |
| 482 | ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: ") |
| 483 | ACE_TEXT("DomainParticipantImpl::create_topic, ") |
| 484 | ACE_TEXT("can't create a Topic due to name \"%C\" already in use ") |
nothing calls this directly
no test coverage detected