home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_se / deferred_routine.e < prev    next >
Text File  |  1999-06-05  |  2KB  |  70 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 DEFERRED_ROUTINE
  17.    --
  18.    -- For all sorts of deferred routines.
  19.    --
  20.  
  21. inherit ROUTINE;
  22.  
  23. feature
  24.  
  25.    is_deferred: BOOLEAN is true;
  26.  
  27.    frozen set_rescue_compound(c: COMPOUND) is
  28.       do
  29.          if c /= Void then
  30.             eh.add_position(c.start_position);
  31.          else
  32.             eh.add_position(start_position);
  33.          end;
  34.          eh.append("Deferred feature must not have rescue compound.");
  35.          eh.print_as_fatal_error;
  36.       end;
  37.  
  38.    to_run_feature(t: TYPE; fn: FEATURE_NAME): RUN_FEATURE_9 is
  39.       do
  40.          !!Result.make(t,fn,Current);
  41.       end;
  42.  
  43. feature {NONE}
  44.  
  45.    pretty_print_routine_body is
  46.       do
  47.          fmt.put_string("%Ndeferred%N");
  48.       end;
  49.  
  50.    pretty_print_rescue is
  51.       do
  52.       end;
  53.  
  54. feature {C_PRETTY_PRINTER}
  55.  
  56.    frozen stupid_switch(up_rf: RUN_FEATURE; r: ARRAY[RUN_CLASS]): BOOLEAN is
  57.       do
  58.       end;
  59.  
  60. feature {NONE}
  61.  
  62.    try_to_undefine_aux(fn: FEATURE_NAME;
  63.                        bc: BASE_CLASS): DEFERRED_ROUTINE is
  64.       do
  65.          Result := Current;
  66.       end;
  67.  
  68. end -- DEFERRED_ROUTINE
  69.  
  70.