| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
PartitionQosPolicy Class Reference

Set of strings that introduces a logical partition among the topics visible by the Publisher and Subscriber. More...

`#include <QosPolicies.hpp>`

Inheritance diagram for PartitionQosPolicy:
[legend]

## Classes

class | const_iterator

## Public Member Functions

FASTDDS_EXPORTED_API | PartitionQosPolicy ()
| Constructor without parameters.
FASTDDS_EXPORTED_API | PartitionQosPolicy (uint16_t in_length)
| Constructor using Parameter length.
FASTDDS_EXPORTED_API | PartitionQosPolicy (const PartitionQosPolicy &b)
| Copy constructor.
virtual FASTDDS_EXPORTED_API | ~PartitionQosPolicy ()=default
| Destructor.
bool | operator== (const PartitionQosPolicy &b) const
PartitionQosPolicy & | operator= (const PartitionQosPolicy &b)
const_iterator | begin () const
| Getter for the first position of the partition list.
const_iterator | end () const
| Getter for the end of the partition list.
uint32_t | size () const
| Getter for the number of partitions.
uint32_t | empty () const
| Check if the set is empty.
void | set_max_size (uint32_t size)
| Setter for the maximum size reserved for partitions (in bytes).
uint32_t | max_size () const
| Getter for the maximum size (in bytes).
FASTDDS_EXPORTED_API void | push_back (const char *name)
| Appends a name to the list of partition names.
FASTDDS_EXPORTED_API void | clear () override
| Clears list of partition names.
FASTDDS_EXPORTED_API const std::vector< std::string > | getNames () const
| Returns partition names.
FASTDDS_EXPORTED_API void | setNames (std::vector< std::string > &nam)
| Overrides partition names.
FASTDDS_EXPORTED_API const std::vector< std::string > | names () const
| Returns partition names.
FASTDDS_EXPORTED_API void | names (std::vector< std::string > &nam)
| Overrides partition names.
Public Member Functions inherited from Parameter_t
FASTDDS_EXPORTED_API | Parameter_t ()
| Constructor without parameters.
FASTDDS_EXPORTED_API | Parameter_t (ParameterId_t pid, uint16_t length)
| Constructor using a parameter PID and the parameter length.
virtual FASTDDS_EXPORTED_API | ~Parameter_t ()
| Destructor.
bool | operator== (const Parameter_t &b) const
Public Member Functions inherited from QosPolicy
| QosPolicy ()
| Constructor without parameters.
| QosPolicy (bool send_always)
| Constructor.
| QosPolicy (const QosPolicy &b)=default
| Copy Constructor.
virtual | ~QosPolicy ()=default
| Destructor.
bool | operator== (const QosPolicy &b) const
QosPolicy & | operator= (const QosPolicy &b)=default
virtual bool | send_always () const
| Whether it should always be sent.

## Additional Inherited Members

Public Attributes inherited from Parameter_t
ParameterId_t | Pid
| Parameter ID. By default, PID_PAD.
uint16_t | length
| Parameter length. By default, 0.
Public Attributes inherited from QosPolicy
bool | hasChanged
| Boolean that indicates if the Qos has been changed with respect to the default Qos.
Protected Attributes inherited from QosPolicy
bool | send_always_
| Boolean that indicates if the Qos has to be sent even if it is not changed.

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ PartitionQosPolicy() [1/3]

FASTDDS_EXPORTED_API PartitionQosPolicy | ( |  | ) |

inline

Constructor without parameters.

## ◆ PartitionQosPolicy() [2/3]

FASTDDS_EXPORTED_API PartitionQosPolicy | ( | uint16_t | in_length | ) |

inline

Constructor using Parameter length.

Parameters

  in_length | Length of the parameter

## ◆ PartitionQosPolicy() [3/3]

FASTDDS_EXPORTED_API PartitionQosPolicy | ( | const PartitionQosPolicy & | b | ) |

inline

Copy constructor.

Parameters

  b | Another PartitionQosPolicy instance

## ◆ ~PartitionQosPolicy()

virtual FASTDDS_EXPORTED_API ~PartitionQosPolicy | ( |  | ) |

virtual default

Destructor.

## Member Function Documentation

## ◆ begin()

const_iterator begin | ( |  | ) | const

inline

Getter for the first position of the partition list.

Returns
  const_iterator

## ◆ clear()

FASTDDS_EXPORTED_API void clear | ( |  | ) |

inline override virtual

Clears list of partition names.

Implements QosPolicy.

## ◆ empty()

uint32_t empty | ( |  | ) | const

inline

Check if the set is empty.

Returns
  true if it is empty, false otherwise

## ◆ end()

const_iterator end | ( |  | ) | const

inline

Getter for the end of the partition list.

Returns
  const_iterator

## ◆ getNames()

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

inline

Returns partition names.

Returns
  Vector of partition name strings.

## ◆ max_size()

uint32_t max_size | ( |  | ) | const

inline

Getter for the maximum size (in bytes).

Returns
  uint32_t with the maximum size

## ◆ names() [1/2]

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

inline

Returns partition names.

Returns
  Vector of partition name strings.

## ◆ names() [2/2]

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

inline

Overrides partition names.

Parameters

  nam | Vector of partition name strings.

## ◆ operator=()

PartitionQosPolicy & operator= | ( | const PartitionQosPolicy & | b | ) |

inline

## ◆ operator==()

bool operator== | ( | const PartitionQosPolicy & | b | ) | const

inline

## ◆ push_back()

FASTDDS_EXPORTED_API void push_back | ( | const char * | name | ) |

inline

Appends a name to the list of partition names.

Parameters

  name | Name to append.

## ◆ set_max_size()

void set_max_size | ( | uint32_t | size | ) |

inline

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

Parameters

  size | Size to be set

## ◆ setNames()

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

inline

Overrides partition names.

Parameters

  nam | Vector of partition name strings.

## ◆ size()

uint32_t size | ( |  | ) | const

inline

Getter for the number of partitions.

Returns
  uint32_t with the size

The documentation for this class was generated from the following file:

- include/fastdds/dds/core/policy/QosPolicies.hpp