Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /charles/src/ai302/

charles
Discussion topic

Back to topic list

CVS update: /charles/src/ai302/

Reply

Author matthewjheaney
Full name Matthew Heaney
Date 2004-03-17 21:53:38 PST
Message User: matthewjheaney
Date: 04/03/17 21:53:38

Modified:
 /charles/src/ai302/
  ai302-containers-dou​bly_linked_lists.ads​

Log:
 got rid of internal sentinel node: unfinished

File Changes:

Directory: /charles/src/ai302/
==============================

File [changed]: ai302-containers-dou​bly_linked_lists.ads​
Url: http://charles.tigri​s.org/source/browse/​charles/src/ai302/ai​302-containers-doubl​y_linked_lists.ads?r​1=1.4&r2=1.5
Delta lines: +11 -27
---------------------
--- ai302-containers-dou​bly_linked_lists.ads​ 18 Mar 2004 00:50:12 -0000 1.4
+++ ai302-containers-dou​bly_linked_lists.ads​ 18 Mar 2004 05:53:35 -0000 1.5
@@ -66,11 +66,6 @@
       Source : in List);
    --NOTE: in proposal?
 
---NOTE: don't need this; use splice
--- procedure Move
--- (Target : in out List;
--- Source : in out List);
-
    function "=" (Left, Right : List) return Boolean;
 
    function Length (Container : List) return Natural;
@@ -130,12 +125,12 @@
      (Container : in out List;
       Source : in out List);
 
- procedure Reverse_Container (Container : in List);
+ procedure Reverse_Container (Container : in out List); --inout?
 
    generic
       with function "<" (Left, Right : Element_Type)
          return Boolean is <>;
- procedure Generic_Sort (Container : in List);
+ procedure Generic_Sort (Container : in out List); --inout?
 
    procedure Splice
      (Container : in out List;
@@ -207,14 +202,8 @@
 
    procedure Previous (Position : in out Cursor);
 
- function Exists (Position : Cursor) return Boolean;
- --NOTE: good name? Done? Is_Done? More? End_Of_List?
- --End_Of_Container? Is_Null?
- --NOTE: pass List parameter here, or embed list ptr
- --in representation of cursor object?
- --I wish the type were named List_Type, then I could
- --name this End_Of_List, which would be consistent
- --with End_Of_File (and name File_Type).
+ function Is_Null (Position : Cursor) return Boolean;
+ --NOTE: call this Exists?
 
    generic
       with procedure Process (Position : in Cursor) is <>;
@@ -239,28 +228,23 @@
    function "=" (L, R : Node_Type) return Boolean is abstract;
 
 
- function New_Back return Node_Access;
-
    use Ada.Finalization;
 
    type List is
       new Controlled with record
- Back : Node_Access := New_Back;
+ First : Node_Access;
+ Last : Node_Access;
          Length : Natural := 0;
       end record;
 
    procedure Adjust (Container : in out List);
 
- procedure Finalize (Container : in out List);
+ procedure Finalize (Container : in out List) renames Clear;
 
 
- type Cursor is
- record
- Node : Node_Access;
- Back : Node_Access;
- end record;
+ type Cursor is new Node_Access;
 
- Null_Cursor : constant Cursor := (Node => null, Back => null);
+ Null_Cursor : constant Cursor := null;
 
 
 end AI302.Containers.Dou​bly_Linked_Lists;




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@char​les.tigris.org
For additional commands, e-mail: cvs-help at charles dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /charles/src/ai302/ matthewjheaney Matthew Heaney 2004-03-17 21:53:38 PST
Messages per page: