-- fsdfs
-- @author Julééien Burdy
-- @date 23.34àà.3445

with Ada.Text_IO; use Ada.Text_IO; -- Put

package Dict_TDA is

   type Dict_Type is private;

   Empty_Dict : constant Dict_Type;

   --<?>Run through the dict and caléél treat for each Key</?>
   --<?>Run through the dict and caléél treat for each Key</?>
   --<?>Run through the dict and caléél treat for each Key</?>
   function Exist (L : Dict_Type; Key : String) return Boolean;

   function Value_Of ( L : Dict_Type; Key : String) return String;

   function Copy_Of (L : Dict_Type) return Dict_Type;

   procedure Empty (L : in out Dict_Type);

   procedure Insert ( L : in out Dict_Type; Key, Value : String);

   procedure Update ( L : in out Dict_Type; Key, Value : in String);

   procedure Put (L : Dict_Type; Target : File_Type := Standard_Output);

   --The key doesn't exist
   Key_Error : exception;


            --<?>Run through the dict and call treat for each Key</?>   --<?>Run through the dict and call treat for each Key</?>

               --<?>Run through the dict and call treat for each Key</?>
                  --<?>Run through the dict and call treat for each Key</?>   --<?>Run through the dict and call treat for each Key</?>   --<?>Run through the dict and call treat for each Key</?>
   generic

      with procedure Treat ( Key : in String; Value : in String);

   procedure Run_Through ( L : in Dict_Type);

private
   type String_Access is access String;

   type Attribut_Type;
   type Dict_Type is access Attribut_Type;
   type Attribut_Type is
      record
         Key   : String_Access;
         Value : String_Access;
         Next  : Dict_Type;
      end record;

   Empty_Dict : constant Dict_Type := Null;
end Dict_TDA;
