Natools

Check-in [0a176c90c4]
Login
Overview
Comment:storage_pools: new package for entities related to storage pools
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0a176c90c463e17fd80efea064c171214df90b1a
User & Date: nat on 2014-02-10 19:50:20
Other Links: manifest | tags
Context
2014-02-11
20:57
s_expressions-caches: instantiation of Natools.S_Expressions.Generic_Caches with default storage pool check-in: 2b97af7bf2 user: nat tags: trunk
2014-02-10
19:50
storage_pools: new package for entities related to storage pools check-in: 0a176c90c4 user: nat tags: trunk
2014-02-09
20:52
s_expressions-generic_caches: new package for simnple memory container of S-expression check-in: a23e614377 user: nat tags: trunk
Changes

Added src/natools-storage_pools.ads version [defed94c87].























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
------------------------------------------------------------------------------
-- Copyright (c) 2014, 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         --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR  --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES   --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN    --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF  --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.           --
------------------------------------------------------------------------------

------------------------------------------------------------------------------
-- Natools.Storage_Pools provides stuff related to storage pools. Currently --
-- that means only a dummy access type to reach the default storage pool.   --
------------------------------------------------------------------------------

package Natools.Storage_Pools is
   pragma Preelaborate (Storage_Pools);

   type Access_In_Default_Pool is access Boolean;

end Natools.Storage_Pools;

Modified src/natools-string_slices.ads from [117c1cbe46] to [d5a97a28c2].

16
17
18
19
20
21
22

23
24
25
26
27
28
29

------------------------------------------------------------------------------
-- Natools.String_Slices provide an object that represents a substring of a --
-- shared parent string.                                                    --
------------------------------------------------------------------------------

private with Natools.References;


package Natools.String_Slices is
   pragma Preelaborate (String_Slices);

   -----------------------
   -- String range type --
   -----------------------







>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

------------------------------------------------------------------------------
-- Natools.String_Slices provide an object that represents a substring of a --
-- shared parent string.                                                    --
------------------------------------------------------------------------------

private with Natools.References;
private with Natools.Storage_Pools;

package Natools.String_Slices is
   pragma Preelaborate (String_Slices);

   -----------------------
   -- String range type --
   -----------------------
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
   function Duplicate (S : Slice) return Slice;
      --  Create a new parent string and a slice designating it.
      --  This does not copy parts of S parent string outside of S range.
      --  Semantically equivalent to (To_Slice (To_String (S))).

private

   type Access_In_Default_Pool is access Boolean;
      --  Access type only used to infer default storage pool

   package String_Refs is new References
     (String,
      Access_In_Default_Pool'Storage_Pool,
      Access_In_Default_Pool'Storage_Pool);

   type Slice is tagged record
      Bounds : String_Range := (1, 0);
      Ref : String_Refs.Reference;
   end record;

   Null_Slice : constant Slice := ((1, 0), Ref => <>);

end Natools.String_Slices;







<
<
<


|
|









174
175
176
177
178
179
180



181
182
183
184
185
186
187
188
189
190
191
192
193
   function Duplicate (S : Slice) return Slice;
      --  Create a new parent string and a slice designating it.
      --  This does not copy parts of S parent string outside of S range.
      --  Semantically equivalent to (To_Slice (To_String (S))).

private




   package String_Refs is new References
     (String,
      Storage_Pools.Access_In_Default_Pool'Storage_Pool,
      Storage_Pools.Access_In_Default_Pool'Storage_Pool);

   type Slice is tagged record
      Bounds : String_Range := (1, 0);
      Ref : String_Refs.Reference;
   end record;

   Null_Slice : constant Slice := ((1, 0), Ref => <>);

end Natools.String_Slices;