00001 #include "DataReaderQos_Handler.h"
00002 #include "QOS_DataReader_T.h"
00003 #include "dds/DCPS/debug.h"
00004
00005 bool
00006 DataReaderQos_Handler::get_datareader_qos (DDS::DataReaderQos& dr_qos,
00007 dds::qosProfile * profile,
00008 const ACE_TCHAR * name)
00009 {
00010 if (name)
00011 {
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 }
00023 else
00024 {
00025 if (profile->count_datareader_qos () == 0)
00026 {
00027 if (OpenDDS::DCPS::DCPS_debug_level > 7)
00028 {
00029 ACE_DEBUG ((LM_TRACE,
00030 ACE_TEXT ("DataReaderQos_Handler::get_datareader_qos - ")
00031 ACE_TEXT ("No DataReader QOS available in profile <%C>\n"),
00032 profile->name ().c_str ()));
00033 }
00034 return true;
00035 }
00036
00037 dds::qosProfile::datareader_qos_iterator dr_it = profile->begin_datareader_qos ();
00038 return DataReaderQos_Handler::get_datareader_qos (dr_qos, dr_it->get ());
00039 }
00040
00041 ACE_ERROR ((LM_DEBUG,
00042 ACE_TEXT ("DataReaderQos_Handler::get_datareader_qos - ")
00043 ACE_TEXT ("Unable to find DataReaderQos <%C>\n"),
00044 name));
00045 return false;
00046 }
00047
00048 bool
00049 DataReaderQos_Handler::get_datareader_qos (DDS::DataReaderQos& dr_qos,
00050 dds::datareaderQos * dr)
00051 {
00052 typedef QOS_DataReader_T<dds::datareaderQos*, DDS::DataReaderQos> dr_type;
00053 dr_type datareader_qos_handler;
00054 datareader_qos_handler.read_qos (dr_qos, dr);
00055
00056 return true;
00057 }