with Ada.Text_IO; use Ada.Text_IO;
package body Module.Xy is

   Fichier : File_Type; -- Declaration de notre fichier

   procedure Begin_Document (Self : Object; Package_Name : String;
                             Atts, Tags : Dict_Type) is
   begin
      Create(Fichier, Name => Package_Name & ".txt");
      Put_Line(Fichier, "Paquetage : " & Package_Name);
   end Begin_Document;

   procedure End_Document (self : Object) is
   begin
      New_Line(Fichier);
      Put_Line(Fichier, "Fin.");
      Close(Fichier);
   end End_Document;


   procedure A_Procedure (Self : Object; Atts : Dict_Type;
                          Its_Name : String; In_Prot_Obj : Boolean) is
   begin
      New_Line(Fichier);
      if Option_Exist(Self, "c") and
         Exist(Atts, "comment") then
         Put_Line(Fichier, "Commentaire : " &
                                 Value_Of(Atts,"comment"));
      end if;
      Put_Line(Fichier, Its_Name & " une procedure...");
   end A_Procedure;


   procedure A_Parameter (Self : Object; Atts : Dict_Type; Its_Name,
                          Its_Type, Its_Mode : String) is
   begin
      Put_Line(Fichier, Its_Name & " est de type " & Its_Type &
               " et de mode de passage " & Its_Mode);
   end A_Parameter;

   procedure Start_Group (Self : Object; Group : Element_Type) is
   begin
      case Group is
         when Is_Subprograms =>
            Put_Line(Fichier, "Voici la liste des sous programmes");
            Put_Line(Fichier, "----------------------------------");
         when Is_Parameters =>
            Put_Line(Fichier, "Liste des parametres :");
         when others =>
            null;
      end case;
   end Start_Group;

end Module.Xy;


