/src/tools/semantics/code/expressions/liberty_typed_manifest.e

http://github.com/tybor/Liberty · Specman e · 53 lines · 32 code · 7 blank · 14 comment · 0 complexity · c75f875ad1f43e409559765432db312f 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. deferred class LIBERTY_TYPED_MANIFEST[E_]
  16. inherit
  17. LIBERTY_EXPRESSION
  18. feature {ANY}
  19. manifest: E_
  20. result_type: LIBERTY_TYPE
  21. specialized_in (a_type: LIBERTY_ACTUAL_TYPE): like Current is
  22. do
  23. Result := Current
  24. end
  25. feature {LIBERTY_REACHABLE, LIBERTY_REACHABLE_COLLECTION_MARKER}
  26. mark_reachable_code (mark: INTEGER) is
  27. do
  28. result_type.mark_reachable_code(mark)
  29. end
  30. feature {}
  31. make (a_type: like result_type; a_manifest: like manifest; a_position: like position) is
  32. require
  33. a_type /= Void
  34. a_position /= Void
  35. do
  36. result_type := a_type
  37. manifest := a_manifest
  38. position := a_position
  39. ensure
  40. result_type = a_type
  41. manifest = a_manifest
  42. position = a_position
  43. end
  44. invariant
  45. result_type /= Void
  46. end