00001 /** 00002 * @author Marcel Smit (msmit@remedy.nl) 00003 * 00004 * 00005 * Starting point for QOS XML parsing library. 00006 * 00007 */ 00008 #ifndef QOS_XML_LOADER_H 00009 #define QOS_XML_LOADER_H 00010 00011 #include "dds/DdsDcpsInfrastructureC.h" 00012 #include "dds/DCPS/QOS_XML_Handler/XML_QOS_Handler_Export.h" 00013 #include "dds/DCPS/QOS_XML_Handler/XML_File_Intf.h" 00014 00015 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00016 00017 namespace OpenDDS { 00018 namespace DCPS { 00019 00020 class XML_QOS_Handler_Export QOS_XML_Loader 00021 { 00022 public: 00023 QOS_XML_Loader (void); 00024 ~QOS_XML_Loader (void); 00025 00026 /** 00027 * init 00028 * 00029 * qos_profile profile should be formatted like: 00030 * 00031 * qos_base_file_name_without_extension#profile_name_in_xml_file 00032 * 00033 * Init parses this string and will append ".xml" to 00034 * qos_base_file_name_without_extension. It'll than invoke 00035 * the init method on the XML_File_Intf class. 00036 * 00037 */ 00038 DDS::ReturnCode_t 00039 init (const ACE_TCHAR * qos_profile); 00040 00041 //@{ 00042 /** 00043 * 00044 * These methods have DDS QOS, a profile and a topic_name as 00045 * input. 00046 * 00047 * The DDS QOS is passed by reference. This library fills this 00048 * QOS and will return it to the callee. 00049 * 00050 * qos_profile should be the same profile string as the one 00051 * passed to the init method. 00052 * 00053 * If the profile name is correct, the methods will invoke 00054 * the corresponding method in the XML_File_Intf class. 00055 * 00056 */ 00057 DDS::ReturnCode_t 00058 get_datawriter_qos (DDS::DataWriterQos& dw_qos, 00059 const char *qos_profile, 00060 const char* topic_name); 00061 00062 DDS::ReturnCode_t 00063 get_datareader_qos (DDS::DataReaderQos& dr_qos, 00064 const char *qos_profile, 00065 const char* topic_name); 00066 00067 DDS::ReturnCode_t 00068 get_publisher_qos (DDS::PublisherQos& pub_qos, 00069 const char *qos_profile); 00070 00071 DDS::ReturnCode_t 00072 get_subscriber_qos (DDS::SubscriberQos& sub_qos, 00073 const char *qos_profile); 00074 00075 DDS::ReturnCode_t 00076 get_topic_qos (DDS::TopicQos& topic_qos, 00077 const char *qos_profile, 00078 const ACE_TCHAR *topic_name); 00079 00080 DDS::ReturnCode_t 00081 get_participant_qos (DDS::DomainParticipantQos& part_qos, 00082 const char *qos_profile); 00083 //@} 00084 00085 private: 00086 QOS_XML_File_Handler xml_file_; 00087 00088 char* get_xml_file_name (const char * qos_profile); 00089 char* get_profile_name (const char * qos_profile); 00090 }; 00091 } 00092 } 00093 00094 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00095 00096 #endif /* QOS_XML_LOADER_H */