/src/tools/wrappers-generator/wrapper_class.e

http://github.com/tybor/Liberty · Specman e · 49 lines · 26 code · 7 blank · 16 comment · 2 complexity · 7ec5de2bc2499cde22a7061587e3bf94 MD5 · raw file

  1. deferred class WRAPPER_CLASS
  2. -- A node of an Gcc-Xml file reprenting an entity wrappable by a
  3. -- Liberty class also containing the wrapper features of child
  4. -- and/or related nodes.
  5. inherit
  6. WRAPPABLE_NODE
  7. -- To make sure that it is a correct class name
  8. redefine compute_eiffel_name
  9. end
  10. feature {ANY}
  11. emit_wrapper
  12. deferred
  13. ensure emitted
  14. end
  15. compute_eiffel_name
  16. do
  17. if has_assigned_name then
  18. cached_eiffel_name := eiffel_class_name(assigned_name, suffix)
  19. elseif is_named then
  20. cached_eiffel_name := eiffel_class_name(c_string_name, suffix)
  21. else
  22. create cached_eiffel_name.make_from_string(once "ANONYMOUS_GCCXML_ELEMENT_AT_L@(1)_R@(2)" # &line # &column)
  23. end
  24. -- TODO: 2016-02-08 PR this is becoming an horrible spaghetti code!
  25. end
  26. suffix: STRING
  27. deferred
  28. end
  29. feature {} -- Implementation
  30. output: TERMINAL_OUTPUT_STREAM
  31. end -- class WRAPPER_CLASS
  32. -- Copyright (C) 2008-2017: Paolo Redaelli
  33. -- wrappers-generator is free software: you can redistribute it and/or modify it
  34. -- under the terms of the GNU General Public License as publhed by the Free
  35. -- Software Foundation, either version 2 of the License, or (at your option)
  36. -- any later version.
  37. -- wrappers-generator is distributed in the hope that it will be useful, but
  38. -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  39. -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  40. -- more details.
  41. -- You should have received a copy of the GNU General Public License along with
  42. -- th program. If not, see <http://www.gnu.org/licenses/>.