    indexing
    	description: "[
    		Commonly used input and output mechanisms.
    		This class may be used as either ancestor or supplier
    		by classes needing its facilities.
    	]"
    	legal: "See notice at end of class."
    	status: "See notice at end of class."
    	date: "$Date: 2006-02-26 10:16:56 -0800 (Sun, 26 Feb 2006) $"
    	revision: "$Revision: 57159 $"

    class interface
    	STD_FILES

    create
    	default_create
    			-- Process instances of classes with no creation clause.
    			-- (Default: do nothing.)
    			-- (from ANY)

    feature -- Access

    	default_output: PLAIN_TEXT_FILE
    			-- Default output

    	error: PLAIN_TEXT_FILE
    			-- Standard error file
    		ensure
    			error_not_void: Result /= Void

    	generating_type: STRING_8
    			-- Name of current object's generating type
    			-- (type of which it is a direct instance)
    			-- (from ANY)

    	generator: STRING_8
    			-- Name of current object's generating class
    			-- (base class of the type of which it is a direct instance)
    			-- (from ANY)

    	input: PLAIN_TEXT_FILE
    			-- Standard input file
    		ensure
    			input_not_void: Result /= Void

    	output: PLAIN_TEXT_FILE
    			-- Standard output file
    		ensure
    			output_not_void: Result /= Void

    	standard_default: PLAIN_TEXT_FILE
    			-- Return the default_output or Output
    			-- if default_output is Void.

    feature -- Comparison

    	frozen deep_equal (some: ANY; other: like arg #1): BOOLEAN
    			-- Are `some' and `other' either both void
    			-- or attached to isomorphic object structures?
    			-- (from ANY)
    		ensure -- from ANY
    			shallow_implies_deep: standard_equal (some, other) implies Result
    			both_or_none_void: (some = Void) implies (Result = (other = Void))
    			same_type: (Result and (some /= Void)) implies some.same_type (other)
    			symmetric: Result implies deep_equal (other, some)

    	frozen equal (some: ANY; other: like arg #1): BOOLEAN
    			-- Are `some' and `other' either both void or attached
    			-- to objects considered equal?
    			-- (from ANY)
    		ensure -- from ANY
    			definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.is_equal (other))

    	is_equal (other: like Current): BOOLEAN
    			-- Is `other' attached to an object considered
    			-- equal to current object?
    			-- (from ANY)
    		require -- from ANY
    			other_not_void: other /= Void
    		ensure -- from ANY
    			symmetric: Result implies other.is_equal (Current)
    			consistent: standard_is_equal (other) implies Result

    	frozen standard_equal (some: ANY; other: like arg #1): BOOLEAN
    			-- Are `some' and `other' either both void or attached to
    			-- field-by-field identical objects of the same type?
    			-- Always uses default object comparison criterion.
    			-- (from ANY)
    		ensure -- from ANY
    			definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.standard_is_equal (other))

    	frozen standard_is_equal (other: like Current): BOOLEAN
    			-- Is `other' attached to an object of the same type
    			-- as current object, and field-by-field identical to it?
    			-- (from ANY)
    		require -- from ANY
    			other_not_void: other /= Void
    		ensure -- from ANY
    			same_type: Result implies same_type (other)
    			symmetric: Result implies other.standard_is_equal (Current)

    feature -- Status report

    	conforms_to (other: ANY): BOOLEAN
    			-- Does type of current object conform to type
    			-- of `other' (as per Eiffel: The Language, chapter 13)?
    			-- (from ANY)
    		require -- from ANY
    			other_not_void: other /= Void

    	last_character: CHARACTER_8
    			-- Last character read by read_character
    			-- Was declared in STD_FILES as synonym of lastchar.

    	last_double: REAL_64
    			-- Last double read by read_double
    			-- Was declared in STD_FILES as synonym of lastdouble.

    	last_integer: INTEGER_32
    			-- Last integer read by read_integer
    			-- Was declared in STD_FILES as synonym of lastint and last_integer_32.

    	last_integer_16: INTEGER_16
    			-- Last 16-bit integer read by read_integer_16

    	last_integer_32: INTEGER_32
    			-- Last integer read by read_integer
    			-- Was declared in STD_FILES as synonym of last_integer and lastint.

    	last_integer_64: INTEGER_64
    			-- Last 8-bit integer read by read_integer_64

    	last_integer_8: INTEGER_8
    			-- Last 8-bit integer read by read_integer_8

    	last_natural: NATURAL_32
    			-- Last 32-bit natural read by read_natural_32
    			-- Was declared in STD_FILES as synonym of last_natural_32.

    	last_natural_16: NATURAL_16
    			-- Last 16-bit natural read by read_natural_16

    	last_natural_32: NATURAL_32
    			-- Last 32-bit natural read by read_natural_32
    			-- Was declared in STD_FILES as synonym of last_natural.

    	last_natural_64: NATURAL_64
    			-- Last 64-bit natural read by read_natural_64

    	last_natural_8: NATURAL_8
    			-- Last 8-bit natural read by read_natural_8

    	last_real: REAL_32
    			-- Last real read by read_real
    			-- Was declared in STD_FILES as synonym of lastreal.

    	last_string: STRING_8
    			-- Last string read by read_line,
    			-- read_stream, or read_word
    			-- Was declared in STD_FILES as synonym of laststring.

    	lastchar: CHARACTER_8
    			-- Last character read by read_character
    			-- Was declared in STD_FILES as synonym of last_character.

    	lastdouble: REAL_64
    			-- Last double read by read_double
    			-- Was declared in STD_FILES as synonym of last_double.

    	lastint: INTEGER_32
    			-- Last integer read by read_integer
    			-- Was declared in STD_FILES as synonym of last_integer and last_integer_32.

    	lastreal: REAL_32
    			-- Last real read by read_real
    			-- Was declared in STD_FILES as synonym of last_real.

    	laststring: STRING_8
    			-- Last string read by read_line,
    			-- read_stream, or read_word
    			-- Was declared in STD_FILES as synonym of last_string.

    	same_type (other: ANY): BOOLEAN
    			-- Is type of current object identical to type of `other'?
    			-- (from ANY)
    		require -- from ANY
    			other_not_void: other /= Void
    		ensure -- from ANY
    			definition: Result = (conforms_to (other) and other.conforms_to (Current))

    feature -- Element change

    	new_line
    			-- Write line feed at end of default output.
    			-- Was declared in STD_FILES as synonym of put_new_line.

    	put_boolean (b: BOOLEAN)
    			-- Write `b' at end of default output.
    			-- Was declared in STD_FILES as synonym of putbool.

    	put_character (c: CHARACTER_8)
    			-- Write `c' at end of default output.
    			-- Was declared in STD_FILES as synonym of putchar.

    	put_double (d: REAL_64)
    			-- Write `d' at end of default output.
    			-- Was declared in STD_FILES as synonym of putdouble.

    	put_integer (i: INTEGER_32)
    			-- Write `i' at end of default output.
    			-- Was declared in STD_FILES as synonym of putint and put_integer_32.

    	put_integer_16 (i: INTEGER_16)
    			-- Write `i' at end of default output.

    	put_integer_32 (i: INTEGER_32)
    			-- Write `i' at end of default output.
    			-- Was declared in STD_FILES as synonym of put_integer and putint.

    	put_integer_64 (i: INTEGER_64)
    			-- Write `i' at end of default output.

    	put_integer_8 (i: INTEGER_8)
    			-- Write `i' at end of default output.

    	put_natural (i: NATURAL_32)
    			-- Write `i' at end of default output.
    			-- Was declared in STD_FILES as synonym of put_natural_32.

    	put_natural_16 (i: NATURAL_16)
    			-- Write `i' at end of default output.

    	put_natural_32 (i: NATURAL_32)
    			-- Write `i' at end of default output.
    			-- Was declared in STD_FILES as synonym of put_natural.

    	put_natural_64 (i: NATURAL_64)
    			-- Write `i' at end of default output.

    	put_natural_8 (i: NATURAL_8)
    			-- Write `i' at end of default output.

    	put_new_line
    			-- Write line feed at end of default output.
    			-- Was declared in STD_FILES as synonym of new_line.

    	put_real (r: REAL_32)
    			-- Write `r' at end of default output.
    			-- Was declared in STD_FILES as synonym of putreal.

    	put_string (s: STRING_8)
    			-- Write `s' at end of default output.
    			-- Was declared in STD_FILES as synonym of putstring.
    		require
    			string_not_void: s /= Void

    	putbool (b: BOOLEAN)
    			-- Write `b' at end of default output.
    			-- Was declared in STD_FILES as synonym of put_boolean.

    	putchar (c: CHARACTER_8)
    			-- Write `c' at end of default output.
    			-- Was declared in STD_FILES as synonym of put_character.

    	putdouble (d: REAL_64)
    			-- Write `d' at end of default output.
    			-- Was declared in STD_FILES as synonym of put_double.

    	putint (i: INTEGER_32)
    			-- Write `i' at end of default output.
    			-- Was declared in STD_FILES as synonym of put_integer and put_integer_32.

    	putreal (r: REAL_32)
    			-- Write `r' at end of default output.
    			-- Was declared in STD_FILES as synonym of put_real.

    	putstring (s: STRING_8)
    			-- Write `s' at end of default output.
    			-- Was declared in STD_FILES as synonym of put_string.
    		require
    			string_not_void: s /= Void

    	set_error_default
    			-- Use standard error as default output.

    	set_file_default (f: PLAIN_TEXT_FILE)
    			-- Use `f' as default output.
    		require
    			valid_argument: f /= Void
    			file_open_write: f.is_open_write

    	set_output_default
    			-- Use standard output as default output.

    feature -- Duplication

    	copy (other: like Current)
    			-- Update current object using fields of object attached
    			-- to `other', so as to yield equal objects.
    			-- (from ANY)
    		require -- from ANY
    			other_not_void: other /= Void
    			type_identity: same_type (other)
    		ensure -- from ANY
    			is_equal: is_equal (other)

    	frozen deep_copy (other: like Current)
    			-- Effect equivalent to that of:
    			--		copy (`other' . deep_twin)
    			-- (from ANY)
    		require -- from ANY
    			other_not_void: other /= Void
    		ensure -- from ANY
    			deep_equal: deep_equal (Current, other)

    	frozen deep_twin: like Current
    			-- New object structure recursively duplicated from Current.
    			-- (from ANY)
    		ensure -- from ANY
    			deep_equal: deep_equal (Current, Result)

    	frozen standard_copy (other: like Current)
    			-- Copy every field of `other' onto corresponding field
    			-- of current object.
    			-- (from ANY)
    		require -- from ANY
    			other_not_void: other /= Void
    			type_identity: same_type (other)
    		ensure -- from ANY
    			is_standard_equal: standard_is_equal (other)

    	frozen standard_twin: like Current
    			-- New object field-by-field identical to `other'.
    			-- Always uses default copying semantics.
    			-- (from ANY)
    		ensure -- from ANY
    			standard_twin_not_void: Result /= Void
    			equal: standard_equal (Result, Current)

    	frozen twin: like Current
    			-- New object equal to `Current'
    			-- twin calls copy; to change copying/twining semantics, redefine copy.
    			-- (from ANY)
    		ensure -- from ANY
    			twin_not_void: Result /= Void
    			is_equal: Result.is_equal (Current)

    feature -- Basic operations

    	frozen default: like Current
    			-- Default value of object's type
    			-- (from ANY)

    	frozen default_pointer: POINTER
    			-- Default value of type `POINTER'
    			-- (Avoid the need to write `p'.default for
    			-- some `p' of type `POINTER'.)
    			-- (from ANY)

    	default_rescue
    			-- Process exception for routines with no Rescue clause.
    			-- (Default: do nothing.)
    			-- (from ANY)

    	frozen do_nothing
    			-- Execute a null action.
    			-- (from ANY)

    feature -- Input

    	next_line
    			-- Move to next input line on standard input.
    			-- Was declared in STD_FILES as synonym of to_next_line.

    	read_character
    			-- Read a new character from standard input.
    			-- It will not return until read operation is
    			-- terminated when enter key is pressed.
    			-- Make result available in last_character.
    			-- last_character will also contains platform
    			-- specific newline character.
    			-- Was declared in STD_FILES as synonym of readchar.

    	read_double
    			-- Read a new double from standard input.
    			-- Make result available in last_double.
    			-- Was declared in STD_FILES as synonym of readdouble.

    	read_integer
    			-- Read a new 32-bit integer from standard input.
    			-- Make result available in last_integer.
    			-- Was declared in STD_FILES as synonym of readint and read_integer_32.

    	read_integer_16
    			-- Read a new 16-bit integer from standard input.
    			-- Make result available in last_integer_16.

    	read_integer_32
    			-- Read a new 32-bit integer from standard input.
    			-- Make result available in last_integer.
    			-- Was declared in STD_FILES as synonym of read_integer and readint.

    	read_integer_64
    			-- Read a new 64-bit integer from standard input.
    			-- Make result available in last_integer_64.

    	read_integer_8
    			-- Read a new 8-bit integer from standard input.
    			-- Make result available in last_integer_8.

    	read_line
    			-- Read a line from standard input.
    			-- Make result available in last_string.
    			-- Was declared in STD_FILES as synonym of readline.
    		ensure
    			last_string_not_void: last_string /= Void

    	read_natural
    			-- Read a new 32-bit natural from standard input.
    			-- Make result available in last_natural.
    			-- Was declared in STD_FILES as synonym of read_natural_32.

    	read_natural_16
    			-- Read a new 16-bit natural from standard input.
    			-- Make result available in last_natural_16.

    	read_natural_32
    			-- Read a new 32-bit natural from standard input.
    			-- Make result available in last_natural.
    			-- Was declared in STD_FILES as synonym of read_natural.

    	read_natural_64
    			-- Read a new 64-bit natural from standard input.
    			-- Make result available in last_natural_64.

    	read_natural_8
    			-- Read a new 8-bit natural from standard input.
    			-- Make result available in last_natural_8.

    	read_real
    			-- Read a new real from standard input.
    			-- Make result available in last_real.
    			-- Was declared in STD_FILES as synonym of readreal.

    	read_stream (nb_char: INTEGER_32)
    			-- Read a string of at most `nb_char' bound characters
    			-- from standard input.
    			-- Make result available in last_string.
    			-- Was declared in STD_FILES as synonym of readstream.
    		ensure
    			last_string_not_void: last_string /= Void

    	read_word
    			-- Read a new word from standard input.
    			-- Make result available in last_string.
    			-- Was declared in STD_FILES as synonym of readword.
    		ensure
    			last_string_not_void: last_string /= Void

    	readchar
    			-- Read a new character from standard input.
    			-- It will not return until read operation is
    			-- terminated when enter key is pressed.
    			-- Make result available in last_character.
    			-- last_character will also contains platform
    			-- specific newline character.
    			-- Was declared in STD_FILES as synonym of read_character.

    	readdouble
    			-- Read a new double from standard input.
    			-- Make result available in last_double.
    			-- Was declared in STD_FILES as synonym of read_double.

    	readint
    			-- Read a new 32-bit integer from standard input.
    			-- Make result available in last_integer.
    			-- Was declared in STD_FILES as synonym of read_integer and read_integer_32.

    	readline
    			-- Read a line from standard input.
    			-- Make result available in last_string.
    			-- Was declared in STD_FILES as synonym of read_line.
    		ensure
    			last_string_not_void: last_string /= Void

    	readreal
    			-- Read a new real from standard input.
    			-- Make result available in last_real.
    			-- Was declared in STD_FILES as synonym of read_real.

    	readstream (nb_char: INTEGER_32)
    			-- Read a string of at most `nb_char' bound characters
    			-- from standard input.
    			-- Make result available in last_string.
    			-- Was declared in STD_FILES as synonym of read_stream.
    		ensure
    			last_string_not_void: last_string /= Void

    	readword
    			-- Read a new word from standard input.
    			-- Make result available in last_string.
    			-- Was declared in STD_FILES as synonym of read_word.
    		ensure
    			last_string_not_void: last_string /= Void

    	to_next_line
    			-- Move to next input line on standard input.
    			-- Was declared in STD_FILES as synonym of next_line.

    feature -- Output

    	io: STD_FILES
    			-- Handle to standard file setup
    			-- (from ANY)

    	out: STRING_8
    			-- New string containing terse printable representation
    			-- of current object
    			-- Was declared in ANY as synonym of tagged_out.
    			-- (from ANY)

    	print (some: ANY)
    			-- Write terse external representation of `some'
    			-- on standard output.
    			-- (from ANY)

    	frozen tagged_out: STRING_8
    			-- New string containing terse printable representation
    			-- of current object
    			-- Was declared in ANY as synonym of out.
    			-- (from ANY)

    feature -- Platform

    	operating_environment: OPERATING_ENVIRONMENT
    			-- Objects available from the operating system
    			-- (from ANY)

    invariant
    		-- from ANY
    	reflexive_equality: standard_is_equal (Current)
    	reflexive_conformance: conforms_to (Current)

    indexing
    	library: "EiffelBase: Library of reusable components for Eiffel."
    	copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
    	license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
    	source: "[
    		Eiffel Software
    		356 Storke Road, Goleta, CA 93117 USA
    		Telephone 805-685-1006, Fax 805-685-6869
    		Website http://www.eiffel.com
    		Customer support http://support.eiffel.com
    	]"

    end -- class STD_FILES