/test/language/unclassified/aux_jlp8_basic_array.e
Specman e | 76 lines | 45 code | 10 blank | 21 comment | 1 complexity | bf7a88d29cb9e3a4eef99c9e0f6c7360 MD5 | raw file
1-- This file is part of SmartEiffel The GNU Eiffel Compiler Tools and Libraries. 2-- See the Copyright notice at the end of this file. 3-- 4deferred class AUX_JLP8_BASIC_ARRAY[E] 5 6insert 7 ANY 8 9feature {ANY} 10 make (nb: INTEGER) 11 deferred 12 end 13 14 init (first, last: INTEGER) 15 local 16 a_item: E; i: INTEGER 17 do 18 from 19 i := first 20 until 21 i > last 22 loop 23 put(a_item, i) 24 i := i + 1 25 end 26 end 27 28 capacity: INTEGER 29 deferred 30 end 31 32 put (v: E; i: INTEGER) 33 deferred 34 end 35 36 force (v: E; i: INTEGER) 37 do 38 if i < capacity then 39 put(v, i) 40 else 41 resize(i + 1) 42 put(v, i) 43 end 44 end 45 46 item (i: INTEGER): E 47 deferred 48 end 49 50 resize (new_size: INTEGER) 51 deferred 52 end 53 54 valid_index (i: INTEGER): BOOLEAN 55 do 56 end 57 58end -- class AUX_JLP8_BASIC_ARRAY 59-- 60-- ------------------------------------------------------------------------------------------------------------------------------ 61-- Copyright notice below. Please read. 62-- 63-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, 64-- as published by the Free Software Foundation; either version 2, or (at your option) any later version. 65-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty 66-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have 67-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free 68-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 69-- 70-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE 71-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE 72-- 73-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN 74-- 75-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr 76-- ------------------------------------------------------------------------------------------------------------------------------