Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

Hierarchy

Implements

Index

Constructors

constructor

  • Parameters

    Returns DataNode

Properties

children

children: Node[] = new Array<Node>()

Optional parent

parent: Node

position

position: number

type

type: ENodeType

Protected value

value: T

Methods

Protected applyToParent

  • applyToParent(newParent?: Node): void
  • Adds this node to the parent nodes. If newParent is provided, sets this one as parent.

    Parameters

    • Optional newParent: Node

    Returns void

execute

  • Returns the value of this node

    Parameters

    Returns T

executeAsync

  • Parameters

    Returns Promise<any>

executeChildren

  • executeChildren(index: number, scriptEnvironment: ScriptEnvironment, execPath: string): any
  • Parameters

    Returns any

executeChildrenAsync

  • executeChildrenAsync(index: number, scriptEnvironment: ScriptEnvironment, execPath: string): Promise<any>
  • Parameters

    Returns Promise<any>

getDatatype

  • getDatatype(): string
  • Returns string

Protected getFillChars

  • getFillChars(deepness: number, fillWith?: string): string
  • Parameters

    • deepness: number
    • Default value fillWith: string = " "

    Returns string

getValue

  • getValue(): T
  • Returns T

Protected getValueAsString

  • getValueAsString(): string
  • Returns string

isAsyncron

  • isAsyncron(): any
  • Returns true if this node needs to be executed asyncron.
    This usually true, when

    • Minimum of one children requires asyncron execution too
    • The node it self (like the function) requires asyncron execution. Therefore, override this method in derived node.

    Returns any

isExecutable

  • isExecutable(): boolean
  • Returns true, if this node is executing and therefore, can also have children. If false, node is a literal.

    Returns boolean

printValues

  • printValues(deepness?: number): string
  • Parameters

    • Default value deepness: number = 0

    Returns string

Protected removeFromParent

  • removeFromParent(): void
  • Removes this node from the parent node. Deletes the parent-object afterwards.

    Returns void

Protected replaceChild

  • replaceChild(replaceChild: Node, newChild: Node): void
  • Replaces a child-node with a new node.

    Adds the new node as child to this node, only if the child to replace exists. Sets the parent of the new child-node and deletes the parent at the node to replace.

    Parameters

    Returns void

setOrder

  • setOrder(): void
  • Returns void

setParent

  • setParent(newParent: Node): void
  • Sets a new parent. First, removes this node from the parent node and deletes the parent-object. Aftwards applies this node to the new parent and sets the parent-object.

    Parameters

    Returns void

toJSON

  • Returns IDataNode<T>

toString

  • toString(): string
  • Returns string

validate

  • validate(): void
  • Validates the nodes. Throws an ExpressionError (or derived), if validation fails!

    Returns void

Generated using TypeDoc