home *** CD-ROM | disk | FTP | other *** search
/ Hacker / Hacker.iso / HACKER / DECOMP / DECAF / cpunicod.ads < prev    next >
Encoding:
Text File  |  1996-09-19  |  2.0 KB  |  66 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. -- This child package provides the class Classes :
  18. -- a constant pool Unicode information is used to represent a String
  19. -- coded with the Unicode Standard.
  20. --
  21. -- For more information about Java Class file format check :
  22. --    The Java Virtual Machine Specification
  23. --    (Release 1.0 Beta - Draft - August 21, 1995)
  24.  
  25. --
  26. -- WARNING : THIS PACKAGE IS NOT FULLY IMPLEMENTED
  27. -- (USUALLY UTF8 STRINGS ARE USED IN JAVA CLASS FILES)
  28. --
  29.  
  30. with Basic_Definitions;
  31. use Basic_Definitions;
  32.  
  33. with Byte_Utilities;
  34.  
  35. package CP.Unicode is
  36.  
  37.    -- the class Tag value in Java files
  38.    ------------------------------------
  39.    C_Class_Tag : constant Unsigned_8 := 2;
  40.  
  41.    type Unicode is new CP_Info with private;
  42.       
  43.    type Acc_Unicode is access all Unicode'Class;
  44.    
  45.    -- Decode a Constant Pool information
  46.    -------------------------------------
  47.    procedure Decode (From_File : Byte_Utilities.File_Type;
  48.                      Some_Info : access Unicode);
  49.  
  50.    -- Display a Constant Pool information
  51.    --------------------------------------
  52.    procedure Display (Some_Info : access Unicode;
  53.                       Context   : in Acc_CP_Infos);
  54.  
  55. private
  56.  
  57.    -- the Unicode String is currently coded as an array of Bytes
  58.    -------------------------------------------------------------
  59.    type Unicode is new CP_Info with
  60.       record
  61.          Length : Unsigned_16;
  62.          bytes  : Byte_Utilities.Acc_Bytes;
  63.       end record;
  64.       
  65. end CP.Unicode;
  66.