| 1 |
{%MainUnit x3dnodes.pas} |
| 2 |
{ |
| 3 |
Copyright 2002-2018 Michalis Kamburelis. |
| 4 |
|
| 5 |
This file is part of "Castle Game Engine". |
| 6 |
|
| 7 |
"Castle Game Engine" is free software; see the file COPYING.txt, |
| 8 |
included in this distribution, for details about the copyright. |
| 9 |
|
| 10 |
"Castle Game Engine" is distributed in the hope that it will be useful, |
| 11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 |
|
| 14 |
---------------------------------------------------------------------------- |
| 15 |
} |
| 16 |
|
| 17 |
{$ifdef read_interface} |
| 18 |
|
| 19 |
TNodeDestructionNotification = procedure (const Node: TX3DNode) of object; |
| 20 |
|
| 21 |
TNodeDestructionNotificationList = class({$ifdef FPC}specialize{$endif} TList<TNodeDestructionNotification>) |
| 22 |
public |
| 23 |
{ Call all functions. } |
| 24 |
procedure ExecuteAll(const Node: TX3DNode); |
| 25 |
end; |
| 26 |
|
| 27 |
{$endif read_interface} |
| 28 |
|
| 29 |
{$ifdef read_implementation} |
| 30 |
|
| 31 |
{ TNodeDestructionNotificationList ------------------------------------------- } |
| 32 |
|
| 33 |
procedure TNodeDestructionNotificationList.ExecuteAll(const Node: TX3DNode); |
| 34 |
var |
| 35 |
I: Integer; |
| 36 |
begin |
| 37 |
for I := 0 to Count - 1 do |
| 38 |
Items[I](Node); |
| 39 |
end; |
| 40 |
|
| 41 |
{$endif read_implementation} |