Struct astutedds::xtypes::TypeConsistencyOptions

ClassList > astutedds > xtypes > TypeConsistencyOptions

More...

  • #include <type_object.hpp>

Public Attributes

Type Name
bool allow_type_widening = {false}
bool ignore_sequence_bounds = {false}
bool ignore_string_bounds = {false}

Detailed Description

Options controlling "lenient" type coercion during assignability checks, mirroring the fields of dcps::TypeConsistencyEnforcementQosPolicy (DDS-XTypes 1.3 Section 7.6.3.4) without this layer depending on the dcps module. Callers at the DCPS layer translate their QoS policy into this struct before calling the options-taking overloads below.

All fields default to the strict / exact-match behaviour, matching the spec's DISALLOW_TYPE_COERCION semantics and closing the cross-vendor interop deviation where AstuteDDS previously always widened primitives (e.g. int32 -> int64) regardless of any policy. Pass an explicit instance with the relevant flag(s) set to opt into ALLOW_TYPE_COERCION-style leniency.

Public Attributes Documentation

variable allow_type_widening

bool astutedds::xtypes::TypeConsistencyOptions::allow_type_widening;

Permit integer/float widening and CHAR8<->UINT8 aliasing in is_primitive_assignable(). Off by default: primitive kinds must match exactly. Mirrors "not prevent_type_widening" under ALLOW_TYPE_COERCION.


variable ignore_sequence_bounds

bool astutedds::xtypes::TypeConsistencyOptions::ignore_sequence_bounds;

When true, sequence/map bounds are not considered for assignability (any bound is accepted in either direction). Off by default: the target's bound must be >= the source's (or the target unbounded). Mirrors TypeConsistencyEnforcementQosPolicy::ignore_sequence_bounds.


variable ignore_string_bounds

bool astutedds::xtypes::TypeConsistencyOptions::ignore_string_bounds;

Same as ignore_sequence_bounds, applied to string bounds. Mirrors TypeConsistencyEnforcementQosPolicy::ignore_string_bounds.



The documentation for this class was generated from the following file include/astutedds/xtypes/type_object.hpp