Overview
Comment: | printers: add a new class-wide procedure to append strings, which often improves readibility |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
94f83b5035a6ef8a2797a0d3085ec2de |
User & Date: | nat on 2015-05-02 14:04:34 |
Other Links: | manifest | tags |
Context
2015-05-03
| ||
16:22 | s_expressions-printers-tests: use the new Append_String procedure to keep full ocoverage check-in: 3b7e398512 user: nat tags: trunk | |
2015-05-02
| ||
14:04 | printers: add a new class-wide procedure to append strings, which often improves readibility check-in: 94f83b5035 user: nat tags: trunk | |
2015-04-13
| ||
18:15 | time_keys: fix subsecond rounding bug check-in: a3f3d5c90c user: nat tags: trunk | |
Changes
Modified src/natools-s_expressions-printers.adb from [cb988bcb9f] to [b0eaf58582].
1 | ------------------------------------------------------------------------------ | | | 1 2 3 4 5 6 7 8 9 | ------------------------------------------------------------------------------ -- Copyright (c) 2013-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 -- |
︙ | ︙ | |||
39 40 41 42 43 44 45 46 47 48 49 50 51 52 | overriding procedure Close_List (Output : in out Canonical) is begin Output.Stream.Write ((0 => Encodings.List_End)); end Close_List; procedure Transfer (Source : in out Descriptor'Class; Target : in out Printer'Class; Check_Level : in Boolean := False) is procedure Print_Atom (Data : in Atom); | > > > > > > | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | overriding procedure Close_List (Output : in out Canonical) is begin Output.Stream.Write ((0 => Encodings.List_End)); end Close_List; procedure Append_String (Output : in out Printer'Class; Data : in String) is begin Append_Atom (Output, To_Atom (Data)); end Append_String; procedure Transfer (Source : in out Descriptor'Class; Target : in out Printer'Class; Check_Level : in Boolean := False) is procedure Print_Atom (Data : in Atom); |
︙ | ︙ |
Modified src/natools-s_expressions-printers.ads from [d999b2268e] to [7aa683f6a7].
1 | ------------------------------------------------------------------------------ | | | 1 2 3 4 5 6 7 8 9 | ------------------------------------------------------------------------------ -- Copyright (c) 2013-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 -- |
︙ | ︙ | |||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 | type Printer is limited interface; procedure Open_List (Output : in out Printer) is abstract; procedure Append_Atom (Output : in out Printer; Data : in Atom) is abstract; procedure Close_List (Output : in out Printer) is abstract; procedure Transfer (Source : in out Descriptor'Class; Target : in out Printer'Class; Check_Level : in Boolean := False); type Canonical (Stream : access Ada.Streams.Root_Stream_Type'Class) is new Printer with null record; | > > > | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | type Printer is limited interface; procedure Open_List (Output : in out Printer) is abstract; procedure Append_Atom (Output : in out Printer; Data : in Atom) is abstract; procedure Close_List (Output : in out Printer) is abstract; procedure Append_String (Output : in out Printer'Class; Data : in String); procedure Transfer (Source : in out Descriptor'Class; Target : in out Printer'Class; Check_Level : in Boolean := False); type Canonical (Stream : access Ada.Streams.Root_Stream_Type'Class) is new Printer with null record; |
︙ | ︙ |