Program Listing for File Subscriber.hpp
↰ Return to documentation for file (/tmp/ws/src/fastrtps/include/dds/sub/Subscriber.hpp
)
/*
* Copyright 2020, Proyectos y Sistemas de Mantenimiento SL (eProsima).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef OMG_DDS_SUB_SUBSCRIBER_HPP_
#define OMG_DDS_SUB_SUBSCRIBER_HPP_
#include <dds/sub/detail/Subscriber.hpp>
#include <dds/core/Entity.hpp>
#include <dds/sub/qos/DataReaderQos.hpp>
#include <dds/sub/qos/SubscriberQos.hpp>
#include <dds/domain/DomainParticipant.hpp>
namespace dds {
namespace sub {
class SubscriberListener;
class Subscriber : public dds::core::TEntity<detail::Subscriber>
{
public:
typedef SubscriberListener Listener;
OMG_DDS_REF_TYPE_PROTECTED_DC(
Subscriber,
dds::core::TEntity,
detail::Subscriber)
OMG_DDS_IMPLICIT_REF_BASE(
Subscriber)
OMG_DDS_API Subscriber(
const dds::domain::DomainParticipant& dp);
OMG_DDS_API Subscriber(
const dds::domain::DomainParticipant& dp,
const qos::SubscriberQos& qos,
SubscriberListener* listener = NULL,
const dds::core::status::StatusMask& mask = dds::core::status::StatusMask::none());
virtual OMG_DDS_API ~Subscriber();
//==========================================================================
OMG_DDS_API const qos::SubscriberQos& qos() const;
OMG_DDS_API void qos(
const qos::SubscriberQos& qos);
OMG_DDS_API Subscriber& operator <<(
const qos::SubscriberQos& qos);
OMG_DDS_API Subscriber& operator >>(
qos::SubscriberQos& qos);
OMG_DDS_API Subscriber& default_datareader_qos(
const qos::DataReaderQos& qos);
OMG_DDS_API qos::DataReaderQos default_datareader_qos() const;
//==========================================================================
OMG_DDS_API void listener(
Listener* plistener,
const dds::core::status::StatusMask& mask);
OMG_DDS_API Listener* listener() const;
OMG_DDS_API const dds::domain::DomainParticipant& participant() const;
const dds::domain::DomainParticipant* participant_;
};
} //namespace sub
} //namespace dds
#endif //OMG_DDS_SUB_SUBSCRIBER_HPP_