/src/tools/interpreter/liberty_interpreter_native_array_accessor_typed.e

http://github.com/tybor/Liberty · Specman e · 54 lines · 32 code · 8 blank · 14 comment · 0 complexity · 7364028022a4d3e70db7688e2da1db44 MD5 · raw file

  1. -- This file is part of Liberty Eiffel.
  2. --
  3. -- Liberty Eiffel is free software: you can redistribute it and/or modify
  4. -- it under the terms of the GNU General Public License as published by
  5. -- the Free Software Foundation, version 3 of the License.
  6. --
  7. -- Liberty Eiffel is distributed in the hope that it will be useful,
  8. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. -- GNU General Public License for more details.
  11. --
  12. -- You should have received a copy of the GNU General Public License
  13. -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
  14. --
  15. class LIBERTY_INTERPRETER_NATIVE_ARRAY_ACCESSOR_TYPED[E_]
  16. inherit
  17. LIBERTY_INTERPRETER_NATIVE_ARRAY_ACCESSOR
  18. creation {LIBERTY_INTERPRETER_NATIVE_ARRAY_ACCESSOR_FACTORY}
  19. make
  20. feature {LIBERTY_INTERPRETER_NATIVE_ARRAY, LIBERTY_INTERPRETER_NATIVE_ARRAY_ITERATOR}
  21. retrieve (item: E_): LIBERTY_INTERPRETER_OBJECT is
  22. do
  23. Result := retriever.item([item])
  24. end
  25. store (item: LIBERTY_INTERPRETER_OBJECT): E_ is
  26. do
  27. Result := storer.item([item])
  28. end
  29. feature {}
  30. make (a_retriever: like retriever; a_storer: like storer) is
  31. require
  32. a_retriever /= Void
  33. a_storer /= Void
  34. do
  35. retriever := a_retriever
  36. storer := a_storer
  37. ensure
  38. retriever = a_retriever
  39. storer = a_storer
  40. end
  41. retriever: FUNCTION[TUPLE[E_], LIBERTY_INTERPRETER_OBJECT]
  42. storer: FUNCTION[TUPLE[LIBERTY_INTERPRETER_OBJECT], E_]
  43. invariant
  44. retriever /= Void
  45. storer /= Void
  46. end -- class LIBERTY_INTERPRETER_NATIVE_ARRAY_ACCESSOR_TYPED