| 2177 | } |
| 2178 | |
| 2179 | DCPS_IR_Domain* |
| 2180 | TAO_DDS_DCPSInfo_i::domain(DDS::DomainId_t domain) |
| 2181 | { |
| 2182 | if (domain == OpenDDS::DCPS::Service_Participant::ANY_DOMAIN) { |
| 2183 | ACE_ERROR((LM_ERROR, |
| 2184 | ACE_TEXT("(%P|%t) ERROR: TAO_DDS_DCPSInfo_i::domain: ") |
| 2185 | ACE_TEXT("ANY_DOMAIN not supported for operations.\n"))); |
| 2186 | return 0; |
| 2187 | } |
| 2188 | |
| 2189 | // Check if the domain is already in the map. |
| 2190 | DCPS_IR_Domain_Map::iterator where = this->domains_.find(domain); |
| 2191 | |
| 2192 | if (where == this->domains_.end()) { |
| 2193 | // We will attempt to insert a new domain, go ahead and allocate it. |
| 2194 | OpenDDS::DCPS::unique_ptr<DCPS_IR_Domain> domain_uptr( new |
| 2195 | DCPS_IR_Domain(domain, this->participantIdGenerator_)); |
| 2196 | |
| 2197 | DCPS_IR_Domain* domainPtr = domain_uptr.get(); |
| 2198 | |
| 2199 | // We need to insert the domain into the map at this time since it |
| 2200 | // might be looked up during the init_built_in_topics() call. |
| 2201 | this->domains_.insert( |
| 2202 | where, |
| 2203 | DCPS_IR_Domain_Map::value_type(domain, OpenDDS::DCPS::move(domain_uptr))); |
| 2204 | |
| 2205 | #ifndef DDS_HAS_MINIMUM_BIT |
| 2206 | if (TheServiceParticipant->get_BIT() && !domainPtr->useBIT() && |
| 2207 | domainPtr->init_built_in_topics(federation_.overridden(), reincarnate_) |
| 2208 | ) { |
| 2209 | ACE_ERROR((LM_ERROR, |
| 2210 | ACE_TEXT("(%P|%t) ERROR: TAO_DDS_DCPSInfo_i::domain: ") |
| 2211 | ACE_TEXT("failed to initialize the Built-In Topics ") |
| 2212 | ACE_TEXT("when loading domain %d.\n"), |
| 2213 | domain)); |
| 2214 | this->domains_.erase(domain); |
| 2215 | return 0; |
| 2216 | } |
| 2217 | #endif |
| 2218 | |
| 2219 | if (OpenDDS::DCPS::DCPS_debug_level > 0) { |
| 2220 | ACE_DEBUG((LM_DEBUG, |
| 2221 | ACE_TEXT("(%P|%t) TAO_DDS_DCPSInfo_i::domain: ") |
| 2222 | ACE_TEXT("successfully loaded domain %d at %x.\n"), |
| 2223 | domain, |
| 2224 | domainPtr)); |
| 2225 | } |
| 2226 | return domainPtr; |
| 2227 | |
| 2228 | } else { |
| 2229 | return where->second.get(); |
| 2230 | } |
| 2231 | } |
| 2232 | |
| 2233 | int TAO_DDS_DCPSInfo_i::init_transport(int listen_address_given, |
| 2234 | const char* listen_str) |
no test coverage detected