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

http://github.com/tybor/Liberty · Specman e · 53 lines · 31 code · 7 blank · 15 comment · 0 complexity · c6ace2acbef7bd30f1a7b52e29967f8f MD5 · raw file

  1. deferred class FILED_NODE
  2. -- A Gccxml node with "file" attribute
  3. inherit
  4. GCCXML_NODE
  5. insert
  6. SHARED_COLLECTIONS
  7. feature {ANY}
  8. file_id: UNICODE_STRING
  9. do
  10. Result := attribute_at(once U"file")
  11. ensure
  12. Result /= Void
  13. end
  14. line_row: UNICODE_STRING
  15. -- The line in the source code where Current is defined
  16. do
  17. Result := attribute_at(once U"line")
  18. ensure
  19. Result /= Void
  20. end
  21. c_file: C_FILE
  22. do
  23. Result := files.reference_at(file_id)
  24. end
  25. set_file (a_file: C_FILE)
  26. -- Make Current node as if it was defined into `a_file'
  27. -- Consider Current as if it wes defined in `a_file_name'.
  28. require
  29. a_file /= Void
  30. do
  31. attributes.put(a_file.id, once U"file")
  32. ensure
  33. set: c_file = a_file
  34. end
  35. end -- class FILED_NODE
  36. -- Copyright (C) 2008-2017: ,2009,2010 Paolo Redaelli
  37. -- wrappers-generator is free software: you can redistribute it and/or modify it
  38. -- under the terms of the GNU General Public License as publhed by the Free
  39. -- Software Foundation, either version 2 of the License, or (at your option)
  40. -- any later version.
  41. -- wrappers-generator is distributed in the hope that it will be useful, but
  42. -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  43. -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  44. -- more details.
  45. -- You should have received a copy of the GNU General Public License along with
  46. -- th program. If not, see <http://www.gnu.org/licenses/>.