--:::::::::: --lilpbite.adb --:::::::::: package body List_LPBase.Iterators is procedure Null_Proc (Object : in out Object_Type; Continue: in out boolean) is begin -- Null_Proc null; end Null_Proc; ------------------------------------------------ procedure Front_To_Rear (List : in LPList_Type; Process: Process_Type) is begin -- Front_To_Rear Round_Trip (List, Process, Null_Proc'Access); end Front_To_Rear; ------------------------------------------------ procedure Rear_To_Front (List : in LPList_Type; Process: Process_Type) is begin -- Rear_To_Front Round_Trip (List, Null_Proc'Access, Process); end Rear_To_Front; ------------------------------------------------ procedure Round_Trip (List : in LPList_Type; Down_Proc, Up_Proc : Process_Type) is Continue: boolean := true; procedure Rec_Iter (Point : in List_Ptr) is begin -- Rec_Iter if Point /= null then Down_Proc (Point.Object, Continue); if Continue then Rec_Iter (Point.Next); if Continue then Up_Proc (Point.Object, Continue); end if; end if; end if; end Rec_Iter; --------------------------------------------- begin -- Round_Trip Rec_Iter (List.all); end Round_Trip; ------------------------------------------------ end List_LPBase.Iterators;