18.1.1.3.26. PartitionQosPolicy

class PartitionQosPolicy : public eprosima::fastdds::dds::Parameter_t, public eprosima::fastdds::dds::QosPolicy

Set of strings that introduces a logical partition among the topics visible by the Publisher and Subscriber. A DataWriter within a Publisher only communicates with a DataReader in a Subscriber if (in addition to matching the Topic and having compatible QoS) the Publisher and Subscriber have a common partition name string.

The empty string (“”) is considered a valid partition that is matched with other partition names using the same rules of string matching and regular-expression matching used for any other partition name.

Note

Mutable Qos Policy

Public Functions

inline PartitionQosPolicy()

Constructor without parameters.

inline PartitionQosPolicy(uint16_t in_length)

Constructor using Parameter length.

Parameters

in_length – Length of the parameter

inline PartitionQosPolicy(const PartitionQosPolicy &b)

Copy constructor.

Parameters

b – Another PartitionQosPolicy instance

virtual ~PartitionQosPolicy() = default

Destructor.

inline const_iterator begin() const

Getter for the first position of the partition list.

Returns

const_iterator

inline const_iterator end() const

Getter for the end of the partition list.

Returns

const_iterator

inline uint32_t size() const

Getter for the number of partitions.

Returns

uint32_t with the size

inline uint32_t empty() const

Check if the set is empty.

Returns

true if it is empty, false otherwise

inline void set_max_size(uint32_t size)

Setter for the maximum size reserved for partitions (in bytes)

Parameters

size – Size to be set

inline uint32_t max_size() const

Getter for the maximum size (in bytes)

Returns

uint32_t with the maximum size

inline void push_back(const char *name)

Appends a name to the list of partition names.

Parameters

name – Name to append.

inline virtual void clear() override

Clears list of partition names

inline const std::vector<std::string> getNames() const

Returns partition names.

Returns

Vector of partition name strings.

inline void setNames(std::vector<std::string> &nam)

Overrides partition names

Parameters

nam – Vector of partition name strings.

inline const std::vector<std::string> names() const

Returns partition names.

Returns

Vector of partition name strings.

inline void names(std::vector<std::string> &nam)

Overrides partition names

Parameters

nam – Vector of partition name strings.

class const_iterator

Public Functions

inline const_iterator(const fastrtps::rtps::octet *ptr)

Constructor using a pointer.

Parameters

ptr – Pointer to be set