SubscriberQos_Handler.cpp

Go to the documentation of this file.
00001 
00002 #include "SubscriberQos_Handler.h"
00003 #include "QOS_PubSub_T.h"
00004 
00005 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 bool
00008 SubscriberQos_Handler::get_subscriber_qos (DDS::SubscriberQos& sub_qos,
00009                                       dds::qosProfile * profile,
00010                                       const ACE_TCHAR * name)
00011 {
00012   if (name)
00013     {
00014 //       // find the correct DataReader_qos
00015 //       for (dds::qosProfile::DataReader_qos_iterator dw_it = profile->begin_DataReader_qos ();
00016 //           dw_it != profile->end_DataReader_qos();
00017 //           ++dw_it)
00018 //         {
00019 //           if (ACE_OS::strcmp (dw_name.c_str (), name) == 0)
00020 //             {
00021 //               return get_DataReader_qos (dw_qos, *dw_it->get());
00022 //             }
00023 //         }
00024     }
00025   else
00026     {
00027       if (profile->count_subscriber_qos () == 0)
00028         {
00029           if (OpenDDS::DCPS::DCPS_debug_level > 7)
00030             {
00031               ACE_DEBUG ((LM_TRACE,
00032                 ACE_TEXT ("SubscriberQos_Handler::get_subscriber_qos - ")
00033                 ACE_TEXT ("No Subscriber QOS available in profile <%C>\n"),
00034                 profile->name ().c_str ()));
00035             }
00036           return true;
00037         }
00038       // get the first DataReader in the XML
00039       dds::qosProfile::subscriber_qos_iterator sub_it = profile->begin_subscriber_qos ();
00040       return SubscriberQos_Handler::get_subscriber_qos (sub_qos, sub_it->get ());
00041     }
00042 
00043   ACE_ERROR ((LM_DEBUG,
00044     ACE_TEXT ("SubscriberQos_Handler::get_subscriber_qos - ")
00045     ACE_TEXT ("Unable to find SubscriberQos <%C>\n"),
00046     name));
00047   return false;
00048 }
00049 
00050 bool
00051 SubscriberQos_Handler::get_subscriber_qos (DDS::SubscriberQos& sub_qos,
00052                                          dds::subscriberQos * sub)
00053 {
00054   typedef QOS_PubSub_T<dds::subscriberQos*, DDS::SubscriberQos> sub_type;
00055   sub_type subscriber_qos_handler;
00056   subscriber_qos_handler.read_qos (sub_qos, sub);
00057 
00058   return true;
00059 }
00060 
00061 OPENDDS_END_VERSIONED_NAMESPACE_DECL
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1