Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NodeInterface

interface for operate multicast nodes.

Hierarchy

  • NodeInterface

Index

Constructors

constructor

Properties

nodes

nodes: GomlNode[][]

array of node targeted by this interface. this property has two dimantion. nodes[i] is node array in tree at i.

param
returns

[description]

Accessors

count

  • get count(): number

isEmpty

  • get isEmpty(): boolean

Methods

addChildByName

addComponent

append

  • このノードインタフェースが対象とするノードそれぞれに、 タグで指定したノードを子要素として追加します。

    Parameters

    • tag: string

    Returns NodeInterface

broadcastMessage

  • broadcastMessage(range: number, name: string, args?: any): void
  • broadcastMessage(name: string, args?: any): void

children

  • このノードインタフェースが対象とするノードのそれぞれの子ノードを対象とする、 新しいノードインタフェースを取得します。

    Returns NodeInterface

    [description]

filter

find

first

forEach

  • execute provided function once for each element targeted by this interface.

    Parameters

    • callback: function

      Function to execute for each element, taking three arguments: abort the iteration if function returns True.

        • (node: GomlNode, gomlIndex: number, nodeIndex: number, iterationHandler?: undefined | object): void
        • Parameters

          • node: GomlNode
          • gomlIndex: number
          • nodeIndex: number
          • Optional iterationHandler: undefined | object

          Returns void

    Returns NodeInterface

    [description]

get

  • Get node by index. Calling with an argument omitted, the function returns first node. and throw error if this interface is empty.

    Calling with one argument, it is treated as index of node. this function returns the node at index across all tree. throw error if index out of range.

    Calling with two arguments, they are treated as index of tree and node. this function returns the node at node-index in a tree at tree-index. throw error if index out of range.

    Returns GomlNode

    [description]

  • Parameters

    • nodeIndex: number

    Returns GomlNode

  • Parameters

    • treeIndex: number
    • nodeIndex: number

    Returns GomlNode

getAttribute

  • getAttribute(attrName: Name): any

map

  • map<T>(func: function): T[][]
  • Type parameters

    • T

    Parameters

    • func: function
        • (node: GomlNode, gomlIndex: number, nodeIndex: number): T
        • Parameters

          • node: GomlNode
          • gomlIndex: number
          • nodeIndex: number

          Returns T

    Returns T[][]

off

  • off(eventName: string, listener: ListenerFunction): NodeInterface
  • 対象ノードに指定したイベントリスナが登録されていれば削除します

    Parameters

    • eventName: string
    • listener: ListenerFunction

    Returns NodeInterface

on

  • on(eventName: string, listener: ListenerFunction): NodeInterface

remove

sendMessage

  • sendMessage(message: string, args?: any): void

setAttribute

  • setAttribute(attrName: Name, value: any): void

setEnable

single

  • 対象となる唯一のノードを取得する。 対象が存在しない、あるいは複数存在するときは例外を投げる。

    Returns GomlNode

    [description]

toArray

watch

  • watch(attrName: Name, watcher: function, immediate?: boolean): void
  • Parameters

    • attrName: Name
    • watcher: function
        • (newValue: any, oldValue: any, attr: Attribute): void
        • Parameters

          • newValue: any
          • oldValue: any
          • attr: Attribute

          Returns void

    • Default value immediate: boolean = false

    Returns void

Generated using TypeDoc