XML_File_Intf.h

Go to the documentation of this file.
00001 //==============================================================
00002 /**
00003  *  @file  XML_File_Intf.h
00004  *
00005  *
00006  *  @author Marcel Smit (msmit@remedy.nl)
00007  */
00008 //================================================================
00009 
00010 #ifndef DCPS_CONFIG_XML_FILE_INTF_H
00011 #define DCPS_CONFIG_XML_FILE_INTF_H
00012 #include /**/ "ace/pre.h"
00013 
00014 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00015 # pragma once
00016 #endif /* ACE_LACKS_PRAGMA_ONCE */
00017 
00018 #include "dds_qos.hpp"
00019 #include "dds/DdsDcpsInfrastructureC.h"
00020 #include "dds/DCPS/QOS_XML_Handler/XML_QOS_Handler_Export.h"
00021 
00022 namespace XML
00023 {
00024   class XML_Typedef;
00025 }
00026 
00027 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00028 
00029 namespace OpenDDS {
00030 namespace DCPS {
00031 
00032   class XML_QOS_Handler_Export QOS_XML_File_Handler
00033   {
00034   public:
00035     QOS_XML_File_Handler (void);
00036 
00037     ~QOS_XML_File_Handler (void);
00038 
00039     /**
00040      *
00041      * init
00042      *
00043      * The init method will open the file and will validate
00044      * it against the schema. It returns RETCODE_ERROR
00045      * when any error occurs during parsing
00046      *
00047      */
00048     DDS::ReturnCode_t
00049     init (const ACE_TCHAR * file);
00050 
00051 
00052     //@{
00053     /**
00054      *
00055      * These methods will search for the profileQos in
00056      * profiles_, using the given profile_name.
00057      * If found, these methods will invoke
00058      * the corresponding method on the corresponding Handler
00059      * class.
00060      * These classes are available in the
00061      * xxxQos_Handler.h files.
00062      *
00063      */
00064     DDS::ReturnCode_t
00065     get_datawriter_qos (::DDS::DataWriterQos& dw_qos,
00066                         const char * profile_name,
00067                         const char * topic_name);
00068 
00069     DDS::ReturnCode_t
00070     get_datareader_qos (::DDS::DataReaderQos& dr_qos,
00071                         const char * profile_name,
00072                         const char * topic_name);
00073 
00074     DDS::ReturnCode_t
00075     get_topic_qos (::DDS::TopicQos& tp_qos,
00076                     const char * profile_name,
00077                     const char * topic_name);
00078 
00079     DDS::ReturnCode_t
00080     get_publisher_qos (::DDS::PublisherQos& pub_qos,
00081                         const char * profile_name);
00082 
00083     DDS::ReturnCode_t
00084     get_subscriber_qos (::DDS::SubscriberQos& sub_qos,
00085                         const char * profile_name);
00086 
00087     DDS::ReturnCode_t
00088     get_participant_qos (::DDS::DomainParticipantQos& sub_qos,
00089                           const char * profile_name);
00090     //@}
00091 
00092     /**
00093      *
00094      * add_search_path will add a relative path to the XML
00095      * parsing library. The XML parsing library will use
00096      * this path to search for the schema
00097      *
00098      */
00099     void
00100     add_search_path (const ACE_TCHAR *environment,
00101                       const ACE_TCHAR *relpath);
00102 
00103   private:
00104     ::dds::qosProfile_seq profiles_;
00105     typedef XML::XML_Typedef XML_Helper_type;
00106 
00107     /**
00108      *
00109      * Searches for the profile in the XML file, using the given
00110      * profile name.
00111      *
00112      */
00113     ::dds::qosProfile * get_profile (const char * profile_name);
00114   };
00115 }
00116 }
00117 
00118 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00119 
00120 #include /**/ "ace/post.h"
00121 
00122 #endif /* DCPS_CONFIG_XML_FILE_INTF_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1