OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | List of all members
OpenDDS::DCPS::QOS_XML_Handler Class Reference

#include <XML_Intf.h>

Inheritance diagram for OpenDDS::DCPS::QOS_XML_Handler:
Inheritance graph
[legend]

Public Member Functions

 QOS_XML_Handler ()
 
 ~QOS_XML_Handler ()
 
::dds::qosProfile_seq profiles_
 
DDS::ReturnCode_t get_datawriter_qos (::DDS::DataWriterQos &dw_qos, const ACE_TCHAR *profile_name, const ACE_TCHAR *topic_name)
 
DDS::ReturnCode_t get_datareader_qos (::DDS::DataReaderQos &dr_qos, const ACE_TCHAR *profile_name, const ACE_TCHAR *topic_name)
 
DDS::ReturnCode_t get_topic_qos (::DDS::TopicQos &tp_qos, const ACE_TCHAR *profile_name, const ACE_TCHAR *topic_name)
 
DDS::ReturnCode_t get_publisher_qos (::DDS::PublisherQos &pub_qos, const ACE_TCHAR *profile_name)
 
DDS::ReturnCode_t get_subscriber_qos (::DDS::SubscriberQos &sub_qos, const ACE_TCHAR *profile_name)
 
DDS::ReturnCode_t get_participant_qos (::DDS::DomainParticipantQos &sub_qos, const ACE_TCHAR *profile_name)
 
DDS::ReturnCode_t addQoSProfile (const dds::qosProfile &profile)
 
DDS::ReturnCode_t addQoSProfileSeq (const dds::qosProfile_seq &profiles)
 
DDS::ReturnCode_t delQoSProfile (const ACE_TCHAR *profileName)
 
size_t length () const
 
::dds::qosProfile getProfile (const ACE_TCHAR *profileName)
 
const ::dds::qosProfile_seq & get ()
 
::dds::qosProfile * get_profile (const ACE_TCHAR *profile_name)
 

Detailed Description

Definition at line 27 of file XML_Intf.h.

Constructor & Destructor Documentation

◆ QOS_XML_Handler()

OpenDDS::DCPS::QOS_XML_Handler::QOS_XML_Handler ( )

Definition at line 20 of file XML_Intf.cpp.

21  {
22  }

◆ ~QOS_XML_Handler()

OpenDDS::DCPS::QOS_XML_Handler::~QOS_XML_Handler ( )

Definition at line 24 of file XML_Intf.cpp.

25  {
26  }

Member Function Documentation

◆ addQoSProfile()

DDS::ReturnCode_t OpenDDS::DCPS::QOS_XML_Handler::addQoSProfile ( const dds::qosProfile &  profile)

Add qos profile to sequence

Definition at line 72 of file XML_Intf.cpp.

References ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, LM_ERROR, profiles_, DDS::RETCODE_ERROR, DDS::RETCODE_OK, ACE_OS::strcmp(), and ACE_OS::strlen().

Referenced by addQoSProfileSeq().

73  {
74  // get profile name and check if it exists
75 
76  const ACE_TCHAR* profileName = profile.name().c_str();
77  if (ACE_OS::strlen(profileName) == 0) {
78  if (DCPS_debug_level > 7)
79  {
80  ACE_ERROR((LM_ERROR,
81  ACE_TEXT("(%P|%t) ERROR: QOS_XML_Handler::addQoSProfile - ")
82  ACE_TEXT("No profile name specified\n")));
83  return DDS::RETCODE_ERROR;
84  }
85  }
86 
87  // check if this profile name is already in the list
88  dds::qosProfile_seq::qos_profile_const_iterator it;
89  for (it = profiles_.begin_qos_profile();
90  it != profiles_.end_qos_profile();
91  ++it)
92  {
93  if (ACE_OS::strcmp((*it)->name().c_str(), profileName) == 0) {
94  if (DCPS_debug_level > 7)
95  {
96  ACE_ERROR((LM_ERROR,
97  ACE_TEXT("(%P|%t) ERROR: QOS_XML_Handler::addQoSProfile - ")
98  ACE_TEXT("Profile exists or profile name <%C> in use.\n"),
99  profileName));
100  }
101  return DDS::RETCODE_ERROR;
102  }
103  }
104 
105  // append qos profile to list
106  dds::qosProfile_seq::qos_profile_value_type t(new dds::qosProfile(profile));
107  profiles_.add_qos_profile(t);
108  return DDS::RETCODE_OK;
109  }
#define ACE_ERROR(X)
size_t strlen(const char *s)
char ACE_TCHAR
int strcmp(const char *s, const char *t)
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
::dds::qosProfile_seq profiles_
Definition: XML_Intf.h:116
const ReturnCode_t RETCODE_ERROR
const ReturnCode_t RETCODE_OK

◆ addQoSProfileSeq()

DDS::ReturnCode_t OpenDDS::DCPS::QOS_XML_Handler::addQoSProfileSeq ( const dds::qosProfile_seq &  profiles)

Add qos profiles to sequence

Definition at line 112 of file XML_Intf.cpp.

References addQoSProfile(), and DDS::RETCODE_OK.

113  {
114 
115  dds::qosProfile_seq::qos_profile_const_iterator it;
116  for (it = profiles.begin_qos_profile();
117  it != profiles.end_qos_profile();
118  ++it)
119  {
120  dds::qosProfile qos(*(it->get()));
121  addQoSProfile(qos);
122  }
123 
124  return DDS::RETCODE_OK;
125 
126  }
DDS::ReturnCode_t addQoSProfile(const dds::qosProfile &profile)
Definition: XML_Intf.cpp:72
const ReturnCode_t RETCODE_OK

◆ delQoSProfile()

DDS::ReturnCode_t OpenDDS::DCPS::QOS_XML_Handler::delQoSProfile ( const ACE_TCHAR profileName)

Remove qos profile to sequence

Definition at line 129 of file XML_Intf.cpp.

References ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, LM_ERROR, profiles_, DDS::RETCODE_ERROR, DDS::RETCODE_OK, ACE_OS::strcmp(), and ACE_OS::strlen().

130  {
131 
132  if (ACE_OS::strlen(profileName) == 0)
133  {
134  if (DCPS_debug_level > 7)
135  {
136  ACE_ERROR((LM_ERROR,
137  ACE_TEXT("(%P|%t) ERROR: QOS_XML_Handler::delQoSProfile - ")
138  ACE_TEXT("No profile specified\n")));
139  return DDS::RETCODE_ERROR;
140  }
141  }
142 
143  dds::qosProfile_seq::qos_profile_const_iterator it;
144  for (it = profiles_.begin_qos_profile();
145  it != profiles_.end_qos_profile();
146  ++it)
147  {
148  if (ACE_OS::strcmp((*it)->name().c_str(), profileName) == 0) {
149  profiles_.del_qos_profile(*it);
150  return DDS::RETCODE_OK;
151  }
152 
153  }
154 
155  if (DCPS_debug_level > 7)
156  {
157  ACE_ERROR((LM_ERROR,
158  ACE_TEXT("(%P|%t) ERROR: QOS_XML_Handler::delQoSProfile - ")
159  ACE_TEXT("Profile doesn't exists or wrong profile name.\n")));
160  }
161  return DDS::RETCODE_ERROR;
162  }
#define ACE_ERROR(X)
size_t strlen(const char *s)
int strcmp(const char *s, const char *t)
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
::dds::qosProfile_seq profiles_
Definition: XML_Intf.h:116
const ReturnCode_t RETCODE_ERROR
const ReturnCode_t RETCODE_OK

◆ get()

const ::dds::qosProfile_seq& OpenDDS::DCPS::QOS_XML_Handler::get ( void  )
inline

get profiles sequence

Definition at line 111 of file XML_Intf.h.

111  {
112  return profiles_;
113  }
::dds::qosProfile_seq profiles_
Definition: XML_Intf.h:116

◆ get_datareader_qos()

DDS::ReturnCode_t OpenDDS::DCPS::QOS_XML_Handler::get_datareader_qos ( ::DDS::DataReaderQos dr_qos,
const ACE_TCHAR profile_name,
const ACE_TCHAR topic_name 
)

These methods will search for the profileQos in profiles_, using the given profile_name. If found, these methods will invoke the corresponding method on the corresponding Handler class. These classes are available in the xxxQos_Handler.h files.

Definition at line 208 of file XML_Intf.cpp.

References CORBA::Exception::_info(), ACE_ERROR, ACE_TEXT(), ACE_String_Base< char >::c_str(), DataReaderQos_Handler::get_datareader_qos(), get_profile(), LM_ERROR, DDS::RETCODE_BAD_PARAMETER, DDS::RETCODE_ERROR, and DDS::RETCODE_OK.

Referenced by OpenDDS::DCPS::QOS_XML_Loader::get_datareader_qos().

211  {
212  ACE_UNUSED_ARG(topic_name);
213 
215  try
216  {
217  ::dds::qosProfile * profile = this->get_profile(profile_name);
218  if (profile != 0)
219  {
221  retcode = ::DDS::RETCODE_OK;
222  }
223  else
224  retcode = DDS::RETCODE_BAD_PARAMETER;
225  }
226  catch (const CORBA::Exception &ex)
227  {
228  ACE_ERROR((LM_ERROR,
229  ACE_TEXT("QOS_XML_Handler::get_datareader_qos - ")
230  ACE_TEXT("Caught CORBA exception whilst parsing XML into IDL: %C\n"),
231  ex._info().c_str()));
232  retcode = DDS::RETCODE_ERROR;
233  }
234  catch (...)
235  {
236  ACE_ERROR((LM_ERROR,
237  ACE_TEXT("QOS_XML_Handler::get_datareader_qos - ")
238  ACE_TEXT("Unexpected exception whilst parsing XML into IDL.\n")));
239  retcode = DDS::RETCODE_ERROR;
240  }
241 
242  return retcode;
243  }
#define ACE_ERROR(X)
const char * c_str(void) const
static bool get_datareader_qos(::DDS::DataReaderQos &dr_qos, ::dds::qosProfile *profile, const ACE_TCHAR *name=0)
virtual ACE_CString _info(void) const=0
::dds::qosProfile * get_profile(const ACE_TCHAR *profile_name)
Definition: XML_Intf.cpp:29
ACE_TEXT("TCP_Factory")
const ReturnCode_t RETCODE_ERROR
const ReturnCode_t RETCODE_OK
const ReturnCode_t RETCODE_BAD_PARAMETER

◆ get_datawriter_qos()

DDS::ReturnCode_t OpenDDS::DCPS::QOS_XML_Handler::get_datawriter_qos ( ::DDS::DataWriterQos dw_qos,
const ACE_TCHAR profile_name,
const ACE_TCHAR topic_name 
)

These methods will search for the profileQos in profiles_, using the given profile_name. If found, these methods will invoke the corresponding method on the corresponding Handler class. These classes are available in the xxxQos_Handler.h files.

Definition at line 170 of file XML_Intf.cpp.

References CORBA::Exception::_info(), ACE_ERROR, ACE_TEXT(), ACE_String_Base< char >::c_str(), DataWriterQos_Handler::get_datawriter_qos(), get_profile(), LM_ERROR, DDS::RETCODE_BAD_PARAMETER, DDS::RETCODE_ERROR, and DDS::RETCODE_OK.

Referenced by OpenDDS::DCPS::QOS_XML_Loader::get_datawriter_qos().

173  {
174  ACE_UNUSED_ARG(topic_name);
175 
177  try
178  {
179  ::dds::qosProfile * profile = this->get_profile(profile_name);
180  if (profile != 0)
181  {
183  retcode = ::DDS::RETCODE_OK;
184  }
185  else
186  retcode = DDS::RETCODE_BAD_PARAMETER;
187  }
188  catch (const CORBA::Exception &ex)
189  {
190  ACE_ERROR((LM_ERROR,
191  ACE_TEXT("QOS_XML_Handler::get_datawriter_qos - ")
192  ACE_TEXT("Caught CORBA exception whilst parsing XML into IDL: %C\n"),
193  ex._info().c_str()));
194  retcode = DDS::RETCODE_ERROR;
195  }
196  catch (...)
197  {
198  ACE_ERROR((LM_ERROR,
199  ACE_TEXT("QOS_XML_Handler::get_datawriter_qos - ")
200  ACE_TEXT("Unexpected exception whilst parsing XML into IDL.\n")));
201  retcode = DDS::RETCODE_ERROR;
202  }
203 
204  return retcode;
205  }
#define ACE_ERROR(X)
const char * c_str(void) const
virtual ACE_CString _info(void) const=0
::dds::qosProfile * get_profile(const ACE_TCHAR *profile_name)
Definition: XML_Intf.cpp:29
ACE_TEXT("TCP_Factory")
const ReturnCode_t RETCODE_ERROR
const ReturnCode_t RETCODE_OK
const ReturnCode_t RETCODE_BAD_PARAMETER
static bool get_datawriter_qos(::DDS::DataWriterQos &dw_qos, ::dds::qosProfile *profile, const ACE_TCHAR *name=0)

◆ get_participant_qos()

DDS::ReturnCode_t OpenDDS::DCPS::QOS_XML_Handler::get_participant_qos ( ::DDS::DomainParticipantQos sub_qos,
const ACE_TCHAR profile_name 
)

These methods will search for the profileQos in profiles_, using the given profile_name. If found, these methods will invoke the corresponding method on the corresponding Handler class. These classes are available in the xxxQos_Handler.h files.

Definition at line 354 of file XML_Intf.cpp.

References CORBA::Exception::_info(), ACE_ERROR, ACE_TEXT(), ACE_String_Base< char >::c_str(), ParticipantQos_Handler::get_participant_qos(), get_profile(), LM_ERROR, OPENDDS_END_VERSIONED_NAMESPACE_DECL, DDS::RETCODE_BAD_PARAMETER, DDS::RETCODE_ERROR, and DDS::RETCODE_OK.

Referenced by OpenDDS::DCPS::QOS_XML_Loader::get_participant_qos().

356  {
358  try
359  {
360  ::dds::qosProfile * profile = this->get_profile(profile_name);
361  if (profile != 0)
362  {
364  retcode = ::DDS::RETCODE_OK;
365  }
366  else
367  retcode = DDS::RETCODE_BAD_PARAMETER;
368  }
369  catch (const CORBA::Exception &ex)
370  {
371  ACE_ERROR((LM_ERROR,
372  ACE_TEXT("QOS_XML_Handler::get_participant_qos - ")
373  ACE_TEXT("Caught CORBA exception whilst parsing XML into IDL: %C\n"),
374  ex._info().c_str()));
375  retcode = DDS::RETCODE_ERROR;
376  }
377  catch (...)
378  {
379  ACE_ERROR((LM_ERROR,
380  ACE_TEXT("QOS_XML_Handler::get_participant_qos - ")
381  ACE_TEXT("Unexpected exception whilst parsing XML into IDL.\n")));
382  retcode = DDS::RETCODE_ERROR;
383  }
384 
385  return retcode;
386  }
#define ACE_ERROR(X)
const char * c_str(void) const
virtual ACE_CString _info(void) const=0
::dds::qosProfile * get_profile(const ACE_TCHAR *profile_name)
Definition: XML_Intf.cpp:29
ACE_TEXT("TCP_Factory")
const ReturnCode_t RETCODE_ERROR
const ReturnCode_t RETCODE_OK
static bool get_participant_qos(::DDS::DomainParticipantQos &dp_qos, ::dds::qosProfile *profile, const ACE_TCHAR *name=0)
const ReturnCode_t RETCODE_BAD_PARAMETER

◆ get_profile()

dds::qosProfile * OpenDDS::DCPS::QOS_XML_Handler::get_profile ( const ACE_TCHAR profile_name)
protected

Searches for the profile in the XML file, using the given profile name.

Definition at line 29 of file XML_Intf.cpp.

References ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, LM_ERROR, profiles_, ACE_OS::strcmp(), and ACE_OS::strlen().

Referenced by get_datareader_qos(), get_datawriter_qos(), get_participant_qos(), get_publisher_qos(), get_subscriber_qos(), and get_topic_qos().

30  {
31  if (ACE_OS::strlen(profile_name) == 0)
32  {
33  if (DCPS_debug_level > 7)
34  {
35  ACE_ERROR((LM_ERROR,
36  ACE_TEXT("(%P|%t) ERROR: QOS_XML_Handler::get_profile - ")
37  ACE_TEXT("No profile specified\n")));
38  return 0;
39  }
40  }
41 
42  dds::qosProfile_seq::qos_profile_const_iterator it;
43  for (it = profiles_.begin_qos_profile();
44  it != profiles_.end_qos_profile();
45  ++it)
46  {
47  if (ACE_OS::strcmp((*it)->name().c_str(), profile_name) == 0)
48  {
49  if (DCPS_debug_level > 7)
50  {
51  ACE_ERROR((LM_ERROR,
52  ACE_TEXT("QOS_XML_Handler::get_profile - ")
53  ACE_TEXT("Found profile <%s>\n"),
54  (*it)->name().c_str()));
55  }
56  return it->get();
57  }
58  }
59 
61  {
62  ACE_ERROR ((LM_ERROR,
63  ACE_TEXT("(%P|%t) ERROR: QOS_XML_Handler::get_profile - ")
64  ACE_TEXT("Did not find profile <%s>\n"),
65  profile_name));
66  }
67 
68  return 0;
69  }
#define ACE_ERROR(X)
size_t strlen(const char *s)
int strcmp(const char *s, const char *t)
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
::dds::qosProfile_seq profiles_
Definition: XML_Intf.h:116

◆ get_publisher_qos()

DDS::ReturnCode_t OpenDDS::DCPS::QOS_XML_Handler::get_publisher_qos ( ::DDS::PublisherQos pub_qos,
const ACE_TCHAR profile_name 
)

These methods will search for the profileQos in profiles_, using the given profile_name. If found, these methods will invoke the corresponding method on the corresponding Handler class. These classes are available in the xxxQos_Handler.h files.

Definition at line 284 of file XML_Intf.cpp.

References CORBA::Exception::_info(), ACE_ERROR, ACE_TEXT(), ACE_String_Base< char >::c_str(), get_profile(), PublisherQos_Handler::get_publisher_qos(), LM_ERROR, DDS::RETCODE_BAD_PARAMETER, DDS::RETCODE_ERROR, and DDS::RETCODE_OK.

Referenced by OpenDDS::DCPS::QOS_XML_Loader::get_publisher_qos().

286  {
288  try
289  {
290  ::dds::qosProfile * profile = this->get_profile(profile_name);
291  if (profile != 0)
292  {
293  PublisherQos_Handler::get_publisher_qos(pub_qos, profile);
294  retcode = ::DDS::RETCODE_OK;
295  }
296  else
297  retcode = DDS::RETCODE_BAD_PARAMETER;
298  }
299  catch (const CORBA::Exception &ex)
300  {
301  ACE_ERROR((LM_ERROR,
302  ACE_TEXT("QOS_XML_Handler::get_publisher_qos - ")
303  ACE_TEXT("Caught CORBA exception whilst parsing XML into IDL: %C\n"),
304  ex._info().c_str()));
305  retcode = DDS::RETCODE_ERROR;
306  }
307  catch (...)
308  {
309  ACE_ERROR((LM_ERROR,
310  ACE_TEXT("QOS_XML_Handler::get_publisher_qos - ")
311  ACE_TEXT("Unexpected exception whilst parsing XML into IDL.\n")));
312  retcode = DDS::RETCODE_ERROR;
313  }
314 
315  return retcode;
316  }
#define ACE_ERROR(X)
const char * c_str(void) const
static bool get_publisher_qos(::DDS::PublisherQos &pub_qos, ::dds::qosProfile *profile, const ACE_TCHAR *name=0)
virtual ACE_CString _info(void) const=0
::dds::qosProfile * get_profile(const ACE_TCHAR *profile_name)
Definition: XML_Intf.cpp:29
ACE_TEXT("TCP_Factory")
const ReturnCode_t RETCODE_ERROR
const ReturnCode_t RETCODE_OK
const ReturnCode_t RETCODE_BAD_PARAMETER

◆ get_subscriber_qos()

DDS::ReturnCode_t OpenDDS::DCPS::QOS_XML_Handler::get_subscriber_qos ( ::DDS::SubscriberQos sub_qos,
const ACE_TCHAR profile_name 
)

These methods will search for the profileQos in profiles_, using the given profile_name. If found, these methods will invoke the corresponding method on the corresponding Handler class. These classes are available in the xxxQos_Handler.h files.

Definition at line 319 of file XML_Intf.cpp.

References CORBA::Exception::_info(), ACE_ERROR, ACE_TEXT(), ACE_String_Base< char >::c_str(), get_profile(), SubscriberQos_Handler::get_subscriber_qos(), LM_ERROR, DDS::RETCODE_BAD_PARAMETER, DDS::RETCODE_ERROR, and DDS::RETCODE_OK.

Referenced by OpenDDS::DCPS::QOS_XML_Loader::get_subscriber_qos().

321  {
323  try
324  {
325  ::dds::qosProfile * profile = this->get_profile(profile_name);
326  if (profile != 0)
327  {
329  retcode = ::DDS::RETCODE_OK;
330  }
331  else
332  retcode = DDS::RETCODE_BAD_PARAMETER;
333  }
334  catch (const CORBA::Exception &ex)
335  {
336  ACE_ERROR((LM_ERROR,
337  ACE_TEXT("QOS_XML_Handler::get_subscriber_qos - ")
338  ACE_TEXT("Caught CORBA exception whilst parsing XML into IDL: %C\n"),
339  ex._info().c_str()));
340  retcode = DDS::RETCODE_ERROR;
341  }
342  catch (...)
343  {
344  ACE_ERROR((LM_ERROR,
345  ACE_TEXT("QOS_XML_Handler::get_subscriber_qos - ")
346  ACE_TEXT("Unexpected exception whilst parsing XML into IDL.\n")));
347  retcode = DDS::RETCODE_ERROR;
348  }
349 
350  return retcode;
351  }
#define ACE_ERROR(X)
const char * c_str(void) const
static bool get_subscriber_qos(::DDS::SubscriberQos &sub_qos, ::dds::qosProfile *profile, const ACE_TCHAR *name=0)
virtual ACE_CString _info(void) const=0
::dds::qosProfile * get_profile(const ACE_TCHAR *profile_name)
Definition: XML_Intf.cpp:29
ACE_TEXT("TCP_Factory")
const ReturnCode_t RETCODE_ERROR
const ReturnCode_t RETCODE_OK
const ReturnCode_t RETCODE_BAD_PARAMETER

◆ get_topic_qos()

DDS::ReturnCode_t OpenDDS::DCPS::QOS_XML_Handler::get_topic_qos ( ::DDS::TopicQos tp_qos,
const ACE_TCHAR profile_name,
const ACE_TCHAR topic_name 
)

These methods will search for the profileQos in profiles_, using the given profile_name. If found, these methods will invoke the corresponding method on the corresponding Handler class. These classes are available in the xxxQos_Handler.h files.

Definition at line 246 of file XML_Intf.cpp.

References CORBA::Exception::_info(), ACE_ERROR, ACE_TEXT(), ACE_String_Base< char >::c_str(), get_profile(), TopicQos_Handler::get_topic_qos(), LM_ERROR, DDS::RETCODE_BAD_PARAMETER, DDS::RETCODE_ERROR, and DDS::RETCODE_OK.

Referenced by OpenDDS::DCPS::QOS_XML_Loader::get_topic_qos().

249  {
250  ACE_UNUSED_ARG(topic_name);
251 
253  try
254  {
255  ::dds::qosProfile * profile = this->get_profile(profile_name);
256  if (profile != 0)
257  {
258  TopicQos_Handler::get_topic_qos(tp_qos, profile);
259  retcode = ::DDS::RETCODE_OK;
260  }
261  else
262  retcode = DDS::RETCODE_BAD_PARAMETER;
263  }
264  catch (const CORBA::Exception &ex)
265  {
266  ACE_ERROR((LM_ERROR,
267  ACE_TEXT("QOS_XML_Handler::get_topic_qos - ")
268  ACE_TEXT("Caught CORBA exception whilst parsing XML into IDL: %C\n"),
269  ex._info().c_str()));
270  retcode = DDS::RETCODE_ERROR;
271  }
272  catch (...)
273  {
274  ACE_ERROR((LM_ERROR,
275  ACE_TEXT("QOS_XML_Handler::get_topic_qos - ")
276  ACE_TEXT("Unexpected exception whilst parsing XML into IDL.\n")));
277  retcode = DDS::RETCODE_ERROR;
278  }
279 
280  return retcode;
281  }
#define ACE_ERROR(X)
const char * c_str(void) const
virtual ACE_CString _info(void) const=0
::dds::qosProfile * get_profile(const ACE_TCHAR *profile_name)
Definition: XML_Intf.cpp:29
static bool get_topic_qos(::DDS::TopicQos &tp_qos, ::dds::qosProfile *profile, const ACE_TCHAR *name=0)
ACE_TEXT("TCP_Factory")
const ReturnCode_t RETCODE_ERROR
const ReturnCode_t RETCODE_OK
const ReturnCode_t RETCODE_BAD_PARAMETER

◆ getProfile()

::dds::qosProfile OpenDDS::DCPS::QOS_XML_Handler::getProfile ( const ACE_TCHAR profileName)
inline

Get profile by name

Definition at line 99 of file XML_Intf.h.

References ACE_TEXT().

99  {
100  ::dds::qosProfile* profile = get_profile (profileName);
101  if (profile) {
102  return *profile;
103  } else {
104  return ::dds::qosProfile(ACE_TEXT(""));
105  }
106  }
::dds::qosProfile * get_profile(const ACE_TCHAR *profile_name)
Definition: XML_Intf.cpp:29
ACE_TEXT("TCP_Factory")

◆ length()

size_t OpenDDS::DCPS::QOS_XML_Handler::length ( void  ) const

Get number of profiles in sequence

Definition at line 164 of file XML_Intf.cpp.

References profiles_.

165  {
166  return profiles_.count_qos_profile();
167  }
::dds::qosProfile_seq profiles_
Definition: XML_Intf.h:116

Member Data Documentation

◆ profiles_

::dds::qosProfile_seq OpenDDS::DCPS::QOS_XML_Handler::profiles_
protected

These methods will search for the profileQos in profiles_, using the given profile_name. If found, these methods will invoke the corresponding method on the corresponding Handler class. These classes are available in the xxxQos_Handler.h files.

Definition at line 116 of file XML_Intf.h.

Referenced by addQoSProfile(), delQoSProfile(), get_profile(), OpenDDS::DCPS::QOS_XML_File_Handler::init(), OpenDDS::DCPS::QOS_XML_String_Handler::init(), and length().


The documentation for this class was generated from the following files: