Natools

Diff
Login

Differences From Artifact [5a8174aa31]:

To Artifact [91a3fb55d8]:


1
2
3
4
5
6
7
8
9
------------------------------------------------------------------------------
-- Copyright (c) 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         --

|







1
2
3
4
5
6
7
8
9
------------------------------------------------------------------------------
-- Copyright (c) 2015-2019, 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         --
36
37
38
39
40
41
42




43
44
45
46
   package Typed_IO is

      function Image (T : Enum) return Atom;
         --  Convert an enumeration value into an atom

      function Value (Data : Atom) return Enum;
         --  Convert an atom into an enumeration value





   end Typed_IO;

end Natools.S_Expressions.Enumeration_IO;







>
>
>
>




36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
   package Typed_IO is

      function Image (T : Enum) return Atom;
         --  Convert an enumeration value into an atom

      function Value (Data : Atom) return Enum;
         --  Convert an atom into an enumeration value

      function Value (Data : Atom; Default : Enum) return Enum;
         --  Convert an atom into an enumeration value,
         --  with a default value on invalid atom images

   end Typed_IO;

end Natools.S_Expressions.Enumeration_IO;