/library/error/visitor/text_output_error_visitor.e

http://github.com/jocelyn/EiffelWebReloaded · Specman e · 53 lines · 40 code · 12 blank · 1 comment · 1 complexity · ad22def4595849fc81ec6963a9372f15 MD5 · raw file

  1. note
  2. description: "Text error output visitor"
  3. date: "$Date$"
  4. revision: "$Revision$"
  5. class
  6. TEXT_OUTPUT_ERROR_VISITOR
  7. inherit
  8. OUTPUT_ERROR_VISITOR
  9. redefine
  10. output_integer,
  11. output_new_line
  12. end
  13. create
  14. make
  15. feature -- Initialization
  16. make (buf: like buffer)
  17. require
  18. buf_attached: buf /= Void
  19. do
  20. buffer := buf
  21. end
  22. feature -- Access
  23. buffer: STRING
  24. feature -- Output
  25. output_string (a_str: detachable STRING_GENERAL)
  26. -- Output Unicode string
  27. do
  28. if a_str /= Void then
  29. to_implement ("Convert into UTF-8 or console encoding before output")
  30. buffer.append_string_general (a_str)
  31. end
  32. end
  33. output_integer (i: INTEGER)
  34. do
  35. buffer.append_integer (i)
  36. end
  37. output_new_line
  38. do
  39. buffer.append_character ('%N')
  40. end
  41. end