Class TX3DNodeList

Unit

Declaration

type TX3DNodeList = class(specialize TObjectList<TX3DNode>)

Description

List of TX3DNode.

Source: src/scene/x3d/x3dnodes_x3dnode.inc (line 1203).

Hierarchy

  • TObject
  • TList
  • TObjectList
  • TX3DNodeList

Overview

Methods

Protected procedure Notify( constref Value: TX3DNode; Action: TCollectionNotification); override;
Public function FindName(const Name: string): TX3DNode;
Public function IndexOfName(const Name: string): Integer;
Public procedure AddIfNotExists(const Node: TX3DNode);
Public function Equals(SecondValue: TObject): Boolean; override;
Public procedure Assign(const Source: TX3DNodeList); overload;
Public procedure Assign(const Source: array of TX3DNode); overload;

Properties

Public property AutoRemove: Boolean read FAutoRemove write SetAutoRemove default false;

Description

Methods

Protected procedure Notify( constref Value: TX3DNode; Action: TCollectionNotification); override;

This item has no description.

Source: src/scene/x3d/x3dnodes_x3dnode.inc (line 1209).

Public function FindName(const Name: string): TX3DNode;

Find node by name (TX3DNode.X3DName), Nil if not found.

If called with Name = '', always returns Nil (does not search for node with MyNode.X3DName = '' condition). This follows the meaning of TX3DNode.X3DName: empty means that node has no name, so it should not be found when searching by name, ever.

See also
Returns the node index. This is sometimes more flexible (you can always quickly get actual node knowing the index, by Items[Index], but not the other way around). It is also sometimes less comfortable (often you're not interested in node index).
Find index of a node with given name (TX3DNode.X3DName), -1 if not found.

Source: src/scene/x3d/x3dnodes_x3dnode.inc (line 1225).

Public function IndexOfName(const Name: string): Integer;

Find index of a node with given name (TX3DNode.X3DName), -1 if not found.

Consistently with FindName, always returns -1 when Name = ''.

Source: src/scene/x3d/x3dnodes_x3dnode.inc (line 1230).

Public procedure AddIfNotExists(const Node: TX3DNode);

Add node only if it's not already on the list.

Source: src/scene/x3d/x3dnodes_x3dnode.inc (line 1233).

Public function Equals(SecondValue: TObject): Boolean; override;

Does the SecondValue list has equal length and instances. The instances on the list are compared exactly, i.e. reference must match, not only some node properties.

Source: src/scene/x3d/x3dnodes_x3dnode.inc (line 1238).

Public procedure Assign(const Source: TX3DNodeList); overload;

Assign from Source. Equivalent to Clear and then AddRange(Source).

Source: src/scene/x3d/x3dnodes_x3dnode.inc (line 1241).

Public procedure Assign(const Source: array of TX3DNode); overload;

Assign from Source. Equivalent to Clear and then AddRange(Source).

Source: src/scene/x3d/x3dnodes_x3dnode.inc (line 1244).

Properties

Public property AutoRemove: Boolean read FAutoRemove write SetAutoRemove default false;

If True then destroyed nodes will be automatically removed from this list. This allows you to safely destroy node instances during the lifetime of this list, without worrying that some dangling pointers remain on this list.

You can only change this property when the list is empty. Otherwise we could have a weird situation when some nodes are automatically removed from the list, and some are not, which seems counter-intuitive.

Internally, this is done using TX3DNode.AddDestructionNotification.

Source: src/scene/x3d/x3dnodes_x3dnode.inc (line 1256).


Generated by PasDoc 0.17.0.snapshot.