OpenDDS  Snapshot(2023/04/28-20:55)
XML_Intf.h
Go to the documentation of this file.
1 //==============================================================
2 /**
3  * @file XML_Intf.h
4  *
5  *
6  * @author Danilo C. Zanella (dczanella@gmail.com)
7  */
8 //================================================================
9 
10 #ifndef OPENDDS_DCPS_QOS_XML_HANDLER_XML_INTF_H
11 #define OPENDDS_DCPS_QOS_XML_HANDLER_XML_INTF_H
12 #include /**/ "ace/pre.h"
13 
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
15 # pragma once
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
17 
18 #include "dds_qos.hpp"
19 #include "dds/DdsDcpsInfrastructureC.h"
21 
23 
24 namespace OpenDDS {
25 namespace DCPS {
26 
28  {
29  public:
31 
32  ~QOS_XML_Handler();
33 
34  //@{
35  /**
36  *
37  * These methods will search for the profileQos in
38  * profiles_, using the given profile_name.
39  * If found, these methods will invoke
40  * the corresponding method on the corresponding Handler
41  * class.
42  * These classes are available in the
43  * xxxQos_Handler.h files.
44  *
45  */
47  get_datawriter_qos(::DDS::DataWriterQos& dw_qos,
48  const ACE_TCHAR * profile_name,
49  const ACE_TCHAR * topic_name);
50 
52  get_datareader_qos(::DDS::DataReaderQos& dr_qos,
53  const ACE_TCHAR * profile_name,
54  const ACE_TCHAR * topic_name);
55 
57  get_topic_qos(::DDS::TopicQos& tp_qos,
58  const ACE_TCHAR * profile_name,
59  const ACE_TCHAR * topic_name);
60 
62  get_publisher_qos(::DDS::PublisherQos& pub_qos,
63  const ACE_TCHAR * profile_name);
64 
66  get_subscriber_qos(::DDS::SubscriberQos& sub_qos,
67  const ACE_TCHAR * profile_name);
68 
70  get_participant_qos(::DDS::DomainParticipantQos& sub_qos,
71  const ACE_TCHAR * profile_name);
72 
73  /**
74  * Add qos profile to sequence
75  */
77  addQoSProfile(const dds::qosProfile & profile);
78 
79  /**
80  * Add qos profiles to sequence
81  */
83  addQoSProfileSeq(const dds::qosProfile_seq & profiles);
84 
85  /**
86  * Remove qos profile to sequence
87  */
89  delQoSProfile(const ACE_TCHAR * profileName);
90 
91  /**
92  * Get number of profiles in sequence
93  */
94  size_t length() const;
95 
96  /**
97  * Get profile by name
98  */
99  ::dds::qosProfile getProfile(const ACE_TCHAR * profileName) {
100  ::dds::qosProfile* profile = get_profile (profileName);
101  if (profile) {
102  return *profile;
103  } else {
104  return ::dds::qosProfile(ACE_TEXT(""));
105  }
106  }
107 
108  /**
109  * get profiles sequence
110  */
111  const ::dds::qosProfile_seq& get() {
112  return profiles_;
113  }
114 
115  protected:
116  ::dds::qosProfile_seq profiles_;
117 
118  /**
119  *
120  * Searches for the profile in the XML file, using the given
121  * profile name.
122  *
123  */
124  ::dds::qosProfile * get_profile(const ACE_TCHAR * profile_name);
125  };
126 }
127 }
128 
130 
131 #include /**/ "ace/post.h"
132 
133 #endif /* DCPS_CONFIG_XML_INTF_H */
::dds::qosProfile getProfile(const ACE_TCHAR *profileName)
Definition: XML_Intf.h:99
char ACE_TCHAR
ACE_TEXT("TCP_Factory")
#define OpenDDS_XML_QOS_Handler_Export
::dds::qosProfile_seq profiles_
Definition: XML_Intf.h:116
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28