00001 #include "ParticipantQos_Handler.h"
00002 #include "dds/DdsDcpsInfrastructureC.h"
00003 #include "dds/DCPS/debug.h"
00004
00005 bool
00006 ParticipantQos_Handler::get_participant_qos (DDS::DomainParticipantQos& dp_qos,
00007 dds::qosProfile * profile,
00008 const ACE_TCHAR * name)
00009 {
00010 if (name)
00011 {
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 }
00023 else
00024 {
00025 if (profile->count_domainparticipant_qos () == 0)
00026 {
00027 if (OpenDDS::DCPS::DCPS_debug_level > 8)
00028 {
00029 ACE_DEBUG ((LM_TRACE,
00030 ACE_TEXT ("ParticipantQos_Handler::get_participant_qos - ")
00031 ACE_TEXT ("No Participant QOS available in profile <%C>\n"),
00032 profile->name ().c_str ()));
00033 }
00034 return true;
00035 }
00036
00037 dds::qosProfile::domainparticipant_qos_iterator dr_it = profile->begin_domainparticipant_qos ();
00038 return ParticipantQos_Handler::get_participant_qos (dp_qos, dr_it->get ());
00039 }
00040
00041 ACE_ERROR ((LM_DEBUG,
00042 ACE_TEXT ("ParticipantQos_Handler::get_participant_qos - ")
00043 ACE_TEXT ("Unable to find ParticipantQos <%C>\n"),
00044 name));
00045 return false;
00046 }
00047
00048 bool
00049 ParticipantQos_Handler::get_participant_qos (DDS::DomainParticipantQos& dp_qos,
00050 dds::domainparticipantQos * dp)
00051 {
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 if (dp->entity_factory_p ())
00070 {
00071 if (dp->entity_factory ().autoenable_created_entities_p ())
00072 {
00073 dp_qos.entity_factory.autoenable_created_entities =
00074 dp->entity_factory ().autoenable_created_entities ();
00075
00076 if (OpenDDS::DCPS::DCPS_debug_level > 9)
00077 {
00078 ACE_DEBUG ((LM_TRACE,
00079 ACE_TEXT ("ParticipantQos_Handler::get_participant_qos - ")
00080 ACE_TEXT ("Set entity_factory autoenable_created_entities to <%d>\n"),
00081 dp_qos.entity_factory.autoenable_created_entities));
00082 }
00083 }
00084 }
00085 return true;
00086 }