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