Natools

Diff
Login

Differences From Artifact [27750ce913]:

To Artifact [5653ca8412]:


23
24
25
26
27
28
29
30

31
32
33
34
35
36
37
23
24
25
26
27
28
29

30
31
32
33
34
35
36
37







-
+







------------------------------------------------------------------------------

with Natools.S_Expressions.Atom_Refs;

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

   type Atom_Buffer is tagged private;
   type Atom_Buffer is tagged limited private;
   pragma Preelaborable_Initialization (Atom_Buffer);

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

   procedure Append (Buffer : in out Atom_Buffer; Data : in Atom);
67
68
69
70
71
72
73
74

75
76
77
78
79
67
68
69
70
71
72
73

74
75
76
77
78
79







-
+





      --  Clear buffer and release internal memory

   procedure Soft_Reset (Buffer : in out Atom_Buffer);
      --  Clear buffer keeping internal memory

private

   type Atom_Buffer is tagged record
   type Atom_Buffer is tagged limited record
      Ref : Atom_Refs.Reference;
      Available, Used : Count := 0;
   end record;

end Natools.S_Expressions.Atom_Buffers;