Skip to main content

Module tables

Module tables 

Source
Expand description

The word-table view-model every host table mirror renders: per-table metadata (inheritance, EventSet word), per-field host specs (kind, Option encoding, wide value word, explicit bit, resource kind), and the named value sets, all validated once so every host constructor accepts them.

Modules§

kind
FieldKind as spelled by each host runtime’s enum.
opt
OptEncoding as spelled by each host runtime’s enum.

Structs§

EventEnumModel
0-based event discriminants and listener bitmasks derived from TableDesc::events (EventEnum::EVENT_SET), where every (name, bit) has bit == 1 << id.
FieldModel
One field as every host FieldSpec spells it.
TableModel
One word table, validated once so every host constructor accepts its field specs.

Functions§

merge_shared_value_sets
Merges core table value sets with registered cross-module shared value sets, allowing exact identical definitions during transitions and rejecting conflicting definitions or C constant collisions.
tables_model
Validates tables (unique names, keys that match their names, fields every host reader accepts) and wraps them for rendering, in the given order.
validate_shared_value_sets
Validates and deduplicates standalone shared value sets (such as nativeview-media-fit’s ImageFit and ImageSampling), rejecting empty/invalid names, duplicate constant spellings, or conflicting redefinitions.
value_sets
Distinct named value sets (WordEnum variants, flag bits, EventSet listener bits) the tables carry, in first-use order. Sets sharing a name must be identical; names must spell identifiers, every emitted NV_<SET>_<VALUE> constant must be unique across all sets and clear of the NV_TABLE_* namespace, and every value must fit its field once encoded.
value_sets_with_core
Like value_sets, validating tables against already-emitted shared_sets (core NvTables value sets plus any registered cross-module shared value sets, e.g. nativeview-media-fit).