OpenDDS  Snapshot(2023/04/28-20:55)
QOS_XML_Loader.h
Go to the documentation of this file.
1 /**
2  * @author Marcel Smit (msmit@remedy.nl)
3  *
4  * Starting point for QOS XML parsing library.
5  */
6 #ifndef OPENDDS_DCPS_QOS_XML_HANDLER_QOS_XML_LOADER_H
7 #define OPENDDS_DCPS_QOS_XML_HANDLER_QOS_XML_LOADER_H
8 
9 #include "dds/DdsDcpsInfrastructureC.h"
11 #include "XML_File_Intf.h"
12 
14 
15 namespace OpenDDS {
16 namespace DCPS {
17 
19  {
20  public:
21  /// Pass an optional @error_handler which is called back when
22  /// there are any errors parsing the input XML. The QOS_XML_Loader
23  /// will assume ownership when a pointer is passed
24  QOS_XML_Loader (XML::XML_Error_Handler* error_handler = 0);
25  ~QOS_XML_Loader ();
26 
27  /**
28  * init
29  *
30  * qos_profile profile should be formatted like:
31  *
32  * qos_base_file_name_without_extension#profile_name_in_xml_file
33  *
34  * Init parses this string and will append ".xml" to
35  * qos_base_file_name_without_extension. It'll than invoke
36  * the init method on the XML_File_Intf class.
37  */
39  init (const ACE_TCHAR * qos_profile);
40 
41  //@{
42  /**
43  *
44  * These methods have DDS QOS, a profile and a topic_name as
45  * input.
46  *
47  * The DDS QOS is passed by reference. This library fills this
48  * QOS and will return it to the callee.
49  *
50  * qos_profile should be the same profile string as the one
51  * passed to the init method.
52  *
53  * If the profile name is correct, the methods will invoke
54  * the corresponding method in the XML_File_Intf class.
55  *
56  */
58  get_datawriter_qos (DDS::DataWriterQos& dw_qos,
59  const ACE_TCHAR *qos_profile,
60  const ACE_TCHAR* topic_name);
61 
63  get_datareader_qos (DDS::DataReaderQos& dr_qos,
64  const ACE_TCHAR *qos_profile,
65  const ACE_TCHAR* topic_name);
66 
68  get_publisher_qos (DDS::PublisherQos& pub_qos,
69  const ACE_TCHAR *qos_profile);
70 
72  get_subscriber_qos (DDS::SubscriberQos& sub_qos,
73  const ACE_TCHAR *qos_profile);
74 
76  get_topic_qos (DDS::TopicQos& topic_qos,
77  const ACE_TCHAR *qos_profile,
78  const ACE_TCHAR *topic_name);
79 
81  get_participant_qos (DDS::DomainParticipantQos& part_qos,
82  const ACE_TCHAR *qos_profile);
83  //@}
84 
85  private:
87 
88  ACE_TString get_xml_file_name(const ACE_TCHAR* qos_profile);
89  ACE_TString get_profile_name(const ACE_TCHAR* qos_profile);
90  };
91 }
92 }
93 
95 
96 #endif /* QOS_XML_LOADER_H */
QOS_XML_File_Handler xml_file_
char ACE_TCHAR
int init(void)
#define OpenDDS_XML_QOS_Handler_Export
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28