Natools

Check-in [190e69b741]
Login
Overview
Comment:s_expressions-atom_buffers: make Atom_Buffer type limited, since copying such objects would cause complex and useless consequences
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 190e69b741d7e4bff9a949a9fab8e9f3f298168a
User & Date: nat on 2014-08-12 21:06:13
Other Links: manifest | tags
Context
2014-08-13
20:27
tests: add Generic_Check helper procedure check-in: 8608b41131 user: nat tags: trunk
2014-08-12
21:06
s_expressions-atom_buffers: make Atom_Buffer type limited, since copying such objects would cause complex and useless consequences check-in: 190e69b741 user: nat tags: trunk
2014-08-11
17:30
s_expressions-parsers-tests: use the new capacity accessor instead of "=" to test buffers check-in: bec485b991 user: nat tags: trunk
Changes

Modified src/natools-s_expressions-atom_buffers.ads from [27750ce913] to [5653ca8412].

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;
   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);







|







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 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
      --  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
      Ref : Atom_Refs.Reference;
      Available, Used : Count := 0;
   end record;

end Natools.S_Expressions.Atom_Buffers;







|





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 limited record
      Ref : Atom_Refs.Reference;
      Available, Used : Count := 0;
   end record;

end Natools.S_Expressions.Atom_Buffers;