Go to the documentation of this file.00001 #ifndef OMG_DDS_SUB_DATA_READER_LISTENER_HPP_
00002 #define OMG_DDS_SUB_DATA_READER_LISTENER_HPP_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <dds/core/corefwd.hpp>
00023 #include <dds/sub/subfwd.hpp>
00024
00025
00026 namespace dds { namespace sub {
00027
00028 template <typename T>
00029 class DataReaderListener {
00030 public:
00031 virtual ~DataReaderListener() { }
00032
00033 public:
00034 virtual void on_requested_deadline_missed(
00035 DataReader<T>& the_reader,
00036 const dds::core::status::RequestedDeadlineMissedStatus& status) = 0;
00037
00038 virtual void on_requested_incompatible_qos(
00039 DataReader<T>& the_reader,
00040 const dds::core::status::RequestedIncompatibleQosStatus& status) = 0;
00041
00042 virtual void on_sample_rejected(
00043 DataReader<T>& the_reader,
00044 const dds::core::status::SampleRejectedStatus& status) = 0;
00045
00046 virtual void on_liveliness_changed(
00047 DataReader<T>& the_reader,
00048 const dds::core::status::LivelinessChangedStatus& status) = 0;
00049
00050 virtual void on_data_available(DataReader<T>& the_reader) = 0;
00051
00052 virtual void on_subscription_matched(
00053 DataReader<T>& the_reader,
00054 const dds::core::status::SubscriptionMatchedStatus& status) = 0;
00055
00056 virtual void on_sample_lost(
00057 DataReader<T>& the_reader,
00058 const dds::core::status::SampleLostStatus& status) = 0;
00059 };
00060
00061
00062 template <typename T>
00063 class NoOpDataReaderListener : public virtual DataReaderListener<T> {
00064 public:
00065 virtual ~NoOpDataReaderListener() { }
00066
00067 public:
00068 virtual void on_requested_deadline_missed(
00069 DataReader<T>& the_reader,
00070 const dds::core::status::RequestedDeadlineMissedStatus& status) { }
00071
00072 virtual void on_requested_incompatible_qos(
00073 DataReader<T>& the_reader,
00074 const dds::core::status::RequestedIncompatibleQosStatus& status) { }
00075
00076 virtual void on_sample_rejected(
00077 DataReader<T>& the_reader,
00078 const dds::core::status::SampleRejectedStatus& status) { }
00079
00080 virtual void on_liveliness_changed(
00081 DataReader<T>& the_reader,
00082 const dds::core::status::LivelinessChangedStatus& status) { }
00083
00084 virtual void on_data_available(DataReader<T>& the_reader) { }
00085
00086 virtual void on_subscription_matched(
00087 DataReader<T>& the_reader,
00088 const dds::core::status::SubscriptionMatchedStatus& status) { }
00089
00090 virtual void on_sample_lost(
00091 DataReader<T>& the_reader,
00092 const dds::core::status::SampleLostStatus& status) { }
00093 };
00094
00095 } }
00096
00097 #endif