indexing
description: "[
Commonly used console input and output mechanisms.
This class may be used as ancestor by classes needing its facilities.
]"
legal: "See notice at end of class."
status: "See notice at end of class."
date: "$Date: 2006-01-22 18:25:44 -0800 (Sun, 22 Jan 2006) $"
revision: "$Revision: 56675 $"
class interface
CONSOLE
create {STD_FILES}
make_open_stdin (fn: STRING_8)
require FILE
string_exists: fn /= Void
string_not_empty: not fn.is_empty
ensure FILE
file_named: name = fn
exists: exists
open_read: is_open_read
make_open_stdout (fn: STRING_8)
require FILE
string_exists: fn /= Void
string_not_empty: not fn.is_empty
ensure FILE
file_named: name = fn
exists: exists
open_write: is_open_write
make_open_stderr (fn: STRING_8)
feature
make_open_stderr (fn: STRING_8)
make_open_stdin (fn: STRING_8)
require FILE
string_exists: fn /= Void
string_not_empty: not fn.is_empty
ensure FILE
file_named: name = fn
exists: exists
open_read: is_open_read
make_open_stdout (fn: STRING_8)
require FILE
string_exists: fn /= Void
string_not_empty: not fn.is_empty
ensure FILE
file_named: name = fn
exists: exists
open_write: is_open_write
feature {ANY}
file_pointer: POINTER
FILE
separator: CHARACTER_8
FILE
feature
generating_type: STRING_8
ANY
generator: STRING_8
ANY
feature
frozen deep_equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure 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
`some'`other'
ANY
ensure 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
`other'
ANY
require ANY
other_not_void: other /= Void
ensure 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
`some'`other'
ANY
ensure 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
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
same_type: Result implies same_type (other)
symmetric: Result implies other.standard_is_equal (Current)
feature
conforms_to (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
count: INTEGER_32 is 1
end_of_file: BOOLEAN
require FILE
opened: not is_closed
exists: BOOLEAN
require IO_MEDIUM
True
ensure then FILE
unchanged_mode: mode = old mode
same_type (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
definition: Result = (conforms_to (other) and other.conforms_to (Current))
feature {ANY}
extendible: BOOLEAN
FILE
require IO_MEDIUM
True
require COLLECTION
True
file_readable: BOOLEAN
FILE
is_closed: BOOLEAN
FILE
is_open_write: BOOLEAN
FILE
last_character: CHARACTER_8
read_character
IO_MEDIUM
last_double: REAL_64
read_double
IO_MEDIUM
last_integer: INTEGER_32
read_integer
IO_MEDIUM
last_integer_16: INTEGER_16
read_integer_16
IO_MEDIUM
last_integer_32: INTEGER_32
last_integer
IO_MEDIUM
last_integer_64: INTEGER_64
read_integer_64
IO_MEDIUM
last_integer_8: INTEGER_8
read_integer_8
IO_MEDIUM
last_natural: NATURAL_32
read_natural
IO_MEDIUM
last_natural_16: NATURAL_16
read_natural_16
IO_MEDIUM
last_natural_32: NATURAL_32
last_natural
IO_MEDIUM
last_natural_64: NATURAL_64
read_natural_64
IO_MEDIUM
last_natural_8: NATURAL_8
read_natural_8
IO_MEDIUM
last_real: REAL_32
read_real
IO_MEDIUM
last_string: STRING_8
IO_MEDIUM
readable: BOOLEAN
SEQUENCE
require ACTIVE
True
require IO_MEDIUM
handle_exists: exists
feature {ANY}
append (f: like Current)
`f'
FILE
require SEQUENCE
argument_not_void: f /= Void
require else FILE
target_is_closed: is_closed
source_is_closed: f.is_closed
ensure SEQUENCE
new_count: count >= old count
ensure then FILE
new_count: count = old count + f.count
files_closed: f.is_closed and is_closed
feature
dispose
require DISPOSABLE
True
feature
copy (other: like Current)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_equal: is_equal (other)
frozen deep_copy (other: like Current)
copy`other'deep_twin
ANY
require ANY
other_not_void: other /= Void
ensure ANY
deep_equal: deep_equal (Current, other)
frozen deep_twin: like Current
ANY
ensure ANY
deep_equal: deep_equal (Current, Result)
frozen standard_copy (other: like Current)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_standard_equal: standard_is_equal (other)
frozen standard_twin: like Current
`other'
ANY
ensure ANY
standard_twin_not_void: Result /= Void
equal: standard_equal (Result, Current)
frozen twin: like Current
`Current'
twincopycopy
ANY
ensure ANY
twin_not_void: Result /= Void
is_equal: Result.is_equal (Current)
feature
frozen default: like Current
ANY
frozen default_pointer: POINTER
`POINTER'
`p'default
`p'`POINTER'
ANY
default_rescue
ANY
frozen do_nothing
ANY
feature {ANY}
lastchar: CHARACTER_8
read_character
IO_MEDIUM
lastdouble: REAL_64
read_double
IO_MEDIUM
lastint: INTEGER_32
read_integer
IO_MEDIUM
lastreal: REAL_32
read_real
IO_MEDIUM
laststring: STRING_8
IO_MEDIUM
feature
next_line
require FILE
is_readable: file_readable
read_character
last_character
CONSOLEreadchar
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
read_double
last_double
CONSOLEreaddouble
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
read_line
last_string
last_string
CONSOLEreadline
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
require else
is_readable: file_readable
ensure IO_MEDIUM
last_string_not_void: last_string /= Void
read_real
last_real
CONSOLEreadreal
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
read_stream (nb_char: INTEGER_32)
`nb_char'
last_string
CONSOLEreadstream
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
ensure IO_MEDIUM
last_string_not_void: last_string /= Void
read_word
last_string
CONSOLEreadword
require FILE
is_readable: file_readable
ensure FILE
last_string_not_void: last_string /= Void
readchar
last_character
CONSOLEread_character
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
readdouble
last_double
CONSOLEread_double
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
readline
last_string
last_string
CONSOLEread_line
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
require else
is_readable: file_readable
ensure IO_MEDIUM
last_string_not_void: last_string /= Void
readreal
last_real
CONSOLEread_real
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
readstream (nb_char: INTEGER_32)
`nb_char'
last_string
CONSOLEread_stream
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
ensure IO_MEDIUM
last_string_not_void: last_string /= Void
readword
last_string
CONSOLEread_word
require FILE
is_readable: file_readable
ensure FILE
last_string_not_void: last_string /= Void
feature
io: STD_FILES
ANY
new_line
CONSOLEput_new_line
require IO_MEDIUM
extendible: extendible
out: STRING_8
ANYtagged_out
ANY
print (some: ANY)
`some'
ANY
put_boolean (b: BOOLEAN)
`b'
CONSOLEputbool
require IO_MEDIUM
extendible: extendible
put_character (c: CHARACTER_8)
`c'
CONSOLEputchar
require IO_MEDIUM
extendible: extendible
put_double (d: REAL_64)
`d'
CONSOLEputdouble
require IO_MEDIUM
extendible: extendible
put_new_line
CONSOLEnew_line
require IO_MEDIUM
extendible: extendible
put_real (r: REAL_32)
`r'
CONSOLEputreal
require IO_MEDIUM
extendible: extendible
put_string (s: STRING_8)
`s'
CONSOLEputstring
require IO_MEDIUM
extendible: extendible
non_void: s /= Void
putbool (b: BOOLEAN)
`b'
CONSOLEput_boolean
require IO_MEDIUM
extendible: extendible
putchar (c: CHARACTER_8)
`c'
CONSOLEput_character
require IO_MEDIUM
extendible: extendible
putdouble (d: REAL_64)
`d'
CONSOLEput_double
require IO_MEDIUM
extendible: extendible
putreal (r: REAL_32)
`r'
CONSOLEput_real
require IO_MEDIUM
extendible: extendible
putstring (s: STRING_8)
`s'
CONSOLEput_string
require IO_MEDIUM
extendible: extendible
non_void: s /= Void
frozen tagged_out: STRING_8
ANYout
ANY
feature
operating_environment: OPERATING_ENVIRONMENT
ANY
invariant
PLAIN_TEXT_FILE
plain_text: is_plain_text
FILE
valid_mode: closed_file <= mode and mode <= append_read_file
name_exists: name /= Void
name_not_empty: not name.is_empty
FINITE
empty_definition: is_empty = (count = 0)
non_negative_count: count >= 0
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
ACTIVE
writable_constraint: writable implies readable
empty_constraint: is_empty implies (not readable) and (not writable)
BILINEAR
not_both: not (after and before)
before_constraint: before implies off
LINEAR
after_constraint: after implies off
TRAVERSABLE
empty_constraint: is_empty implies off
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 CONSOLE