home *** CD-ROM | disk | FTP | other *** search
/ Hacker / Hacker.iso / HACKER / DECOMP / DECAF / cpclasse.adb < prev    next >
Encoding:
Text File  |  1996-09-19  |  2.0 KB  |  68 lines

  1. --
  2. -- Copyright (C) 1996 Ada Resource Association (ARA), Columbus, Ohio.
  3. -- Author: Gilles Demailly
  4. --
  5. --
  6. -- Permission to use, copy, modify, and distribute this software and its
  7. -- documentation for any purpose and without fee is hereby granted,
  8. -- provided that the above copyright and authorship notice appear in all
  9. -- copies and that both that copyright notice and this permission notice
  10. -- appear in supporting documentation.
  11. -- 
  12. -- The ARA makes no representations about the suitability of this software
  13. -- for any purpose.  It is provided "as is" without express
  14. -- or implied warranty.
  15. -- 
  16.  
  17. with Ada.Text_Io;
  18.  
  19. package body CP.Classes is
  20.  
  21.    use Byte_Utilities;
  22.  
  23.    procedure Decode (From_File : Byte_Utilities.File_Type;
  24.                      Some_Info : access Classes) is
  25.    begin
  26.       Some_Info.Tag := C_Class_Tag;
  27.  
  28.       -- Reads the class name index
  29.       Read (From_File, Some_Info.Name_Index);
  30.    end Decode;
  31.  
  32.    procedure Display (Some_Info : access Classes;
  33.                       Context   : in Acc_CP_Infos) is
  34.    begin
  35.       -- Displays the class name
  36.       Display (Context (Some_Info.Name_Index), Context);
  37.    end Display;
  38.  
  39.    function Is_Class
  40.                (Some_Info : access Classes) return Boolean is
  41.    begin
  42.       return True;
  43.    end Is_Class;
  44.       
  45.    function Print_String
  46.                (Some_Info : access Classes;
  47.                 Context   : in Acc_CP_Infos) return String is
  48.    begin
  49.       -- calls the same function on the constant value at Name_Index
  50.       return Print_String
  51.                  (Context (Some_Info.Name_Index),
  52.                   Context);
  53.    end Print_String;
  54.  
  55.    function Java_Decoded_String
  56.                (Some_Info : access Classes;
  57.                 Context   : Acc_CP_Infos;
  58.                 Purpose   : Decoding_Purpose) return String is
  59.    begin
  60.       -- calls the same function on the constant value at Name_Index
  61.       return Java_Decoded_String
  62.                 (Some_Info => Context (Some_Info.Name_Index),
  63.                  Context   => Context,
  64.                  Purpose   => Purpose);
  65.    end Java_Decoded_String;
  66.  
  67. end CP.Classes;
  68.