Natools

Diff
Login

Differences From Artifact [7705bae62c]:

To Artifact [8b05d08348]:


19
20
21
22
23
24
25

26
27
28
29
30
31
32
33
34



35
36
37
38
39
40
41
19
20
21
22
23
24
25
26
27
28
29
30



31

32
33
34
35
36
37
38
39
40
41







+




-
-
-

-
+
+
+







-- to be used as an input buffer, accumulating data and extracting it as a  --
-- single Atom object.                                                      --
-- It also provides an individual Octet accessor, used in parser internal   --
-- recursive buffer.                                                        --
------------------------------------------------------------------------------

with Natools.References;
with Natools.Storage_Pools;

package Natools.S_Expressions.Atom_Buffers is
   pragma Preelaborate (Atom_Buffers);

   type Dummy_Access is access Boolean;
      --  Used to access default storage pool

   package Atom_Refs is new Natools.References
     (Atom, Dummy_Access'Storage_Pool, Dummy_Access'Storage_Pool);
     (Atom,
      Storage_Pools.Access_In_Default_Pool'Storage_Pool,
      Storage_Pools.Access_In_Default_Pool'Storage_Pool);

   type Atom_Buffer is tagged private;

   procedure Preallocate (Buffer : in out Atom_Buffer; Length : in Count);
      --  Preallocate enough memory to append Length octets without
      --  any further allocation.