Natools

Check-in [f17f93813b]
Login
Overview
Comment:constant_indefinite_ordered_maps: add constants for empty maps
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f17f93813b8d112ca5747388897b6799e8ce933b
User & Date: nat on 2015-02-28 14:51:32
Other Links: manifest | tags
Context
2015-03-17
22:06
constant_indefinite_ordered_maps: add constructors that provide mutation semantics check-in: c0a78f48d7 user: nat tags: trunk
2015-02-28
14:51
constant_indefinite_ordered_maps: add constants for empty maps check-in: f17f93813b user: nat tags: trunk
2015-02-17
23:33
s_expressions-printers-pretty: make ancestry of Stream_Parser public check-in: a6a5d38d6f user: nat tags: trunk
Changes

Modified src/natools-constant_indefinite_ordered_maps.ads from [784866a661] to [3be65a27de].

1
2

3
4
5
6
7
8
9
1

2
3
4
5
6
7
8
9

-
+







------------------------------------------------------------------------------
-- Copyright (c) 2014, Natacha Porté                                        --
-- Copyright (c) 2014-2015, Natacha Porté                                   --
--                                                                          --
-- Permission to use, copy, modify, and distribute this software for any    --
-- purpose with or without fee is hereby granted, provided that the above   --
-- copyright notice and this permission notice appear in all copies.        --
--                                                                          --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF         --
218
219
220
221
222
223
224



225
226
227
228
229
230
231
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234







+
+
+








   function Reference
     (Container : aliased in out Updatable_Map;
      Key : in Key_Type)
     return Reference_Type;


   Empty_Constant_Map : constant Constant_Map;
   Empty_Updatable_Map : constant Updatable_Map;

private

   type Key_Access is access Key_Type;
   type Element_Access is access Element_Type;

   type Node is record
      Key :  not null Key_Access;
374
375
376
377
378
379
380


381
382
383
377
378
379
380
381
382
383
384
385
386
387
388







+
+



   overriding function Previous
     (Object   : Range_Iterator;
      Position : Cursor) return Cursor
     with Pre => Position.Is_Empty
        or else Backend_Refs."=" (Position.Backend, Object.Backend);


   Empty_Constant_Map : constant Constant_Map := (Backend => <>);
   Empty_Updatable_Map : constant Updatable_Map := (Backend => <>);
   No_Element : constant Cursor := (Is_Empty => True);

end Natools.Constant_Indefinite_Ordered_Maps;