home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / dev / ppcsmalleiffel / lib_se / attribute.e < prev    next >
Encoding:
Text File  |  1998-01-16  |  1.9 KB  |  66 lines

  1. --          This file is part of SmallEiffel The GNU Eiffel Compiler.
  2. --          Copyright (C) 1994-98 LORIA - UHP - CRIN - INRIA - FRANCE
  3. --            Dominique COLNET and Suzanne COLLIN - colnet@loria.fr 
  4. --                       http://www.loria.fr/SmallEiffel
  5. -- SmallEiffel is  free  software;  you can  redistribute it and/or modify it 
  6. -- under the terms of the GNU General Public License as published by the Free
  7. -- Software  Foundation;  either  version  2, or (at your option)  any  later 
  8. -- version. SmallEiffel is distributed in the hope that it will be useful,but
  9. -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  10. -- or  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU General Public License 
  11. -- for  more  details.  You  should  have  received a copy of the GNU General 
  12. -- Public  License  along  with  SmallEiffel;  see the file COPYING.  If not,
  13. -- write to the  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  14. -- Boston, MA 02111-1307, USA.
  15. --
  16. deferred class ATTRIBUTE
  17. --
  18. -- For all sorts of attributes : constants (CST_ATT), unique 
  19. --   (CST_ATT_UNIQUE) and instance variables (WRITABLE_ATTRIBUTE).
  20. --   
  21.  
  22. inherit E_FEATURE;
  23.    
  24. feature {ANY} 
  25.    
  26.    require_assertion: E_REQUIRE is do end;
  27.    
  28.    ensure_assertion: E_ENSURE is do end;
  29.    
  30.    pretty_print is
  31.       do
  32.      pretty_print_profile;
  33.      pretty_tail;
  34.      fmt.put_character(';');
  35.      if header_comment /= void then
  36.         fmt.set_indent_level(2);
  37.         fmt.indent;
  38.         fmt.set_indent_level(1);
  39.         header_comment.pretty_print;
  40.      end;
  41.       end;
  42.    
  43.    arguments: FORMAL_ARG_LIST is do end;
  44.  
  45. feature {NONE} 
  46.    
  47.    pretty_tail is
  48.       deferred
  49.       end;
  50.    
  51.    try_to_undefine_aux(fn: FEATURE_NAME;
  52.                bc: BASE_CLASS): DEFERRED_ROUTINE is
  53.       do
  54.      eh.add_position(start_position);
  55.      error(fn.start_position,
  56.            "An attribute must not be undefined (VDUS).");
  57.      bc.fatal_undefine(fn);
  58.       end;
  59.  
  60. invariant
  61.    
  62.    no_arguments: arguments = Void
  63.    
  64. end -- ATTRIBUTE
  65.  
  66.