Class CarbonAgentEventNode

CarbonAgentEventNode class represents an event for a CarbonAgentGraph.

The control flow pin-type intentionally uses CarbonLogicData instead of CarbonAgentData as the graph is executing carbon logic control flow nodes to drive GraphVariable setters.

Hierarchy (view full)

Constructors

Properties

controlFlowOutputPin: GraphPin

Accessors

  • get customName(): string
  • The custom name for the node.

    Returns string

    By default, names should be inferred from the GraphNodeReflection data. Only set this field if the name cannot or should not be inferred from reflection data.

  • set customName(value): void
  • Parameters

    • value: string

    Returns void

  • get graph(): ImmutableGraph
  • The owning graph.

    Returns ImmutableGraph

  • set graph(value): void
  • Parameters

    Returns void

  • get id(): UUID
  • The ID.

    Returns UUID

  • get inputPins(): GraphPin[]
  • The input pins.

    Returns GraphPin[]

  • get outputPins(): GraphPin[]
  • The output pins.

    Returns GraphPin[]

  • get userData(): Map<string, any>
  • A map suitable for storing custom user-defined data.

    Returns Map<string, any>

Methods

  • Gets a pin that supports a connection to (or from) the otherPin.

    Parameters

    • otherPin: GraphPin

      The pin to find a compatible pin for.

    Returns GraphPin

    The first pin that matches the connection criteria.

    The orientation of the test depends on the type of the otherPin. The input pin denotes the type that must be supported by the output pin in the form

    	`outputPin isSubclassOf inputPin`
    
  • Gets the value for the specified user data key. If the key does not exist the defaultValue will be returned instead. If no defaultValue is specified, undefined is returned.

    Type Parameters

    • T

    Parameters

    • node: GraphNode
    • key: string

      A key that uniquely identifies the property to be fetched.

    • OptionaldefaultValue: T

      The default value, to be returned in case the property is not defined.

    Returns T

    The user defined property or defaultValue if not defined.

  • Called when the node has been instanced and is about to be added to a graph. This is a good place to initialize the default values for the node pins as it will then not be done during deserialization, which might otherwise discard newly instances values immediately.

    Returns void

  • Sets the user data key to the specified value.

    Type Parameters

    • T

    Parameters

    • key: string

      A key that uniquely identifies the property to be defined.

    • value: T

      The value to set the property to. The value type must support serialization.

    Returns void

  • Virtual

    Ensures that the state of the node is valid.

    Parameters

    Returns GraphValidationStatus

    Implementing classes must call super. The method is typically called after deserialization or major edits to the graph. If validation fails, error information must be added to the validationStatus map.

  • Invokes the callback while prevent events to be dispatched.

    Parameters

    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

Events

onDirty: Event<[EnumValueTyped<GraphNodeDirtyFlags, number>], void>

An event when the node is dirtied.