INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

description: "Any medium that can perform input and/or output"
title: "EiffelBase: library of reusable components for Eiffel. ", "Based on EiffelBase library for ISE Eiffel, ", "used with permission. "
project: "EiffelBase Library"
copyright: "(c) 1986-1997 Interactive Software Engineering Inc. ", "Modifications and extensions: ", "(c) 1997 Object Tools ", "All rights reserved. Duplication and distribution prohibited", "May be used only with Visual Eiffel under terms of user ", "license "
cluster: eiffelbase
deferred class IO_MEDIUM
inherit

MEMORY
export
{NONE}
all
redefine
dispose
end
feature -- Access

name: STRING
-- Medium name
feature -- Status report

handle: INTEGER
-- Handle to medium
require
valid_handle: handle_available

handle_available: BOOLEAN
-- Is the handle available after class has been
-- created?

is_plain_text: BOOLEAN
-- Is file reserved for text (character sequences)?

last_character: CHARACTER

last_string: STRING

last_integer: INTEGER

last_real: REAL

last_double: DOUBLE

exists: BOOLEAN
-- Does medium exist?

is_open_read: BOOLEAN
-- Is this medium opened for input

is_open_write: BOOLEAN
-- Is this medium opened for output

is_readable: BOOLEAN
-- Is medium readable?
require
handle_exists: exists

is_executable: BOOLEAN
-- Is medium executable?
require
handle_exists: exists

is_writable: BOOLEAN
-- Is medium writable?
require
handle_exists: exists

readable: BOOLEAN
-- Is there a current item that may be read?
require
handle_exists: exists

extendible: BOOLEAN
-- May new items be added?

is_closed: BOOLEAN
-- Is the I/O medium open
feature -- Status setting

close
-- Close medium.
require
medium_is_open: not is_closed
feature -- Removal

dispose
-- Ensure this medium is closed when garbage collected.
feature -- Output

new_line
-- Write a new line character to medium
require
extendible: extendible

put_string, putstring (s: STRING)
-- Write `s' to medium.
require
extendible: extendible
non_void: s /= void

put_character, putchar (c: CHARACTER)
-- Write `c' to medium.
require
extendible: extendible

put_real, putreal (r: REAL)
-- Write `r' to medium.
require
extendible: extendible

put_integer, putint (i: INTEGER)
-- Write `i' to medium.
require
extendible: extendible

put_boolean, putbool (b: BOOLEAN)
-- Write `b' to medium.
require
extendible: extendible

put_double, putdouble (d: DOUBLE)
-- Write `d' to medium.
require
extendible: extendible
feature -- Input

read_real, readreal
-- Read a new real.
-- Make result available in `last_real'.
require
is_readable: readable

read_double, readdouble
-- Read a new double.
-- Make result available in `last_double'.
require
is_readable: readable

read_character, readchar
-- Read a new character.
-- Make result available in `last_character'.
require
is_readable: readable

read_integer, readint
-- Read a new integer.
-- Make result available in `last_integer'.
require
is_readable: readable

read_stream, readstream (nb_char: INTEGER)
-- Read a string of at most `nb_char' bound characters
-- or until end of medium is encountered.
-- Make result available in `last_string'.
require
is_readable: readable

read_line, readline
-- Read characters until a new line or
-- end of medium.
-- Make result available in `last_string'.
require
is_readable: readable
feature -- Obsolete

lastchar: CHARACTER
-- Last character read by `read_character'

laststring: STRING
-- Last string read

lastint: INTEGER
-- Last integer read by `read_integer'

lastreal: REAL
-- Last real read by `read_real'

lastdouble: DOUBLE
-- Last double read by `read_double'
end -- class IO_MEDIUM

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES