Overview
TNode<T> is a generic tree structure for organizing hierarchical data. Each node can have any number of child nodes.
Location: BI.Tree.pas:104
Type Declaration
Properties
Data
Item[]
Parent
Index
Level
Methods
Add
Count
Empty
Clear
Delete
ForEach
Usage Examples
Basic Tree
File System Tree
Organization Chart
Menu Tree
Tree Traversal
Accessing Nodes
Detaching Nodes
Type Aliases
For convenience, create type aliases:Memory Management
- Destroying a node destroys all its children recursively
- Detaching a node (Parent := nil) does NOT destroy it
- Use Clear to remove children without destroying parent
- Delete removes and destroys specific children
