| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
TypeConsistencyEnforcementQosPolicy Class Reference

The TypeConsistencyEnforcementQosPolicy defines the rules for determining whether the type used to publish a given data stream is consistent with that used to subscribe to it. More...

`#include <QosPolicies.hpp>`

Inheritance diagram for TypeConsistencyEnforcementQosPolicy:
[legend]

## Public Member Functions

FASTDDS_EXPORTED_API | TypeConsistencyEnforcementQosPolicy ()
| Constructor.
virtual FASTDDS_EXPORTED_API | ~TypeConsistencyEnforcementQosPolicy () override=default
| Destructor.
bool | operator== (const TypeConsistencyEnforcementQosPolicy &b) const
void | clear () override
| Clears the QosPolicy object.
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 Attributes

TypeConsistencyKind | m_kind
| TypeConsistencyKind. By default, ALLOW_TYPE_COERCION.
bool | m_ignore_sequence_bounds
| This option controls whether sequence bounds are taken into consideration for type assignability.
bool | m_ignore_string_bounds
| This option controls whether string bounds are taken into consideration for type assignability.
bool | m_ignore_member_names
| This option controls whether member names are taken into consideration for type assignability.
bool | m_prevent_type_widening
| This option controls whether type widening is allowed.
bool | m_force_type_validation
| This option requires type information to be available in order to complete matching between a DataWriter and DataReader when set to TRUE, otherwise matching can occur without complete type information when set to FALSE.
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.

## Additional Inherited Members

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

The TypeConsistencyEnforcementQosPolicy defines the rules for determining whether the type used to publish a given data stream is consistent with that used to subscribe to it.

It applies to DataReaders.

Note
  Immutable Qos Policy

## Constructor & Destructor Documentation

## ◆ TypeConsistencyEnforcementQosPolicy()

FASTDDS_EXPORTED_API TypeConsistencyEnforcementQosPolicy | ( |  | ) |

inline

Constructor.

## ◆ ~TypeConsistencyEnforcementQosPolicy()

virtual FASTDDS_EXPORTED_API ~TypeConsistencyEnforcementQosPolicy | ( |  | ) |

override virtual default

Destructor.

## Member Function Documentation

## ◆ clear()

void clear | ( |  | ) |

inline override virtual

Clears the QosPolicy object.

Implements QosPolicy.

## ◆ operator==()

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

inline

## Member Data Documentation

## ◆ m_force_type_validation

bool m_force_type_validation

This option requires type information to be available in order to complete matching between a DataWriter and DataReader when set to TRUE, otherwise matching can occur without complete type information when set to FALSE.

By default, false.

## ◆ m_ignore_member_names

bool m_ignore_member_names

This option controls whether member names are taken into consideration for type assignability.

If the option is set to TRUE, member names are considered as part of assignability in addition to member IDs (so that members with the same ID also have the same name). If the option is set to FALSE, then member names are not ignored.
By default, false.

## ◆ m_ignore_sequence_bounds

bool m_ignore_sequence_bounds

This option controls whether sequence bounds are taken into consideration for type assignability.

If the option is set to TRUE, sequence bounds (maximum lengths) are not considered as part of the type assignability. This means that a T2 sequence type with maximum length L2 would be assignable to a T1 sequence type with maximum length L1, even if L2 is greater than L1. If the option is set to false, then sequence bounds are taken into consideration for type assignability and in order for T1 to be assignable from T2 it is required that L1>= L2.
By default, true.

## ◆ m_ignore_string_bounds

bool m_ignore_string_bounds

This option controls whether string bounds are taken into consideration for type assignability.

If the option is set to TRUE, string bounds (maximum lengths) are not considered as part of the type assignability. This means that a T2 string type with maximum length L2 would be assignable to a T1 string type with maximum length L1, even if L2 is greater than L1. If the option is set to false, then string bounds are taken into consideration for type assignability and in order for T1 to be assignable from T2 it is required that L1>= L2.
By default, true.

## ◆ m_kind

TypeConsistencyKind m_kind

TypeConsistencyKind.
By default, ALLOW_TYPE_COERCION.

## ◆ m_prevent_type_widening

bool m_prevent_type_widening

This option controls whether type widening is allowed.

If the option is set to FALSE, type widening is permitted. If the option is set to TRUE,it shall cause a wider type to not be assignable to a narrower type.
By default, false.

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

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