QOS_PubSub_T< XML_QOS_TYPE, DDS_QOS_TYPE > Class Template Reference

#include <QOS_PubSub_T.h>

List of all members.

Public Member Functions

 QOS_PubSub_T (void)
 ~QOS_PubSub_T (void)
void read_qos (DDS_QOS_TYPE &, const XML_QOS_TYPE)


Detailed Description

template<typename XML_QOS_TYPE, typename DDS_QOS_TYPE>
class QOS_PubSub_T< XML_QOS_TYPE, DDS_QOS_TYPE >

Author:
Marcel Smit (msmit@remedy.nl)
This template contains the parsing of all QOS XML setting which the Publisher and the Subscriber have in common.

The DDS_QOS_TYPE template attribute can either contain an DDS::PublisherQos or an DDS::SubscriberQos. These are the IDL representatives.

The XML_QOS_TYPE can either contain an dds::publisherQos or an dds::subscriberQos. These are the XML representatives.

Definition at line 20 of file QOS_PubSub_T.h.


Constructor & Destructor Documentation

template<typename XML_QOS_TYPE, typename DDS_QOS_TYPE>
QOS_PubSub_T< XML_QOS_TYPE, DDS_QOS_TYPE >::QOS_PubSub_T ( void   ) 

Definition at line 7 of file QOS_PubSub_T.cpp.

00008 {
00009 }

template<typename XML_QOS_TYPE, typename DDS_QOS_TYPE>
QOS_PubSub_T< XML_QOS_TYPE, DDS_QOS_TYPE >::~QOS_PubSub_T ( void   ) 

Definition at line 12 of file QOS_PubSub_T.cpp.

00013 {
00014 }


Member Function Documentation

template<typename XML_QOS_TYPE, typename DDS_QOS_TYPE>
void QOS_PubSub_T< XML_QOS_TYPE, DDS_QOS_TYPE >::read_qos ( DDS_QOS_TYPE &  ,
const   XML_QOS_TYPE 
)

Definition at line 18 of file QOS_PubSub_T.cpp.

References OpenDDS::DCPS::DCPS_debug_level, DDS::GROUP_PRESENTATION_QOS, DDS::INSTANCE_PRESENTATION_QOS, CORBA::string_dup(), and DDS::TOPIC_PRESENTATION_QOS.

00019 {
00020 //  if (xml_qos->group_data ())
00021 //    {
00022       // TODO: Have a good look at this.
00023 
00024 //       const std::string value = *xml_qos->group_data ()->value ();
00025 //
00026 //       ACE_DEBUG ((LM_TRACE,
00027 //         ACE_TEXT ("QOS_DataReader_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00028 //         ACE_TEXT ("Set group_data to <%C>\n"),
00029 //         value.c_str ()));
00030 //
00031 //       dds_qos.group_data.value =
00032 //         *xml_qos->group_data ()->value ();
00033 //     }
00034 
00035     if (xml_qos->presentation_p ())
00036       {
00037         if (xml_qos->presentation ().access_scope_p ())
00038           {
00039             switch (xml_qos->presentation ().access_scope ().integral ())
00040               {
00041               case ::dds::presentationAccessScopeKind::INSTANCE_PRESENTATION_QOS_l:
00042                 dds_qos.presentation.access_scope = ::DDS::INSTANCE_PRESENTATION_QOS;
00043                 break;
00044               case ::dds::presentationAccessScopeKind::TOPIC_PRESENTATION_QOS_l:
00045                 dds_qos.presentation.access_scope = ::DDS::TOPIC_PRESENTATION_QOS;
00046                 break;
00047               case ::dds::presentationAccessScopeKind::GROUP_PRESENTATION_QOS_l:
00048                 dds_qos.presentation.access_scope = ::DDS::GROUP_PRESENTATION_QOS;
00049                 break;
00050               default:
00051                 ACE_ERROR ((LM_DEBUG,
00052                   ACE_TEXT ("QOS_PubSub_T::read_qos - ")
00053                   ACE_TEXT ("Unknown presentation access scope found <%d>; setting it to INSTANCE_PRESENTATION_QOS\n"),
00054                   xml_qos->presentation ().access_scope ().integral ()));
00055                 dds_qos.presentation.access_scope = ::DDS::INSTANCE_PRESENTATION_QOS;
00056                 break;
00057               }
00058             if (OpenDDS::DCPS::DCPS_debug_level > 9)
00059               {
00060                 ACE_DEBUG ((LM_TRACE,
00061                   ACE_TEXT ("QOS_PubSub_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00062                   ACE_TEXT ("Set presentation access scope to <%d>\n"),
00063                   dds_qos.presentation.access_scope));
00064               }
00065           }
00066         if (xml_qos->presentation ().coherent_access_p ())
00067           {
00068             dds_qos.presentation.coherent_access =
00069               xml_qos->presentation ().coherent_access ();
00070 
00071             if (OpenDDS::DCPS::DCPS_debug_level > 9)
00072               {
00073                 ACE_DEBUG ((LM_TRACE,
00074                   ACE_TEXT ("QOS_PubSub_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00075                   ACE_TEXT ("Set presentation coherent_access to <%d>\n"),
00076                   dds_qos.presentation.coherent_access));
00077               }
00078           }
00079         if (xml_qos->presentation ().ordered_access_p ())
00080           {
00081             dds_qos.presentation.ordered_access =
00082               xml_qos->presentation ().ordered_access ();
00083 
00084             if (OpenDDS::DCPS::DCPS_debug_level > 9)
00085               {
00086                 ACE_DEBUG ((LM_TRACE,
00087                   ACE_TEXT ("QOS_PubSub_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00088                   ACE_TEXT ("Set presentation ordered_access to <%d>\n"),
00089                   dds_qos.presentation.ordered_access));
00090               }
00091           }
00092       }
00093 
00094   if (xml_qos->partition_p ())
00095     {
00096       if (xml_qos->partition ().name_p ())
00097         {
00098           dds_qos.partition.name.length(static_cast<CORBA::ULong>(xml_qos->partition().name().count_element()));
00099           CORBA::ULong pos = 0;
00100           for (::dds::stringSeq::element_const_iterator it = xml_qos->partition ().name ().begin_element ();
00101                it != xml_qos->partition ().name ().end_element ();
00102                ++it, ++pos)
00103             {
00104               dds_qos.partition.name[pos] = ::CORBA::string_dup (it->get()->c_str());
00105 
00106               if (OpenDDS::DCPS::DCPS_debug_level > 9)
00107                 {
00108                   ACE_DEBUG ((LM_TRACE,
00109                     ACE_TEXT ("QOS_PubSub_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00110                     ACE_TEXT ("New name <%C> inserted in partition at position <%u>\n"),
00111                     dds_qos.partition.name[pos].in (), pos));
00112                 }
00113             }
00114         }
00115     }
00116 
00117   if (xml_qos->entity_factory_p ())
00118     {
00119       if (xml_qos->entity_factory ().autoenable_created_entities_p ())
00120         {
00121           dds_qos.entity_factory.autoenable_created_entities =
00122             xml_qos->entity_factory ().autoenable_created_entities ();
00123 
00124           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00125             {
00126               ACE_DEBUG ((LM_TRACE,
00127                 ACE_TEXT ("QOS_PubSub_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00128                 ACE_TEXT ("Set entity_factory autoenable_created_entities to <%d>\n"),
00129                 dds_qos.entity_factory.autoenable_created_entities));
00130             }
00131         }
00132     }
00133 }


The documentation for this class was generated from the following files:
Generated on Fri Feb 12 20:05:57 2016 for OpenDDS by  doxygen 1.4.7