class STD_ERROR

Features exported to FILTER

To write on the standard error output. As for UNIX, the default standard error file is the screen.

Note: only one instance of this class should be necessary. Access it through ANY.std_error.

See also STANDARD_STREAMS

Direct parents

conformant parents

TERMINAL_OUTPUT_STREAM

non-conformant parents

REDIRECTION_TOOLS

Summary

creation features

exported features

To write a number:

Other features:

Details

make
is_connected: BOOLEAN

True if the stream is connected. Only in that case can data be transfered via this stream.

disconnect

Try to disconnect the stream. Note that it *does not* ensure that the stream will effectively be disconnected (some terminal streams, for instance, are always connected) but the feature can be used to "shake off" filters.

require

  • is_connected
  • can_disconnect

ensure

  • not is_filtered

filtered_descriptor: INTEGER

Find the descriptor of the terminal stream... Filters do not have descriptors of their own

require

  • is_connected
  • filtered_has_descriptor

filtered_has_descriptor: BOOLEAN

True if the underlying terminal stream has a descriptor

require

  • is_connected

filtered_stream_pointer: POINTER

Find the pointer of the terminal stream... Filters do not have pointers of their own

require

  • is_connected
  • filtered_has_stream_pointer

filtered_has_stream_pointer: BOOLEAN

True if the underlying terminal stream has a pointer

require

  • is_connected

can_put_character (c: CHARACTER): BOOLEAN
can_disconnect: BOOLEAN

True if the stream can be safely disconnected (without data loss, etc.)

require

  • is_connected

put_character (c: CHARACTER)

require

  • is_connected
  • not is_filtered and then can_put_character(c)

flush

Flushes the pipe. If is_filtered, calls the filter's flush instead.

require

  • is_connected

detach

Shake off the filter.

ensure

  • not is_filtered

filter: FILTER_OUTPUT_STREAM

The filter that uses this stream as backend

deferred is_connected: BOOLEAN

True if the stream is connected. Only in that case can data be transfered via this stream.

deferred disconnect

Try to disconnect the stream. Note that it *does not* ensure that the stream will effectively be disconnected (some terminal streams, for instance, are always connected) but the feature can be used to "shake off" filters.

require

  • is_connected
  • can_disconnect

ensure

  • not is_filtered

is_filtered: BOOLEAN

True if some filter is using this stream as backend. use that filter instead.

deferred detach

Shake off the filter.

ensure

  • not is_filtered

descriptor: INTEGER

Some OS-dependent descriptor. Mainly used by the sequencer library (see READY_CONDITION).

require

  • is_connected
  • has_descriptor

has_descriptor: BOOLEAN

True if that stream can be associated to some OS-meaningful descriptor.

require

  • is_connected

deferred can_disconnect: BOOLEAN

True if the stream can be safely disconnected (without data loss, etc.)

require

  • is_connected

set_filter (a_filter: FILTER)

Used by the filter itself to get attached

require

  • a_filter /= Void

ensure

  • filter = a_filter

filter: FILTER

The filter that uses this stream as backend

deferred filtered_descriptor: INTEGER

Find the descriptor of the terminal stream... Filters do not have descriptors of their own

require

  • is_connected
  • filtered_has_descriptor

deferred filtered_has_descriptor: BOOLEAN

True if the underlying terminal stream has a descriptor

require

  • is_connected

deferred filtered_stream_pointer: POINTER

Find the pointer of the terminal stream... Filters do not have pointers of their own

require

  • is_connected
  • filtered_has_stream_pointer

deferred filtered_has_stream_pointer: BOOLEAN

True if the underlying terminal stream has a pointer

require

  • is_connected

deferred put_character (c: CHARACTER)

require

  • is_connected
  • not is_filtered and then can_put_character(c)

deferred flush

Flushes the pipe. If is_filtered, calls the filter's flush instead.

require

  • is_connected

deferred can_put_character (c: CHARACTER): BOOLEAN
deferred is_filtered: BOOLEAN
deferred is_connected: BOOLEAN
put_string (s: STRING)

Output s to current output device.

require

  • is_connected
  • not is_filtered
  • s /= Void

put_unicode_string (unicode_string: UNICODE_STRING)

Output the UTF-8 encoding of the unicode_string.

require

  • is_connected
  • not is_filtered
  • unicode_string /= Void

put_line (s: STRING)

Output the string followed by a '%N'.

frozen put_integer (i: INTEGER_64)

Output i to current output device.

require

  • is_connected
  • not is_filtered

frozen put_integer_format (i: INTEGER_64, s: INTEGER)

Output i to current output device using at most s character.

require

  • is_connected
  • not is_filtered

put_real (r: REAL)

Output r to current output device.

require

  • is_connected
  • not is_filtered

put_real_format (r: REAL, f: INTEGER)

Output r with only f digit for the fractionnal part. Examples:

   put_real(3.519,2) print "3.51".

require

  • is_connected
  • not is_filtered
  • f >= 0

put_double (d: REAL)
This feature is obsolete: Now use `put_real' (October 2004).
put_double_format (d: REAL, f: INTEGER)
This feature is obsolete: Now use `put_real_format' (October 2004).
put_real_scientific (r: REAL, f: INTEGER)

Output r using the scientific notation with only f digit for the fractionnal part. Examples:

   put_real_scientific(3.519,2) print "3.16e+00".

require

  • is_connected
  • not is_filtered
  • f >= 0

put_number (number: NUMBER)

Output the number.

require

  • is_connected
  • not is_filtered
  • number /= Void

put_boolean (b: BOOLEAN)

Output b to current output device according to the Eiffel format.

require

  • is_connected
  • not is_filtered

put_pointer (p: POINTER)

Output a viewable version of p.

require

  • is_connected
  • not is_filtered

put_new_line

Output a newline character.

require

  • is_connected
  • not is_filtered

put_spaces (nb: INTEGER)

Output nb spaces character.

require

  • is_connected
  • not is_filtered
  • nb >= 0

append_file (file_name: STRING)

require

  • is_connected
  • not is_filtered
  • (create {FILE_TOOLS}.default_create).is_readable(file_name)