PageRenderTime 78ms CodeModel.GetById 76ms app.highlight 0ms RepoModel.GetById 2ms app.codeStats 0ms

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