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 namespace OpenDDS {
00028 namespace DCPS {
00029 
00030   class XML_QOS_Handler_Export QOS_XML_File_Handler
00031   {
00032   public:
00033     QOS_XML_File_Handler (void);
00034 
00035     ~QOS_XML_File_Handler (void);
00036 
00037     /**
00038      *
00039      * init
00040      *
00041      * The init method will open the file and will validate
00042      * it against the schema. It returns RETCODE_ERROR
00043      * when any error occurs during parsing
00044      *
00045      */
00046     DDS::ReturnCode_t
00047     init (const ACE_TCHAR * file);
00048 
00049 
00050     //@{
00051     /**
00052      *
00053      * These methods will search for the profileQos in
00054      * profiles_, using the given profile_name.
00055      * If found, these methods will invoke
00056      * the corresponding method on the corresponding Handler
00057      * class.
00058      * These classes are available in the
00059      * xxxQos_Handler.h files.
00060      *
00061      */
00062     DDS::ReturnCode_t
00063     get_datawriter_qos (::DDS::DataWriterQos& dw_qos,
00064                         const char * profile_name,
00065                         const char * topic_name);
00066 
00067     DDS::ReturnCode_t
00068     get_datareader_qos (::DDS::DataReaderQos& dr_qos,
00069                         const char * profile_name,
00070                         const char * topic_name);
00071 
00072     DDS::ReturnCode_t
00073     get_topic_qos (::DDS::TopicQos& tp_qos,
00074                     const char * profile_name,
00075                     const char * topic_name);
00076 
00077     DDS::ReturnCode_t
00078     get_publisher_qos (::DDS::PublisherQos& pub_qos,
00079                         const char * profile_name);
00080 
00081     DDS::ReturnCode_t
00082     get_subscriber_qos (::DDS::SubscriberQos& sub_qos,
00083                         const char * profile_name);
00084 
00085     DDS::ReturnCode_t
00086     get_participant_qos (::DDS::DomainParticipantQos& sub_qos,
00087                           const char * profile_name);
00088     //@}
00089 
00090     /**
00091      *
00092      * add_search_path will add a relative path to the XML
00093      * parsing library. The XML parsing library will use
00094      * this path to search for the schema
00095      *
00096      */
00097     void
00098     add_search_path (const ACE_TCHAR *environment,
00099                       const ACE_TCHAR *relpath);
00100 
00101   private:
00102     ::dds::qosProfile_seq profiles_;
00103     typedef XML::XML_Typedef XML_Helper_type;
00104 
00105     /**
00106      *
00107      * Searches for the profile in the XML file, using the given
00108      * profile name.
00109      *
00110      */
00111     ::dds::qosProfile * get_profile (const char * profile_name);
00112   };
00113 }
00114 }
00115 
00116 #include /**/ "ace/post.h"
00117 
00118 #endif /* DCPS_CONFIG_XML_FILE_INTF_H */

Generated on Fri Feb 12 20:05:29 2016 for OpenDDS by  doxygen 1.4.7