Capítulo 441 de 859

Chapter 441: OperatorNode

Core Idea

This node represents basic mathematical and logical operations like addition, subtraction or comparisons (e.g. equal()).

Key Concepts

  • aNode : Node: The first input.
  • bNode : Node: The second input.
  • isOperatorNode : boolean (readonly): This flag can be used for type testing.
  • op : string: The operator.

Reference Tables

Constructor

Signature
new OperatorNode( op : string, aNode : Node, bNode : Node, …params : Node )

Properties

PropertyDescription
.aNode : NodeThe first input.
.bNode : NodeThe second input.
.isOperatorNode : boolean (readonly)This flag can be used for type testing.
.op : stringThe operator.

Methods

MethodDescription
.generateNodeType( builder : NodeBuilder, output : string ) : stringThis method is overwritten since the node type is inferred from the operator and the input node types.
.getOperatorMethod( builder : NodeBuilder, output : string ) : stringReturns the operator method name.

Key Takeaways

  1. OperatorNode extends: EventDispatcher → Node → TempNode
  2. Most relevant properties: aNode, bNode, isOperatorNode, op.
  3. Key methods: generateNodeType, getOperatorMethod.

Connects To