OpenDDS  Snapshot(2023/04/28-20:55)
TopicQos_Handler.cpp
Go to the documentation of this file.
1 #include "TopicQos_Handler.h"
2 #include "QOS_Topic_T.h"
3 
5 
6 bool
8  dds::qosProfile * profile,
9  const ACE_TCHAR * name)
10 {
11  if (name)
12  {
13 // // find the correct DataReader_qos
14 // for (dds::qosProfile::DataReader_qos_iterator dw_it = profile->begin_DataReader_qos();
15 // dw_it != profile->end_DataReader_qos();
16 // ++dw_it)
17 // {
18 // if (ACE_OS::strcmp(dw_name.c_str(), name) == 0)
19 // {
20 // return get_DataReader_qos(dw_qos, *dw_it->get());
21 // }
22 // }
23  }
24  else
25  {
26  if (profile->count_topic_qos() == 0)
27  {
29  {
30  ACE_DEBUG((LM_TRACE,
31  ACE_TEXT("TopicQos_Handler::get_topic_qos - ")
32  ACE_TEXT("No Topic QOS available in profile <%s>\n"),
33  profile->name().c_str()));
34  }
35  return true;
36  }
37  // get the first DataReader in the XML
38  dds::qosProfile::topic_qos_iterator tp_it = profile->begin_topic_qos();
39  return TopicQos_Handler::get_topic_qos(tp_qos, tp_it->get());
40  }
41 
42  ACE_ERROR((LM_ERROR,
43  ACE_TEXT("(%P|%t) ERROR: TopicQos_Handler::get_topic_qos - ")
44  ACE_TEXT("Unable to find TopicQos <%s>\n"),
45  name));
46  return false;
47 }
48 
49 bool
51  dds::topicQos * tp)
52 {
54  tp_type topic_qos_handler;
55  topic_qos_handler.read_qos(tp_qos, tp);
56 
57  return true;
58 }
59 
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
void read_qos(DDS_QOS_TYPE &, const XML_QOS_TYPE)
Definition: QOS_Topic_T.cpp:19
char ACE_TCHAR
const char *const name
Definition: debug.cpp:60
static bool get_topic_qos(::DDS::TopicQos &tp_qos, ::dds::qosProfile *profile, const ACE_TCHAR *name=0)
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL