17.1.1.3.23. PartitionQosPolicy

class eprosima::fastdds::dds::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

PartitionQosPolicy()

Constructor without parameters.

PartitionQosPolicy(uint16_t in_length)

Constructor using Parameter length.

Parameters
  • in_length: Length of the parameter

PartitionQosPolicy(const PartitionQosPolicy &b)

Copy constructor.

Parameters

~PartitionQosPolicy() = default

Destructor.

const_iterator begin() const

Getter for the first position of the partition list.

Return

const_iterator

const_iterator end() const

Getter for the end of the partition list.

Return

const_iterator

uint32_t size() const

Getter for the number of partitions.

Return

uint32_t with the size

uint32_t empty() const

Check if the set is empty.

Return

true if it is empty, false otherwise

void set_max_size(uint32_t size)

Setter for the maximum size.

Parameters
  • size: Size to be set

uint32_t max_size() const

Getter for the maximum size.

Return

uint32_t with the maximum size

void push_back(const char *name)

Appends a name to the list of partition names.

Parameters
  • name: Name to append.

void clear() override

Clears list of partition names

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

Returns partition names.

Return

Vector of partition name strings.

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

Overrides partition names

Parameters
  • nam: Vector of partition name strings.

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

Returns partition names.

Return

Vector of partition name strings.

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

Overrides partition names

Parameters
  • nam: Vector of partition name strings.

class const_iterator

Public Functions

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

Constructor using a pointer.

Parameters
  • ptr: Pointer to be set