pub struct ComposeOptions {
pub default_extensibility: Option<Extensibility>,
pub hashed_id_advances_the_counter: HashedIdCounter,
pub hashed_name_spelling: HashedNameSpelling,
pub key_on_union_discriminator: KeyOnUnionDiscriminator,
pub include_paths: Vec<PathBuf>,
pub zero_bound_is_unbounded: bool,
}Expand description
What the caller decides that the document does not.
The three fields are the three zerodds_idl_compose::ComposeOptions
carries that a type document can be affected by. defines has no
counterpart: DDS-XML has no preprocessor.
Fields§
§default_extensibility: Option<Extensibility>What an aggregate of unspecified extensibility is taken to be.
None leaves the facet absent, so “the document said appendable”
stays distinguishable from “the document said nothing” and
Ast::effective_extensibility applies XTypes 1.3 §7.3.1.2.1.8’s
default. What the document did say still wins.
hashed_id_advances_the_counter: HashedIdCounterWhether a hashed member id advances the sequential id counter.
The same dialect axis zerodds-idl-compose carries, and here for
the same reason: a type declared once in IDL and once in XML has
to reach the same member ids, and it cannot if the two load paths
answer this differently.
hashed_name_spelling: HashedNameSpellingWhich spelling of an escaped name a member-id hash reads.
Carried for parity with the IDL path. DDS-XML has no escape
underscore — a <member name="long"> writes the name as it is —
so no document reaches the axis today.
key_on_union_discriminator: KeyOnUnionDiscriminatorWhether key="true" on a <discriminator> is carried.
The same axis the IDL path carries for @key in that position,
and here for the reason the two above are here: one declaration
written twice has to reach one model. DDS-XML documents are the
only ones that reach it today — the OMG dds-xtypes suite’s
types/xml/unions_key_discriminator.xml is the case.
include_paths: Vec<PathBuf>Directories searched for the files an <include> names, after the
directory of the document that includes them.
DDS-XTypes 1.3 §7.5.2.2.13: “A collection of URLs to directories to be searched for additional type description documents that may be included, directly or indirectly […] The directory in which the target of document_url resides shall be considered on the inclusion search path implicitly”.
zero_bound_is_unbounded: boolWhether a collection bound of 0 means “unbounded”.
DDS-XTypes 1.3 §7.3.2.4: “The literal expression “-1” shall
indicate an unbounded collection; no other “negative” value is
permitted.“ Zero is not negative, but it is no bound either:
IDL 4.2 §7.4.1.4.4.3.1 takes a <positive_int_const> for the bound
of a sequence, a string and a map, so a bound of 0 is refused. The
OMG dds-xtypes suite writes sequenceMaxLength="0" and comments
it “unlimited (0 or -1)”; a caller that loads the suite sets this.