Class PartitionQosPolicy

Nested Relationships

Nested Types

Inheritance Relationships

Base Types

Class Documentation

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 RTPS_DllAPI PartitionQosPolicy()

Constructor without parameters.

inline RTPS_DllAPI PartitionQosPolicy(uint16_t in_length)

Constructor using Parameter length.

Parameters

in_length – Length of the parameter

inline RTPS_DllAPI PartitionQosPolicy(const PartitionQosPolicy &b)

Copy constructor.

Parameters

b – Another PartitionQosPolicy instance

virtual RTPS_DllAPI ~PartitionQosPolicy() = default

Destructor.

inline bool operator==(const PartitionQosPolicy &b) const
inline PartitionQosPolicy &operator=(const PartitionQosPolicy &b)
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 RTPS_DllAPI void push_back (const char *name)

Appends a name to the list of partition names.

Parameters

name – Name to append.

inline virtual RTPS_DllAPI void clear () override

Clears list of partition names

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

Returns partition names.

Returns

Vector of partition name strings.

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

Overrides partition names

Parameters

nam – Vector of partition name strings.

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

Returns partition names.

Returns

Vector of partition name strings.

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

Overrides partition names

Parameters

nam – Vector of partition name strings.

class const_iterator

Public Types

typedef const_iterator self_type
typedef const Partition_t value_type
typedef const Partition_t reference
typedef const Partition_t *pointer
typedef size_t difference_type
typedef std::forward_iterator_tag iterator_category

Public Functions

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

Constructor using a pointer.

Parameters

ptr – Pointer to be set

inline self_type operator++()
inline self_type operator++(int)
inline reference operator*()
inline pointer operator->()
inline bool operator==(const self_type &rhs) const
inline bool operator!=(const self_type &rhs) const

Protected Functions

inline void advance()

Shift the pointer to the next element.