| 756 | |
| 757 | #ifndef OPENDDS_NO_QUERY_CONDITION |
| 758 | DDS::QueryCondition_ptr DataReaderImpl::create_querycondition( |
| 759 | DDS::SampleStateMask sample_states, |
| 760 | DDS::ViewStateMask view_states, |
| 761 | DDS::InstanceStateMask instance_states, |
| 762 | const char* query_expression, |
| 763 | const DDS::StringSeq& query_parameters) |
| 764 | { |
| 765 | ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, guard, this->sample_lock_, 0); |
| 766 | try { |
| 767 | DDS::QueryCondition_var qc = new QueryConditionImpl(this, sample_states, |
| 768 | view_states, instance_states, query_expression); |
| 769 | if (qc->set_query_parameters(query_parameters) != DDS::RETCODE_OK) { |
| 770 | return 0; |
| 771 | } |
| 772 | DDS::ReadCondition_var rc = DDS::ReadCondition::_duplicate(qc); |
| 773 | read_conditions_.insert(rc); |
| 774 | return qc._retn(); |
| 775 | } catch (const std::exception& e) { |
| 776 | if (DCPS_debug_level) { |
| 777 | ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ") |
| 778 | ACE_TEXT("DataReaderImpl::create_querycondition - %C\n"), |
| 779 | e.what())); |
| 780 | } |
| 781 | } |
| 782 | return 0; |
| 783 | } |
| 784 | #endif |
| 785 | |
| 786 | bool DataReaderImpl::has_readcondition(DDS::ReadCondition_ptr a_condition) |