home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / SmallEiffel 0.3.3 / SmallEiffel 68k / lib_std / pointer.e < prev    next >
Encoding:
Text File  |  1996-06-13  |  1.3 KB  |  50 lines  |  [TEXT/EDIT]

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. expanded class POINTER
  5. --
  6. -- References to objects meant to be exchanged with non-Eiffel 
  7. -- software.
  8. --
  9. -- Note : corresponding C type is mapped as "void *" except for
  10. --        source files "string.e", "array.e" and "fixed_array.e".
  11. --        In file "string.e", type POINTER is simply mapped as
  12. --        the usual C type "char*".
  13. --        In files "array.e" and "fixed_array.e", the mapping depends
  14. --        on the actual generic type. When the actual generic type
  15. --        is a reference type, POINTER is mapped as C type "T0 **".
  16. --        When the actual type is an expanded type, POINTER is mapped 
  17. --        as "<Ti>*" where <Ti> is the corresponding type of expanded
  18. --        actual generic argument.
  19. --
  20.  
  21. inherit 
  22.    POINTER_REF
  23.       redefine fill_tagged_out_memory
  24.       end;
  25.  
  26. feature
  27.  
  28.    is_not_void: BOOLEAN is
  29.      -- Is the external POINTER a non Void pointer ?
  30.      --  
  31.      -- NOTE: as POINTER is an expanded class, the Eiffel
  32.      --       test  Current /= Void is always true.
  33.      --
  34.       external "CSE"
  35.       end;
  36.  
  37.    is_void: BOOLEAN is
  38.       do
  39.      Result := not is_not_void;
  40.       end;
  41.  
  42. feature -- Object Printing :
  43.  
  44.    fill_tagged_out_memory is
  45.       do
  46.      tagged_out_memory.append("a POINTER");
  47.       end;
  48.  
  49. end -- POINTER
  50.