API reference
Preparing search index…

PropertySpecification

Own an Rml::PropertySpecification with local property and shorthand ids.

Registered definitions retain native storage until shutdown, including when this JS wrapper is collected. Shutdown invalidates specifications and their definitions. Returned id arrays and shorthand structures are snapshots.

Source & inheritance
Member directory12

Constructors

Methods

Constructors

Methods

  • Parse either Rml::PropertySpecification::ParsePropertyDeclaration overload.

    Parameters

    dictionary

    Native output dictionary.

    nameOrId
    string | PropertyId

    Property/shorthand/custom variable name, or property id.

    value
    string

    Raw declaration value.

    Returns

    boolean

    Native success; partial native writes remain on failure.

    Source & inheritance
  • Rml::PropertySpecification::PropertiesToString in ascending property order.

    Parameters

    dictionary

    Dictionary whose plain properties are serialized.

    includeName
    boolean

    Include property names before values.

    delimiter
    string

    One UTF-8 byte, matching the native char parameter.

    Returns

    string

    Native text without a trailing delimiter.

    TypeError if a serialized property contains a native pointer.

    Source & inheritance
  • Register a property and its default, inheritance and layout behavior in this specification.

    Parameters

    name
    string

    Property name; empty and "invalid" are reserved.

    defaultValue
    string

    Unparsed default value.

    inherited
    boolean

    Whether the property inherits.

    forcesLayout
    boolean

    Whether changes dirty layout.

    id
    PropertyId = PropertyId.Invalid

    Explicit local id, or Invalid for the next id; default Invalid.

    Returns

    Mutable definition, preserving an existing same-name definition.

    RangeError for id collisions or capacity exhaustion.

    Source & inheritance
  • Register a shorthand and its component properties in this local specification.

    Parameters

    name
    string

    Shorthand name.

    properties
    string

    Comma-separated component names, with native ?/# flags.

    type

    Native shorthand parsing strategy.

    id
    ShorthandId = ShorthandId.Invalid

    Explicit local id, or Invalid to allocate; default Invalid.

    Returns

    Registered id, or Invalid for missing components or duplicates.

    Invalid declarations do not reserve names or ids. Box requires four properties and Flex three; malformed counts, id collisions and exhausted capacity throw RangeError before native registration.

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0