ParticipantQos_Handler.cpp

Go to the documentation of this file.
00001 #include "ParticipantQos_Handler.h"
00002 #include "dds/DdsDcpsInfrastructureC.h"
00003 #include "dds/DCPS/debug.h"
00004 
00005 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 bool
00008 ParticipantQos_Handler::get_participant_qos (DDS::DomainParticipantQos& dp_qos,
00009                                            dds::qosProfile * profile,
00010                                            const ACE_TCHAR * name)
00011 {
00012   if (name)
00013     {
00014 //       // find the correct Participant_qos
00015 //       for (dds::qosProfile::Participant_qos_iterator dw_it = profile->begin_Participant_qos ();
00016 //           dw_it != profile->end_Participant_qos();
00017 //           ++dw_it)
00018 //         {
00019 //           if (ACE_OS::strcmp (dw_name.c_str (), name) == 0)
00020 //             {
00021 //               return get_Participant_qos (dw_qos, *dw_it->get());
00022 //             }
00023 //         }
00024     }
00025   else
00026     {
00027       if (profile->count_domainparticipant_qos () == 0)
00028         {
00029           if (OpenDDS::DCPS::DCPS_debug_level > 8)
00030             {
00031               ACE_DEBUG ((LM_TRACE,
00032                 ACE_TEXT ("ParticipantQos_Handler::get_participant_qos - ")
00033                 ACE_TEXT ("No Participant QOS available in profile <%C>\n"),
00034                 profile->name ().c_str ()));
00035             }
00036           return true;
00037         }
00038       // get the first Participant in the XML
00039       dds::qosProfile::domainparticipant_qos_iterator dr_it = profile->begin_domainparticipant_qos ();
00040       return ParticipantQos_Handler::get_participant_qos (dp_qos, dr_it->get ());
00041     }
00042 
00043   ACE_ERROR ((LM_DEBUG,
00044     ACE_TEXT ("ParticipantQos_Handler::get_participant_qos - ")
00045     ACE_TEXT ("Unable to find ParticipantQos <%C>\n"),
00046     name));
00047   return false;
00048 }
00049 
00050 bool
00051 ParticipantQos_Handler::get_participant_qos (DDS::DomainParticipantQos& dp_qos,
00052                                            dds::domainparticipantQos * dp)
00053 {
00054 
00055 //  if (xml_qos->user_data ())
00056 //    {
00057       // TODO: Have a good look at this.
00058 
00059 //       const std::string value = *xml_qos->user_data ()->value ();
00060 //
00061 //       ACE_DEBUG ((LM_TRACE,
00062 //         ACE_TEXT ("QOS_DataReader_T<XML_QOS_TYPE, DDS_QOS_TYPE>::read_qos - ")
00063 //         ACE_TEXT ("Set user_data to <%C>\n"),
00064 //         value.c_str ()));
00065 //
00066 //       dds_qos.user_data.value =
00067 //         *xml_qos->user_data ()->value ();
00068 //     }
00069 
00070 
00071   if (dp->entity_factory_p ())
00072     {
00073       if (dp->entity_factory ().autoenable_created_entities_p ())
00074         {
00075           dp_qos.entity_factory.autoenable_created_entities =
00076             dp->entity_factory ().autoenable_created_entities ();
00077 
00078           if (OpenDDS::DCPS::DCPS_debug_level > 9)
00079             {
00080               ACE_DEBUG ((LM_TRACE,
00081                 ACE_TEXT ("ParticipantQos_Handler::get_participant_qos - ")
00082                 ACE_TEXT ("Set entity_factory autoenable_created_entities to <%d>\n"),
00083                 dp_qos.entity_factory.autoenable_created_entities));
00084             }
00085         }
00086     }
00087   return true;
00088 }
00089 
00090 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