home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_se / frozen_feature_name.e < prev    next >
Text File  |  1999-06-05  |  2KB  |  95 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. class FROZEN_FEATURE_NAME
  17.    --
  18.    -- For a frozen FEATURE_NAME.
  19.    --
  20.  
  21. inherit FEATURE_NAME;
  22.  
  23. creation {EIFFEL_PARSER} make
  24.  
  25. feature {NONE}
  26.  
  27.    feature_name: FEATURE_NAME;
  28.  
  29. feature
  30.  
  31.    is_frozen: BOOLEAN is true;
  32.  
  33. feature {NONE}
  34.  
  35.    make(fn: like feature_name) is
  36.       require
  37.          fn /= void
  38.       do
  39.          feature_name := fn;
  40.       ensure
  41.          feature_name = fn
  42.       end;
  43.  
  44. feature
  45.  
  46.    to_string: STRING is
  47.       do
  48.          Result := feature_name.to_string;
  49.       end;
  50.  
  51.    to_key: STRING is
  52.       do
  53.          Result := feature_name.to_key;
  54.       end;
  55.  
  56.    start_position: POSITION is
  57.       do
  58.          Result := feature_name.start_position;
  59.       end;
  60.  
  61.    mapping_c_in(str: STRING) is
  62.       do
  63.          feature_name.mapping_c_in(str);
  64.       end;
  65.  
  66.    declaration_in(str: STRING) is
  67.       do
  68.          feature_name.declaration_in(str);
  69.       end;
  70.  
  71.    short is
  72.       do
  73.          feature_name.short;
  74.       end;
  75.  
  76.    declaration_pretty_print is
  77.       do
  78.          fmt.keyword("frozen");
  79.          feature_name.declaration_pretty_print;
  80.       end;
  81.  
  82.    pretty_print is
  83.       do
  84.          feature_name.pretty_print;
  85.       end;
  86.  
  87. feature {RUN_FEATURE,FEATURE_NAME}
  88.  
  89.    put_cpp_tag is
  90.       do
  91.          feature_name.put_cpp_tag;
  92.       end;
  93.  
  94. end -- FROZEN_FEATURE_NAME
  95.