#
# This file is free software, which comes along with NIT. This software is
# distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
-# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. You can modify it is you want, provided this header
# is kept unaltered, and a notification of the changes is added.
# You are allowed to redistribute it and sell it, alone or is a part of
# another product.
-class FilterIStream
- super IStream
+class FilterReader
+ super Reader
# Filter readed elements
- var stream: nullable IStream = null
+ var stream: nullable Reader = null
redef fun eof: Bool
do
end
end
-class FilterOStream
- super OStream
+class FilterWriter
+ super Writer
# Filter outputed elements
- var stream: nullable OStream = null
+ var stream: nullable Writer = null
# Can the stream be used to write
redef fun is_writable: Bool
end
class StreamCat
- super FilterIStream
- private var streams: Iterator[IStream]
+ super FilterReader
+ private var streams: Iterator[Reader]
redef fun eof: Bool
do
end
end
- redef fun stream: nullable IStream
+ redef fun stream: nullable Reader
do
var res = super
if res == null and _streams.is_ok then
end
end
- init with_streams(streams: Array[IStream])
+ init with_streams(streams: Array[Reader])
do
_streams = streams.iterator
end
- init(streams: IStream ...)
- do
+
+ init(streams: Reader ...) is old_style_init do
_streams = streams.iterator
end
end
class StreamDemux
- super FilterOStream
- private var streams: Array[OStream]
+ super FilterWriter
+ private var streams: Array[Writer]
redef fun is_writable: Bool
do
end
end
- init with_streams(streams: Array[OStream])
+ init with_streams(streams: Array[Writer])
do
_streams = streams
end
- init(streams: OStream ...)
- do
+ init(streams: Writer ...) is old_style_init do
_streams = streams
end
end