-- $Date: 2004/01/28 05:10:09 $
-- $Revision: 1.5 $
-- $Author: jcrocholl $

-- Light-weight text output file writers with indentation.
package body Indent_Writers is

   ---------------------
   -- Adjust indentation
   ---------------------

   -- Increase the indentation level.
   procedure Indent
     (This : access Indent_Writer'Class) is -- Writer instance.
   begin
      This.Indent_Level := This.Indent_Level + 1;
   end Indent;

   -- Decrease the indentation level.
   procedure Unindent
     (This : access Indent_Writer'Class) is -- Writer instance.
   begin
      This.Indent_Level := This.Indent_Level - 1;
   end Unindent;

   --------------------
   -- Write indentation
   --------------------

   -- Output indentation characters to the file.
   procedure Write_Indent
     (This : access Indent_Writer'Class) is -- Writer instance.
   begin
      for Index in 1 .. This.Indent_Level * This.Indent_Count loop
         Put(This, This.Indent_Char);
      end loop;
   end Write_Indent;

end Indent_Writers;