Skip to main content

Module xtypes_def

Module xtypes_def 

Source
Expand description

DDS-XML 1.0 §7.3.3 building block “Types” — data model.

Descriptive data model of the XML view of XTypes 1.3 type definitions.

zerodds-xml deliberately keeps a standalone descriptive layer and makes no cross-crate edge to zerodds-types::DynamicType. Higher-level adapters can later translate the structures held here into their DCPS data models.

Spec source: OMG DDS-XML 1.0 §7.3.3 (Types Building Block).

§XML → Rust type mapping

<types>                          | Vec<TypeLibrary> (multiple <types> allowed)
<module name=…>                  | TypeLibrary / TypeDef::Module(ModuleEntry)
<struct name=… extensibility=…   |
        baseType=…>              | TypeDef::Struct(StructType)
<member name=… type=… key=…      |
        optional=… id=…          |
        arrayDimensions=…        |
        sequenceMaxLength=…      |
        stringMaxLength=…>       | StructMember
<enum name=…>                    | TypeDef::Enum(EnumType)
<enumerator name=… value=…>      | EnumLiteral
<union name=… discriminator=…>   | TypeDef::Union(UnionType)
<case><caseDiscriminator/>       |
      <member …/></case>         | UnionCase
<typedef name=… type=… …>        | TypeDef::Typedef(TypedefType)
<bitmask name=… bitBound=…>      | TypeDef::Bitmask(BitmaskType)
<bit_value name=… position=…>    | BitValue
<bitset name=…>                  | TypeDef::Bitset(BitsetType)
<bitfield name=… type=… mask=…>  | BitField

Structs§

BitField
Single <bitfield> element of a bitset.
BitValue
Single <bit_value> entry.
BitmaskType
<bitmask>-Definition (Spec §7.3.3.4.8).
BitsetType
<bitset>-Definition (Spec §7.3.3.4.9).
ConstEntry
<const name="X" type="long" value="42"/>.
EnumLiteral
Single <enumerator> entry.
EnumType
<enum>-Definition (Spec §7.3.3.4.5).
ForwardDeclEntry
<forward_dcl name="T" kind="STRUCT|UNION"/>.
IncludeEntry
<include file="..."/> — XML composition.
ModuleEntry
Nested module (<module name="…"> — Spec §7.3.3.4.1).
StructMember
A single struct member (<member …/> — Spec §7.3.3.4.4.1).
StructType
<struct> definition (Spec §7.3.3.4.4).
TypeLibrary
Container for 1+ type definitions from a <types> block.
TypedefType
<typedef> definition (Spec §7.3.3.4.7).
UnionCase
<case> entry (Spec §7.3.3.4.6.1).
UnionType
<union>-Definition (Spec §7.3.3.4.6).

Enums§

Extensibility
Extensibility-Annotation (@final, @appendable, @mutable) — Spec §7.2.3.5 + §7.3.3.4.4.1.
PrimitiveType
Primitive type symbol per Spec §7.2.1 + §7.3.3.4.4.2.
TypeDef
A single type entry (Spec §7.3.3.4 — struct/enum/union/typedef/ bitmask/bitset or a nested module).
TypeRef
Type reference from a type=… attribute (member, typedef, bitfield mask): either a primitive symbol or a named reference to a user-defined type (MyModule::State).
UnionDiscriminator
Discriminator value of a case.