Program Listing for File PublisherQos.hpp

Return to documentation for file (/tmp/ws/src/fastrtps/include/fastdds/dds/publisher/qos/PublisherQos.hpp)

// Copyright 2019 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 _FASTDDS_PUBLISHERQOS_HPP_
#define _FASTDDS_PUBLISHERQOS_HPP_

#include <fastdds/dds/core/policy/QosPolicies.hpp>
#include <fastrtps/attributes/PublisherAttributes.h>

namespace eprosima {
namespace fastdds {
namespace dds {

class PublisherQos
{
public:

    RTPS_DllAPI PublisherQos()
    {
    }

    RTPS_DllAPI virtual ~PublisherQos() = default;

    bool operator ==(
            const PublisherQos& b) const
    {
        return (this->presentation_ == b.presentation()) &&
               (this->partition_ == b.partition()) &&
               (this->group_data_ == b.group_data()) &&
               (this->entity_factory_ == b.entity_factory());
    }

    const PresentationQosPolicy& presentation() const
    {
        return presentation_;
    }

    PresentationQosPolicy& presentation()
    {
        return presentation_;
    }

    void presentation(
            const PresentationQosPolicy& presentation)
    {
        presentation_ = presentation;
    }

    const PartitionQosPolicy& partition() const
    {
        return partition_;
    }

    PartitionQosPolicy& partition()
    {
        return partition_;
    }

    void partition(
            const PartitionQosPolicy& partition)
    {
        partition_ = partition;
    }

    const GroupDataQosPolicy& group_data() const
    {
        return group_data_;
    }

    GroupDataQosPolicy& group_data()
    {
        return group_data_;
    }

    void group_data(
            const GroupDataQosPolicy& group_data)
    {
        group_data_ = group_data;
    }

    const EntityFactoryQosPolicy& entity_factory() const
    {
        return entity_factory_;
    }

    EntityFactoryQosPolicy& entity_factory()
    {
        return entity_factory_;
    }

    void entity_factory(
            const EntityFactoryQosPolicy& entity_factory)
    {
        entity_factory_ = entity_factory;
    }

private:

    PresentationQosPolicy presentation_;

    PartitionQosPolicy partition_;

    GroupDataQosPolicy group_data_;

    EntityFactoryQosPolicy entity_factory_;

};

RTPS_DllAPI extern const PublisherQos PUBLISHER_QOS_DEFAULT;

} // namespace dds
} // namespace fastdds
} // namespace eprosima

#endif // _FASTDDS_PUBLISHERQOS_HPP_