home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_se / attribute.e < prev    next >
Text File  |  1999-06-05  |  2KB  |  90 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://SmallEiffel.loria.fr
  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
  25.  
  26.    result_type: TYPE;
  27.  
  28. feature
  29.  
  30.    is_deferred: BOOLEAN is false;
  31.  
  32. feature
  33.  
  34.    obsolete_mark: MANIFEST_STRING is
  35.       do
  36.       end;
  37.  
  38.    require_assertion: E_REQUIRE is
  39.       do
  40.       end;
  41.  
  42.    ensure_assertion: E_ENSURE is
  43.       do
  44.       end;
  45.  
  46.    pretty_print is
  47.       do
  48.          pretty_print_profile;
  49.          pretty_tail;
  50.          fmt.put_character(';');
  51.          if header_comment /= void then
  52.             fmt.set_indent_level(2);
  53.             fmt.indent;
  54.             fmt.set_indent_level(1);
  55.             header_comment.pretty_print;
  56.          else
  57.             fmt.set_indent_level(1);
  58.          end;
  59.       end;
  60.  
  61.    pretty_print_arguments is
  62.       do
  63.       end;
  64.  
  65.    arguments: FORMAL_ARG_LIST is
  66.       do
  67.       end;
  68.  
  69. feature {NONE}
  70.  
  71.    pretty_tail is
  72.       deferred
  73.       end;
  74.  
  75.    try_to_undefine_aux(fn: FEATURE_NAME;
  76.                        bc: BASE_CLASS): DEFERRED_ROUTINE is
  77.       do
  78.          eh.add_position(start_position);
  79.          error(fn.start_position,
  80.                "An attribute must not be undefined (VDUS).");
  81.          bc.fatal_undefine(fn);
  82.       end;
  83.  
  84. invariant
  85.  
  86.    no_arguments: arguments = Void
  87.  
  88. end -- ATTRIBUTE
  89.  
  90.