/test/language/unclassified/aux_jlp8_basic_array.e

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