PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/src/lib/message_formatter/string_printer.e

http://github.com/tybor/Liberty
Specman e | 56 lines | 26 code | 7 blank | 23 comment | 0 complexity | 89730d3536646c9e13b9d621161dc800 MD5 | raw file
 1-- This file is part of a Liberty Eiffel library.
 2-- See the full copyright at the end.
 3--
 4class STRING_PRINTER
 5
 6inherit
 7   STRING_FORMATTER
 8
 9create {ANY}
10   make
11
12feature {ANY}
13   make (output_: like output)
14      require
15         output_.is_connected
16      do
17         output := output_
18      ensure
19         output = output_
20      end
21
22feature {}
23   put (c: CHARACTER)
24      do
25         output.put_character(c)
26      end
27
28   put_item (item: ABSTRACT_STRING)
29      do
30         item.print_on(output)
31      end
32
33feature {}
34   output: OUTPUT_STREAM
35
36end -- class STRING_PRINTER
37--
38-- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
39--
40-- Permission is hereby granted, free of charge, to any person obtaining a copy
41-- of this software and associated documentation files (the "Software"), to deal
42-- in the Software without restriction, including without limitation the rights
43-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
44-- copies of the Software, and to permit persons to whom the Software is
45-- furnished to do so, subject to the following conditions:
46--
47-- The above copyright notice and this permission notice shall be included in
48-- all copies or substantial portions of the Software.
49--
50-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
51-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
53-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
54-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
55-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
56-- THE SOFTWARE.