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
00015
00016
00017
00018
00019
00020
00021
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
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