Class: UnionDiscriminator

(abstract) Layout~UnionDiscriminator(propertyopt)

An object that can provide a discriminator API for Union.

NOTE This is an abstract base class; you can create instances if it amuses you, but they won't support the encode or decode functions.

Constructor

(abstract) new UnionDiscriminator(propertyopt)

Parameters:
Name Type Attributes Description
property string <optional>

Default for property.

Source:

Members

property

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

Source:

Methods

decode()

Analog to Layout decode for union discriminators.

The implementation of this method need not reference the buffer if variant information is available through other means.

Source:

encode()

Analog to Layout encode for union discriminators.

The implementation of this method need not store the value if variant information is maintained through other means.

Source: