MonitorFactoryImpl.h

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef OPENDDS_DCPS_MONITOR_FACTORY_IMPL_H
00009 #define OPENDDS_DCPS_MONITOR_FACTORY_IMPL_H
00010 
00011 #include "monitor_export.h"
00012 #include "dds/DCPS/MonitorFactory.h"
00013 #include "monitorTypeSupportImpl.h"
00014 
00015 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00016 #pragma once
00017 #endif /* ACE_LACKS_PRAGMA_ONCE */
00018 
00019 namespace OpenDDS {
00020 namespace DCPS {
00021 
00022 class Monitor;
00023 /**
00024 * @class MonitorFactoryImpl
00025 *
00026 * @brief Full implementation of the MonitorFactoryImpl
00027 *
00028 * Full version of this library is implemented by the monitor lib.
00029 */
00030 class OpenDDS_monitor_Export MonitorFactoryImpl
00031   : public MonitorFactory {
00032 public:
00033 
00034   //Constructor
00035   MonitorFactoryImpl();
00036 
00037   //Destructor
00038   virtual ~MonitorFactoryImpl();
00039 
00040   ///Factory function to create a service participant monitor object
00041   virtual Monitor* create_sp_monitor(Service_Participant* sp);
00042 
00043   ///Factory function to create a domain participant monitor object
00044   virtual Monitor* create_dp_monitor(DomainParticipantImpl* dp);
00045 
00046   ///Factory function to create a topic monitor object
00047   virtual Monitor* create_topic_monitor(TopicImpl* topic);
00048 
00049   ///Factory function to create a publisher monitor object
00050   virtual Monitor* create_publisher_monitor(PublisherImpl* publisher);
00051 
00052   ///Factory function to create a subscriber monitor object
00053   virtual Monitor* create_subscriber_monitor(SubscriberImpl* subscriber);
00054 
00055   ///Factory function to create a data writer monitor object
00056   virtual Monitor* create_data_writer_monitor(DataWriterImpl* dw);
00057 
00058   ///Factory function to create a data writer periodic monitor object
00059   virtual Monitor* create_data_writer_periodic_monitor(DataWriterImpl* dw);
00060 
00061   ///Factory function to create a data reader monitor object
00062   virtual Monitor* create_data_reader_monitor(DataReaderImpl* dr);
00063 
00064   ///Factory function to create a data reader periodic monitor object
00065   virtual Monitor* create_data_reader_periodic_monitor(DataReaderImpl* dr);
00066 
00067   ///Factory function to create a transport monitor object
00068   virtual Monitor* create_transport_monitor(TransportImpl* transport);
00069 
00070   virtual void initialize();
00071 
00072   ServiceParticipantReportDataWriter_ptr get_sp_writer();
00073 
00074   static int service_initialize();
00075 
00076 private:
00077   DDS::DataWriter_ptr create_data_writer(DDS::DomainParticipant_ptr participant,
00078                                          DDS::Publisher_ptr publisher,
00079                                          const char* type_name,
00080                                          const char* topic_name,
00081                                          const DDS::DataWriterQos& dw_qos);
00082 
00083   ServiceParticipantReportDataWriter_var  sp_writer_;
00084   DomainParticipantReportDataWriter_var   dp_writer_;
00085   TopicReportDataWriter_var               topic_writer_;
00086   PublisherReportDataWriter_var           pub_writer_;
00087   SubscriberReportDataWriter_var          sub_writer_;
00088   DataWriterReportDataWriter_var          dw_writer_;
00089   DataWriterPeriodicReportDataWriter_var  dw_per_writer_;
00090   DataReaderReportDataWriter_var          dr_writer_;
00091   DataReaderPeriodicReportDataWriter_var  dr_per_writer_;
00092   TransportReportDataWriter_var           transport_writer_;
00093 };
00094 
00095 static int OpenDDS_Requires_MonitorFactoryImpl_Initializer =
00096   MonitorFactoryImpl::service_initialize();
00097 
00098 } // namespace DCPS
00099 } // namespace OpenDDS
00100 
00101 
00102 ACE_STATIC_SVC_DECLARE (MonitorFactoryImpl)
00103 ACE_FACTORY_DECLARE (OpenDDS_monitor, MonitorFactoryImpl)
00104 
00105 #endif /* OPENDDS_DCPS_MONITOR_FACTORY_IMPL_H */

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