--:::::::::: --lipolpit.adb --:::::::::: package body List_Pos_LPBase.Iterators is procedure Current_To_Rear (List : in out LPList_Type; Process : in Process_Type; Orig_Current: in boolean := true) is Continue: boolean := true; procedure Rec_Rear (Pntr: in out List_Ptr) is begin -- Rec_Rear Process (Pntr.Object, Continue); if not Orig_Current then List.Current := Pntr; end if; if Continue and (Pntr /= List.Actual.Last) then Rec_Rear (Pntr.Next); end if; end Rec_Rear; --------------------------------------------------- begin -- Current_To_Rear if List.Current /= null then Rec_Rear (List.Current); end if; end Current_To_Rear; ------------------------------------------------------ procedure Current_To_Front (List : in out LPList_Type; Process : in Process_Type; Orig_Current: in boolean := true) is Continue: boolean := true; procedure Rec_Front (Pntr: in out List_Ptr) is begin -- Rec_Front Process (Pntr.Object, Continue); if not Orig_Current then List.Current := Pntr; end if; if Continue and (Pntr /= List.Actual.First) then Rec_Front (Pntr.Previous); end if; end Rec_Front; --------------------------------------------------- begin -- Current_To_Front if List.Current /= null then Rec_Front (List.Current); end if; end Current_To_Front; ------------------------------------------------------ procedure Front_To_Rear (List : in out LPList_Type; Process : in Process_Type; Orig_Current: in boolean := true) is Continue: boolean := true; procedure Rec_Rear (Pntr: in out List_Ptr) is begin -- Rec_Rear Process (Pntr.Object, Continue); if not Orig_Current then List.Current := Pntr; end if; if Continue and (Pntr /= List.Actual.Last) then Rec_Rear (Pntr.Next); end if; end Rec_Rear; --------------------------------------------------- begin -- Front_To_Rear if List.Actual.First /= null then Rec_Rear (List.Actual.First); end if; end Front_To_Rear; ------------------------------------------------------ procedure Rear_To_Front (List : in out LPList_Type; Process : in Process_Type; Orig_Current: in boolean := true) is Continue: boolean := true; procedure Rec_Front (Pntr: in out List_Ptr) is begin -- Rec_Front Process (Pntr.Object, Continue); if not Orig_Current then List.Current := Pntr; end if; if Continue and (Pntr /= List.Actual.First) then Rec_Front (Pntr.Previous); end if; end Rec_Front; --------------------------------------------------- begin -- Rear_To_Front if List.Actual.Last /= null then Rec_Front (List.Actual.Last); end if; end Rear_To_Front; ------------------------------------------------------ end List_Pos_LPBase.Iterators;