DataReaderQos_Handler.cpp

Go to the documentation of this file.
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 //       // find the correct DataReader_qos
00013 //       for (dds::qosProfile::DataReader_qos_iterator dw_it = profile->begin_DataReader_qos ();
00014 //           dw_it != profile->end_DataReader_qos();
00015 //           ++dw_it)
00016 //         {
00017 //           if (ACE_OS::strcmp (dw_name.c_str (), name) == 0)
00018 //             {
00019 //               return get_DataReader_qos (dw_qos, *dw_it->get());
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       // get the first DataReader in the XML
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 }

Generated on Fri Feb 12 20:05:20 2016 for OpenDDS by  doxygen 1.4.7