class STD_ERROR
Summary
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
Inherit list: TERMINAL_OUTPUT_STREAM
Insert list: REDIRECTION_TOOLS
Overview
Creation features
{ANY}
Features
{ANY}
{FILTER_OUTPUT_STREAM}
{ABSTRACT_STRING}
{FILTER}
{STREAM_HANDLER}
{}
{ANY}
{ANY}
{FILTER}
{ANY}
{}
{ANY}
{}
{STREAM_HANDLER}
{ANY}
{}
{RECYCLING_POOL}
  • recycle
    Do whatever needs to be done to free resources or recycle other objects when recycling this one
{}
{ANY}
{ABSTRACT_STRING}
{ANY}
To write a number:
{ANY}
Other features:
{ANY}
{}
{}
{FILTER}
{STREAM_HANDLER}
{}
is_connected: BOOLEAN
is True
constant attribute
{ANY}
True if the stream is connected.
Only in that case can data be transferred via this stream.
disconnect
effective procedure
{ANY}
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
    • is_connected
    • can_disconnect
ensure
  • not is_filtered
filtered_put_character (c: CHARACTER)
effective procedure
require
  • is_connected
  • can_put_character(c)
filtered_flush
effective procedure
require
  • is_connected
put_natively_stored_string (s: NATIVELY_STORED_STRING)
effective procedure
require
  • s /= Void
filtered_descriptor: INTEGER_32
effective function
Find the descriptor of the terminal stream...
Filters do not have descriptors of their own
require
    • is_connected
    • filtered_has_descriptor
    • is_connected
    • filtered_has_descriptor
filtered_has_descriptor: BOOLEAN
is True
constant attribute
True if the underlying terminal stream has a descriptor
require
    • is_connected
    • is_connected
filtered_stream_pointer: POINTER
effective function
Find the pointer of the terminal stream...
Filters do not have pointers of their own
require
    • is_connected
    • filtered_has_stream_pointer
    • is_connected
    • filtered_has_stream_pointer
filtered_has_stream_pointer: BOOLEAN
is True
constant attribute
True if the underlying terminal stream has a pointer
require
    • is_connected
    • is_connected
redirect_to (file_name: STRING)
effective procedure
Redirect standard error to file_name instead of the default standard error.
 If file_name
does not exist, it is created.  If it exists, its previous content is erased.
See also redirection_succeeded
redirect_append_to (file_name: STRING)
effective procedure
Redirect standard error to file_name instead of the default standard error.
 If file_name
does not exist, it is created.  If it exists, the new error stream is appended to it.
See also redirection_succeeded
restore_default_error
effective procedure
Restore standard error to go to the default standard error.
make
effective procedure
{}
stderr: POINTER
{}
dispose
effective procedure
{}
Action to be executed just before garbage collection reclaims an object.
can_put_character (c: CHARACTER): BOOLEAN
effective function
{ANY}
can_disconnect: BOOLEAN
is True
constant attribute
{ANY}
True if the stream can be safely disconnected (without data loss, etc.)
require
    • is_connected
    • is_connected
put_character (c: CHARACTER)
effective procedure
{ANY}
require
  • is_connected
  • not is_filtered and then can_put_character(c)
flush
effective procedure
{ANY}
Flushes the pipe.
If is_filtered, calls the filter's flush instead.
require
  • is_connected
detach
effective procedure
{ANY}
Shake off the filter.
ensure
  • not is_filtered
writable attribute
The filter that uses this stream as backend
event_can_write: EVENT_DESCRIPTOR
effective function
{ANY}
writable attribute
{}
new_url: URL
effective function
{}
ensure
  • Result /= Void
as_output_stream: OUTPUT_STREAM
effective function
{}
ensure
  • yes_indeed_it_is_the_same_object: Result.to_pointer = to_pointer
descriptor: INTEGER_32
effective function
{ANY}
Some OS-dependent descriptor.
Mainly used by the sequencer library (see READY_CONDITION).
require
has_descriptor: BOOLEAN
effective function
{ANY}
True if that stream can be associated to some OS-meaningful descriptor.
require
url: URL
frozen
effective function
{ANY}
The URL to this stream as resource
ensure
  • not_void: Result /= Void
  • always_the_same: Result = url
url_memory: URL
writable attribute
{}
stream_pointer: POINTER
effective function
Some Back-end-dependent pointer (FILE* in C, InputStream or OutputStream in Java)
has_stream_pointer: BOOLEAN
effective function
True if that stream can be associated to some Back-end-meaningful stream pointer.
require
event_exception: EVENT_DESCRIPTOR
effective function
{ANY}
stream_exception: STREAM_EXCEPTION
writable attribute
{}
recycle
effective procedure
Do whatever needs to be done to free resources or recycle other objects when recycling this one
sequencer_descriptor (file: POINTER): INTEGER_32
{}
is_filtered: BOOLEAN
deferred function
{ANY}
put_abstract_string (s: ABSTRACT_STRING)
effective procedure
require
  • s /= Void
put_string (s: ABSTRACT_STRING)
effective procedure
{ANY}
Output s to current output device.
require
put_unicode_string (unicode_string: UNICODE_STRING)
effective procedure
{ANY}
Output the UTF-8 encoding of the unicode_string.
require
put_line (s: ABSTRACT_STRING)
effective procedure
{ANY}
Output the string followed by a '%N'.
%
put_integer (i: INTEGER_64)
frozen
effective procedure
{ANY}
Output i to current output device.
put_integer_format (i: INTEGER_64, s: INTEGER_32)
frozen
effective procedure
{ANY}
Output i to current output device using at most s character.
put_natural_8 (n: NATURAL_8)
frozen
effective procedure
{ANY}
Output n to current output device.
put_natural_8_format (n: NATURAL_8, s: INTEGER_32)
frozen
effective procedure
{ANY}
Output n to current output device using at most s character.
put_natural_16 (n: NATURAL_16)
frozen
effective procedure
{ANY}
Output n to current output device.
put_natural_16_format (n: NATURAL_16, s: INTEGER_32)
frozen
effective procedure
{ANY}
Output n to current output device using at most s character.
put_natural_32 (n: NATURAL_32)
frozen
effective procedure
{ANY}
Output n to current output device.
put_natural_32_format (n: NATURAL_32, s: INTEGER_32)
frozen
effective procedure
{ANY}
Output n to current output device using at most s character.
put_natural_64 (n: NATURAL_64)
frozen
effective procedure
{ANY}
Output n to current output device.
put_natural_64_format (n: NATURAL_64, s: INTEGER_32)
frozen
effective procedure
{ANY}
Output n to current output device using at most s character.
put_real (r: REAL_64)
effective procedure
{ANY}
Output r to current output device.
put_real_format (r: REAL_64, f: INTEGER_32)
effective procedure
{ANY}
Output r with only f digit for the fractional part.
Examples:
   put_real(3.519,2) print "3.51".
require
put_real_scientific (r: REAL_64, f: INTEGER_32)
effective procedure
{ANY}
Output r using the scientific notation with only f digit for the fractional part.
Examples:
   put_real_scientific(3.519,2) print "3.16e+00".
require
put_number (number: NUMBER)
effective procedure
{ANY}
Output the number.
require
put_boolean (b: BOOLEAN)
effective procedure
{ANY}
Output b to current output device according to the Eiffel format.
put_pointer (p: POINTER)
effective procedure
{ANY}
Output a viewable version of p.
put_new_line
effective procedure
{ANY}
Output a newline character.
put_spaces (nb: INTEGER_32)
effective procedure
{ANY}
Output nb spaces character.
require
append_file (file_name: STRING)
effective procedure
{ANY}
require
tmp_file_read: TEXT_FILE_READ
once function
{}
tmp_string: STRING
once function
{}
io_putc (byte: CHARACTER, stream: POINTER)
{}
io_fwrite (buf: NATIVE_ARRAY[CHARACTER], size: INTEGER_32, stream: POINTER): INTEGER_32
{}
io_flush (stream: POINTER)
{}
set_filter (a_filter: FILTER)
effective procedure
Used by the filter itself to get attached
require
  • a_filter /= Void
ensure
redirection_succeeded: BOOLEAN
writable attribute
Did the last call to redirect succeed?
restore_default
effective procedure
Cancel redirection
redirect (file_descriptor: INTEGER_32)
effective procedure
{}
Redirect to/from file_descriptor
save_default_descriptor
once procedure
{}
Always call this before calling dup2(..., filtered_descriptor)
default_descriptor: INTEGER_32
writable attribute
{}
A descriptor that refers to the same file as stdin initially does.
dup (descriptor_: INTEGER_32): INTEGER_32
{}
Return a new descriptor that refers to the same file as descriptor_.
dup2 (descriptor_1: INTEGER_32, descriptor_2: INTEGER_32)
{}
Make descriptor_2 point to the same file as descriptor_1.
open_descriptor_for_read (file_name: POINTER): INTEGER_32
{}
Open file_name for reading, returning a descriptor to it.
open_descriptor_for_create (file_name: POINTER): INTEGER_32
{}
Open file_name for writing, returning a descriptor to it.
The file is truncated if it already existed.
open_descriptor_for_append (file_name: POINTER): INTEGER_32
{}
Open file_name for writing, returning a descriptor to it.
New content is appended to the end of the file if it already existed.
open_descriptor_succeeded (descriptor_: INTEGER_32): BOOLEAN
{}
Did open returning descriptor_ succeed ?
close_descriptor (descriptor_: INTEGER_32)
{}
Close descriptor_, freeing it for later use.