PublisherQos_Handler.cpp

Go to the documentation of this file.
00001 #include "PublisherQos_Handler.h"
00002 #include "QOS_PubSub_T.h"
00003 
00004 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00005 
00006 bool
00007 PublisherQos_Handler::get_publisher_qos (DDS::PublisherQos& pub_qos,
00008                                       dds::qosProfile * profile,
00009                                       const ACE_TCHAR * name)
00010 {
00011   if (name)
00012     {
00013 //       // find the correct DataReader_qos
00014 //       for (dds::qosProfile::DataReader_qos_iterator dw_it = profile->begin_DataReader_qos ();
00015 //           dw_it != profile->end_DataReader_qos();
00016 //           ++dw_it)
00017 //         {
00018 //           if (ACE_OS::strcmp (dw_name.c_str (), name) == 0)
00019 //             {
00020 //               return get_DataReader_qos (dw_qos, *dw_it->get());
00021 //             }
00022 //         }
00023     }
00024   else
00025     {
00026       if (profile->count_publisher_qos () == 0)
00027         {
00028           if (OpenDDS::DCPS::DCPS_debug_level > 7)
00029             {
00030               ACE_DEBUG ((LM_TRACE,
00031                 ACE_TEXT ("PublisherQos_Handler::get_publisher_qos - ")
00032                 ACE_TEXT ("No Publisher QOS available in profile <%C>\n"),
00033                 profile->name ().c_str ()));
00034             }
00035           return true;
00036         }
00037       // get the first DataReader in the XML
00038       dds::qosProfile::publisher_qos_iterator pub_it = profile->begin_publisher_qos ();
00039       return PublisherQos_Handler::get_publisher_qos (pub_qos, pub_it->get ());
00040     }
00041 
00042   ACE_ERROR ((LM_DEBUG,
00043     ACE_TEXT ("PublisherQos_Handler::get_publisher_qos - ")
00044     ACE_TEXT ("Unable to find PublisherQos <%C>\n"),
00045     name));
00046   return false;
00047 }
00048 
00049 bool
00050 PublisherQos_Handler::get_publisher_qos (DDS::PublisherQos& pub_qos,
00051                                          dds::publisherQos * pub)
00052 {
00053   typedef QOS_PubSub_T<dds::publisherQos*, DDS::PublisherQos> pub_type;
00054   pub_type publisher_qos_handler;
00055   publisher_qos_handler.read_qos (pub_qos, pub);
00056 
00057   return true;
00058 }
00059 
00060 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