indexing
	description: "Routines that ought to be in class OUTPUT_STREAM"
	library: "Gobo Eiffel Kernel Library"
	author: "Eric Bezault <ericb@gobo.demon.co.uk>"
	copyright: "Copyright (c) 1997, Eric Bezault"

class interface
	KL_OUTPUT_STREAM_ROUTINES

feature -- Initialization

	make_file_open_write (a_filename: STRING): like output_stream_type
			-- Create a new file object with a_filename as
			-- file name and try to open it in write-only mode.
			-- is_open_write (Result) is set to True
			-- if operation was successful.
		require
			a_filename_not_void: a_filename /= void;
			a_filename_not_empty: not a_filename.empty
		ensure
			file_not_void: Result /= void
	
feature -- Access

	output_stream_: KL_OUTPUT_STREAM_ROUTINES
			-- Routines that ought to be in class OUTPUT_STREAM
			-- (from KL_IMPORTED_OUTPUT_STREAM_ROUTINES)
		ensure -- from KL_IMPORTED_OUTPUT_STREAM_ROUTINES
			output_stream_routines_not_void: Result /= void
	
feature -- Status report

	is_closed (a_stream: like output_stream_type): BOOLEAN
			-- Is a_stream closed?
		require
			a_stream_void: a_stream /= void

	is_open_write (a_stream: like output_stream_type): BOOLEAN
			-- Is a_stream open in write mode?
		require
			a_stream_void: a_stream /= void
	
feature -- Status setting

	close (a_stream: like output_stream_type)
			-- Close a_stream if it is closable,
			-- let it open otherwise.
		require
			a_stream_not_void: a_stream /= void;
			not_closed: not is_closed (a_stream)
	
feature -- Type anchors

	output_stream_type: IO_MEDIUM
			-- (from KL_IMPORTED_OUTPUT_STREAM_ROUTINES)
	
invariant

		-- from GENERAL
	reflexive_equality: standard_is_equal (Current);
	reflexive_conformance: conforms_to (Current);

end -- class KL_OUTPUT_STREAM_ROUTINES