1. -- 
  2. --  Copyright (c) 2008, 
  3. --  Reto Buerki, Adrian-Ken Rueegsegger 
  4. -- 
  5. --  This file is part of Alog. 
  6. -- 
  7. --  Alog is free software; you can redistribute it and/or modify 
  8. --  it under the terms of the GNU Lesser General Public License as published 
  9. --  by the Free Software Foundation; either version 2.1 of the License, or 
  10. --  (at your option) any later version. 
  11. -- 
  12. --  Alog is distributed in the hope that it will be useful, 
  13. --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  14. --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  15. --  GNU Lesser General Public License for more details. 
  16. -- 
  17. --  You should have received a copy of the GNU Lesser General Public License 
  18. --  along with Alog; if not, write to the Free Software 
  19. --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 
  20. --  MA  02110-1301  USA 
  21. -- 
  22.  
  23. --  Casing transform. Used to transform casing (lower/uppercase) of messages 
  24. package Alog.Transforms.Casing is 
  25.  
  26.    type Operation_Mode is (Uppercase, Lowercase); 
  27.  
  28.    type Instance is new Alog.Transforms.Instance with private; 
  29.    --  Casing transform. 
  30.  
  31.    type Handle is access all Instance; 
  32.  
  33.    overriding 
  34.    function Transform_Message 
  35.      (Transform : Instance; 
  36.       Level     : Log_Level := Info; 
  37.       Msg       : String) 
  38.       return String; 
  39.    --  Implementation of Transform_Message. 
  40.  
  41.    procedure Set_Mode 
  42.      (Transform : in out Instance; 
  43.       Mode      :        Operation_Mode); 
  44.    --  Set operation mode of transform. 
  45.  
  46. private 
  47.  
  48.    type Instance is new Alog.Transforms.Instance with record 
  49.       Mode  : Operation_Mode := Lowercase; 
  50.       --  Mode of operation. 
  51.    end record; 
  52.  
  53. end Alog.Transforms.Casing;