| 183 | } |
| 184 | |
| 185 | void DataReaderImpl::init( |
| 186 | TopicDescriptionImpl* topic_desc, |
| 187 | const DDS::DataReaderQos &qos, |
| 188 | DDS::DataReaderListener_ptr listener, |
| 189 | const DDS::StatusMask & mask, |
| 190 | DomainParticipantImpl* participant, |
| 191 | SubscriberImpl* subscriber) |
| 192 | { |
| 193 | topic_desc_ = DDS::TopicDescription::_duplicate(topic_desc); |
| 194 | if (TopicImpl* topic = dynamic_cast<TopicImpl*>(topic_desc)) { |
| 195 | topic_servant_ = topic; |
| 196 | type_support_ = dynamic_cast<TypeSupportImpl*>(topic->get_type_support()); |
| 197 | topic_id_ = topic->get_id(); |
| 198 | } |
| 199 | |
| 200 | #ifndef DDS_HAS_MINIMUM_BIT |
| 201 | CORBA::String_var topic_name = topic_desc->get_name(); |
| 202 | CORBA::String_var topic_type_name = topic_desc->get_type_name(); |
| 203 | is_bit_ = topicIsBIT(topic_name, topic_type_name); |
| 204 | #endif // !defined (DDS_HAS_MINIMUM_BIT) |
| 205 | |
| 206 | qos_ = qos; |
| 207 | passed_qos_ = qos; |
| 208 | |
| 209 | #ifndef OPENDDS_NO_OWNERSHIP_KIND_EXCLUSIVE |
| 210 | is_exclusive_ownership_ = this->qos_.ownership.kind == ::DDS::EXCLUSIVE_OWNERSHIP_QOS; |
| 211 | #endif |
| 212 | |
| 213 | set_listener(listener, mask); |
| 214 | |
| 215 | // Only store the participant pointer, since it is our "grand" |
| 216 | // parent, we will exist as long as it does |
| 217 | participant_servant_ = *participant; |
| 218 | |
| 219 | domain_id_ = participant->get_domain_id(); |
| 220 | |
| 221 | subscriber_servant_ = rchandle_from(subscriber); |
| 222 | |
| 223 | if (subscriber->get_qos(this->subqos_) != ::DDS::RETCODE_OK) { |
| 224 | ACE_DEBUG((LM_WARNING, |
| 225 | ACE_TEXT("(%P|%t) WARNING: DataReaderImpl::init() - ") |
| 226 | ACE_TEXT("failed to get SubscriberQos\n"))); |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | DDS::InstanceHandle_t |
| 231 | DataReaderImpl::get_instance_handle() |
nothing calls this directly
no test coverage detected