| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
GenericDataQosPolicy Class Reference

Class GenericDataQosPolicy, base class to transmit user data during the discovery phase. More...

`#include <QosPolicies.hpp>`

Inheritance diagram for GenericDataQosPolicy:
[legend]

## Public Member Functions

FASTDDS_EXPORTED_API | GenericDataQosPolicy (ParameterId_t pid)
FASTDDS_EXPORTED_API | GenericDataQosPolicy (ParameterId_t pid, uint16_t in_length)
FASTDDS_EXPORTED_API | GenericDataQosPolicy (const GenericDataQosPolicy &data)
| Construct from another GenericDataQosPolicy.
FASTDDS_EXPORTED_API | GenericDataQosPolicy (ParameterId_t pid, const collection_type &data)
| Construct from underlying collection type.
virtual FASTDDS_EXPORTED_API | ~GenericDataQosPolicy ()=default
GenericDataQosPolicy & | operator= (const collection_type &b)
| Copies data from underlying collection type.
GenericDataQosPolicy & | operator= (const GenericDataQosPolicy &b)
| Copies another GenericDataQosPolicy.
bool | operator== (const GenericDataQosPolicy &b) const
bool | operator== (const collection_type &b) const
void | set_max_size (size_t size)
| Set the maximum size of the user data and reserves memory for that much.
void | resize (size_t new_size)
const collection_type & | dataVec () const
void | clear () override
| Clears the QosPolicy object.
FASTDDS_EXPORTED_API const collection_type & | data_vec () const
| Returns raw data vector.
FASTDDS_EXPORTED_API collection_type & | data_vec ()
| Returns raw data vector.
FASTDDS_EXPORTED_API void | data_vec (const collection_type &vec)
| Sets raw data vector.
FASTDDS_EXPORTED_API const collection_type & | getValue () const
| Returns raw data vector.
FASTDDS_EXPORTED_API void | setValue (const collection_type &vec)
| Sets raw data vector.
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.
Public Member Functions inherited from ResourceLimitedVector< fastdds::rtps::octet >
| ResourceLimitedVector (configuration_type cfg=configuration_type(), const allocator_type &alloc=allocator_type())
| Construct a ResourceLimitedVector.
| ResourceLimitedVector (const ResourceLimitedVector &other)
virtual | ~ResourceLimitedVector ()=default
ResourceLimitedVector & | operator= (const ResourceLimitedVector &other)
iterator | insert (const_iterator pos, const value_type &value)
| Insert value before pos.
iterator | insert (const_iterator pos, value_type &&value)
| Insert value before pos.
pointer | push_back (const value_type &val)
| Add element at the end.
pointer | push_back (value_type &&val)
| Add element at the end.
pointer | emplace_back (Args &&... args)
| Construct and insert element at the end.
bool | remove (const value_type &val)
| Remove element.
bool | remove_if (UnaryPredicate pred)
| Remove element.
bool | contains (const value_type &val)
| Contains element.
void | assign (InputIterator first, InputIterator last)
| Assign vector content.
void | assign (size_type n, const value_type &val)
| Assign vector content.
void | assign (std::initializer_list< value_type > il)
| Assign vector content.
| operator const collection_type & () const noexcept
| Const cast to underlying collection.
reference | at (size_type pos)
| Wrappers to other basic vector methods.
const_reference | at (size_type pos) const
reference | operator[] (size_type pos)
const_reference | operator[] (size_type pos) const
reference | front ()
const_reference | front () const
reference | back ()
const_reference | back () const
iterator | begin () noexcept
const_iterator | begin () const noexcept
const_iterator | cbegin () const noexcept
iterator | end () noexcept
const_iterator | end () const noexcept
const_iterator | cend () const noexcept
reverse_iterator | rbegin () noexcept
const_reverse_iterator | rbegin () const noexcept
const_reverse_iterator | crbegin () const noexcept
reverse_iterator | rend () noexcept
const_reverse_iterator | rend () const noexcept
const_reverse_iterator | crend () const noexcept
bool | empty () const noexcept
size_type | size () const noexcept
size_type | capacity () const noexcept
size_type | max_size () const noexcept
void | clear ()
iterator | erase (const_iterator pos)
iterator | erase (const_iterator first, const_iterator last)
void | pop_back ()
value_type * | data ()
const value_type * | data () const

## Additional Inherited Members

Public Types inherited from ResourceLimitedVector< fastdds::rtps::octet >
using | configuration_type
using | collection_type
using | value_type
using | allocator_type
using | pointer
using | const_pointer
using | reference
using | const_reference
using | size_type
using | difference_type
using | iterator
using | const_iterator
using | reverse_iterator
using | const_reverse_iterator
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 Member Functions inherited from ResourceLimitedVector< fastdds::rtps::octet >
bool | ensure_capacity ()
| Make room for one item.
std::enable_if<!Enabler::value, void >::type | do_remove (iterator it)
| Remove element.
std::enable_if< Enabler::value, void >::type | do_remove (iterator it)
| Remove element.
Protected Attributes inherited from QosPolicy
bool | send_always_
| Boolean that indicates if the Qos has to be sent even if it is not changed.
Protected Attributes inherited from ResourceLimitedVector< fastdds::rtps::octet >
configuration_type | configuration_
collection_type | collection_

## Detailed Description

Class GenericDataQosPolicy, base class to transmit user data during the discovery phase.

## Constructor & Destructor Documentation

## ◆ GenericDataQosPolicy() [1/4]

FASTDDS_EXPORTED_API GenericDataQosPolicy | ( | ParameterId_t | pid | ) |

inline

## ◆ GenericDataQosPolicy() [2/4]

FASTDDS_EXPORTED_API GenericDataQosPolicy | ( | ParameterId_t | pid,
|  | uint16_t | in_length )

inline

## ◆ GenericDataQosPolicy() [3/4]

FASTDDS_EXPORTED_API GenericDataQosPolicy | ( | const GenericDataQosPolicy & | data | ) |

inline

Construct from another GenericDataQosPolicy.

The resulting GenericDataQosPolicy will have the same size limits as the input attribute

Parameters

  data | data to copy in the newly created object

## ◆ GenericDataQosPolicy() [4/4]

FASTDDS_EXPORTED_API GenericDataQosPolicy | ( | ParameterId_t | pid,
|  | const collection_type & | data )

inline

Construct from underlying collection type.

Useful to easy integration on old APIs where a traditional container was used. The resulting GenericDataQosPolicy will always be unlimited in size

Parameters

  pid | Id of the parameter
  data | data to copy in the newly created object

## ◆ ~GenericDataQosPolicy()

virtual FASTDDS_EXPORTED_API ~GenericDataQosPolicy | ( |  | ) |

virtual default

## Member Function Documentation

## ◆ clear()

void clear | ( |  | ) |

inline override virtual

Clears the QosPolicy object.

Implements QosPolicy.

## ◆ data_vec() [1/3]

FASTDDS_EXPORTED_API collection_type & data_vec | ( |  | ) |

inline

Returns raw data vector.

Returns
  raw data as vector of octets.

## ◆ data_vec() [2/3]

FASTDDS_EXPORTED_API const collection_type & data_vec | ( |  | ) | const

inline

Returns raw data vector.

Returns
  raw data as vector of octets.

## ◆ data_vec() [3/3]

FASTDDS_EXPORTED_API void data_vec | ( | const collection_type & | vec | ) |

inline

Sets raw data vector.

Parameters

  vec | raw data to set.

## ◆ dataVec()

const collection_type & dataVec | ( |  | ) | const

inline

Returns
  const reference to the internal raw data.

## ◆ getValue()

FASTDDS_EXPORTED_API const collection_type & getValue | ( |  | ) | const

inline

Returns raw data vector.

Returns
  raw data as vector of octets.

## ◆ operator=() [1/2]

GenericDataQosPolicy & operator= | ( | const collection_type & | b | ) |

inline

Copies data from underlying collection type.

Useful to easy integration on old APIs where a traditional container was used. The resulting GenericDataQosPolicy will keep the current size limit. If the input data is larger than the current limit size, the elements exceeding that maximum will be silently discarded.

Parameters

  b | object to be copied

Returns
  reference to the current object.

## ◆ operator=() [2/2]

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

inline

Copies another GenericDataQosPolicy.

The resulting GenericDataQosPolicy will have the same size limit as the input parameter, so all data in the input will be copied.

Parameters

  b | object to be copied

Returns
  reference to the current object.

## ◆ operator==() [1/2]

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

inline

## ◆ operator==() [2/2]

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

inline

## ◆ resize()

void resize | ( | size_t | new_size | ) |

inline

## ◆ set_max_size()

void set_max_size | ( | size_t | size | ) |

inline

Set the maximum size of the user data and reserves memory for that much.

Parameters

  size | new maximum size of the user data. Zero for unlimited size

## ◆ setValue()

FASTDDS_EXPORTED_API void setValue | ( | const collection_type & | vec | ) |

inline

Sets raw data vector.

Parameters

  vec | raw data to set.

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

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