/src/tools/semantics/code/liberty_entity.e

http://github.com/tybor/Liberty · Specman e · 54 lines · 26 code · 7 blank · 21 comment · 0 complexity · 9dfb25655b9f5441ef5bdd47683bfbfb 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_ENTITY
  16. --
  17. -- Anything with a name and a result type.
  18. -- Most entities have a non-Void result type, except procedures.
  19. --
  20. -- See also LIBERTY_WRITABLE
  21. --
  22. inherit
  23. VISITABLE
  24. LIBERTY_POSITIONABLE
  25. undefine out_in_tagged_out_memory
  26. end
  27. insert
  28. LIBERTY_REACHABLE
  29. feature {ANY}
  30. name: FIXED_STRING is
  31. deferred
  32. end
  33. result_type: LIBERTY_TYPE is
  34. deferred
  35. ensure
  36. -- Result may be Void in the particular case of procedures
  37. end
  38. specialized_in (a_type: LIBERTY_ACTUAL_TYPE): like Current is
  39. require
  40. a_type /= Void
  41. deferred
  42. ensure
  43. Result /= Void
  44. end
  45. invariant
  46. name /= Void
  47. end