Class Context

Nested CDT context type.

v3.12.0

Constructors

Properties

items: CdtItems

List of {link cdt.Context} instances.

Methods

  • Lookup list by index offset.

    Parameters

    • index: number

      List index

    Returns Context

    Updated CDT context, so calls can be chained.

    If the index is negative, the resolved index starts backwards from end of list. If an index is out of bounds, a parameter error will be returned. Examples:

    • 0: First item.
    • 4: Fifth item.
    • -1: Last item.
    • -3: Third to last item.
  • Lookup list by base list's index offset.

    Parameters

    • index: number

      List index

    • Optionalorder: lists.order

      Sort order used if a list is created

    • Optionalpad: boolean

      Pads list entries between index and the final list entry with zeros.

    Returns Context

    Updated CDT context, so calls can be chained.

    If the list at index offset is not found, create it with the given sort order at that index offset. If pad is true and the index offset is greater than the bounds of the base list, nil entries will be inserted before the newly created list.

  • Lookup list by rank.

    Parameters

    • rank: number

      List rank

    Returns Context

    Updated CDT context, so calls can be chained.

    Examples:

    • 0 = smallest value
    • N = Nth smallest value
    • -1 = largest value
  • Lookup map by index offset.

    Parameters

    • index: number

      Map index

    Returns Context

    Updated CDT context, so calls can be chained.

    If the index is negative, the resolved index starts backwards from end of list. If an index is out of bounds, a parameter error will be returned. Examples:

    • 0: First item.
    • 4: Fifth item.
    • -1: Last item.
    • -3: Third to last item.
  • Lookup map by base map's key. If the map at key is not found, create it with the given sort order at that key.

    Parameters

    • key: string

      Map key

    • Optionalorder: maps.order

      Sort order used if a map is created

    Returns Context

    Updated CDT context, so calls can be chained.

  • Lookup map by rank.

    Parameters

    • rank: number

      Map rank

    Returns Context

    Updated CDT context, so calls can be chained.

    Examples:

    • 0 = smallest value
    • N = Nth smallest value
    • -1 = largest value
MMNEPVFCICPMFPCPTTAAATR