child iterator

This commit is contained in:
unknown 2019-09-10 20:31:41 -04:00
parent fd835a4d87
commit d9c05ba321

View File

@ -1,7 +1,9 @@
export class Sum export class Sum
{ {
ColumnIndex: number; ColumnIndex: number;
Original: number; Original: number;
Adjustment: number;
FromParents: number; FromParents: number;
FromChildren: number; FromChildren: number;
FromOutside: number; FromOutside: number;
@ -72,6 +74,14 @@ export class Table
this.Parent.ItrParents(inFunction); this.Parent.ItrParents(inFunction);
} }
} }
ItrChildren(inFunction: Function)
{
this.Children.forEach( (inChild: Table) =>
{
inFunction(inChild);
inChild.ItrChildren(inFunction);
});
}
ItrLeaves(inFunction:Function) ItrLeaves(inFunction:Function)
{ {
if(this.Children.length == 0) if(this.Children.length == 0)