Skip to main content

Module dynamic

Module dynamic 

Source
Expand description

XTypes 1.3 §7.5 DynamicType-API.

Foundation for the XTypes 1.3 type-system completion. The goal is a programmatic, spec-faithful runtime view of XTypes data models (struct/union/enum/sequence/…) that lives independently of the TypeObject wire format — and can be mapped to the wire format via the bridge submodule (spec §7.6).

§Module

  • descriptorTypeDescriptor, MemberDescriptor, TypeKind, ExtensibilityKind, TryConstructKind.
  • type_DynamicType, DynamicTypeMember.
  • builderDynamicTypeBuilder, DynamicTypeBuilderFactory.
  • dataDynamicData + 12 typed accessors + Sequence/Composite
    • Loan-Stub.
  • factoryDynamicDataFactory.
  • bridge — TypeObject ↔ DynamicType.
  • errorDynamicError.

§Implementation scope

  • Try-construct apply logic (DISCARD/USE_DEFAULT/TRIM on a decoder failure) — comes with C4.7. Here only the enum + member field.
  • Full loan refcount with lifetime tracking — the current implementation is an RAII wrapper with an active set.
  • Annotations apply (spec §7.4 builtin annotations) — comes with C4.3.
  • Bitset/bitmask in the bridge path — the TypeObject bridge for these kinds follows with the C4.5 XML schema loader.

Re-exports§

pub use builder::DynamicTypeBuilder;
pub use builder::DynamicTypeBuilderFactory;
pub use builtin_types::NAME_DDS_BYTES;
pub use builtin_types::NAME_DDS_KEYED_BYTES;
pub use builtin_types::NAME_DDS_KEYED_STRING;
pub use builtin_types::NAME_DDS_STRING;
pub use builtin_types::all_builtin_types;
pub use builtin_types::dds_bytes;
pub use builtin_types::dds_keyed_bytes;
pub use builtin_types::dds_keyed_string;
pub use builtin_types::dds_string;
pub use builtin_types::is_builtin_type_name;
pub use data::DataLoan;
pub use data::DynamicData;
pub use data::DynamicValue;
pub use descriptor::ExtensibilityKind;
pub use descriptor::MemberDescriptor;
pub use descriptor::MemberId;
pub use descriptor::TryConstructKind;
pub use descriptor::TypeDescriptor;
pub use descriptor::TypeKind;
pub use error::DynamicError;
pub use factory::DynamicDataFactory;
pub use try_construct::TryConstructOutcome;
pub use try_construct::apply_try_construct;
pub use type_::DynamicType;
pub use type_::DynamicTypeMember;

Modules§

bridge
DynamicType ↔ TypeObject Bridge (XTypes 1.3 §7.6.3 + §7.6.4).
builder
DynamicTypeBuilder + DynamicTypeBuilderFactory (XTypes 1.3 §7.5.4, §7.5.5).
builtin_types
XTypes 1.3 §7.6.5 + Annex E — Built-in Types Set (C4.4).
codec
Reflective XCDR codec: CDR bytes ⟷ DynamicData, driven by a runtime DynamicType.
collection
Collection (sequence/array) DynamicTypes that retain a fully resolved element DynamicType.
data
DynamicData (XTypes 1.3 §7.5.6).
descriptor
TypeDescriptor + MemberDescriptor (XTypes 1.3 §7.5.1, §7.5.2).
error
Error types for DynamicType / DynamicData (Spec §7.5.6 ReturnCode).
factory
DynamicDataFactory (XTypes 1.3 §7.5.7).
try_construct
XTypes 1.3 §7.5.4.1.2 — TryConstruct-Apply (C4.7).
type_
DynamicType + DynamicTypeMember (XTypes 1.3 §7.5.3).