Class: UnionLayoutDiscriminator

Layout~UnionLayoutDiscriminator(layout, propertyopt)

An object that can provide a discriminator API for Union using an unsigned integral Layout instance located either inside or outside the union.

Constructor

new UnionLayoutDiscriminator(layout, propertyopt)

Parameters:
Name Type Attributes Description
layout module:Layout~ExternalLayout

initializes layout. Must satisfy isCount().

property string <optional>

Default for property, superseding the property from layout, but defaulting to variant if neither property nor layout provide a property name.

Source:

Extends

Members

layout

The ExternalLayout used to access the discriminator value.

Source:

property

The property to be used when the discriminator is referenced in isolation (generally when Union decode cannot delegate to a specific variant).

Inherited From:
Source:

Methods

decode()

Delegate decoding to layout.

Overrides:
Source:

encode()

Delegate encoding to layout.

Overrides:
Source: