GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
LOG_OUTPUT
+
Point of view
LOG_INTERNAL_CONF
ANY
INTERNALS_HANDLER
TYPED_INTERNALS
RECYCLING_POOL
STREAM_HANDLER
FILTER
ABSTRACT_STRING
FILTER_OUTPUT_STREAM
LOG_LEVEL
LOGGER
LOG_INTERNAL_CONF
All features
class LOG_OUTPUT
Summary
top
Direct parents
Inherit list:
OUTPUT_STREAM
Insert list:
STRING_FORMATTER
Class invariant
top
format
/= Void
tag
/= Void
Overview
top
Creation features
make
(a_output_retriever:
FUNCTION
[
TUPLE
,
OUTPUT_STREAM
], a_tag:
FIXED_STRING
)
Exported features
is_connected
:
BOOLEAN
True if the stream is connected.
can_disconnect
:
BOOLEAN
True if the stream can be safely disconnected (without data loss, etc.)
disconnect
Try to disconnect the stream.
can_put_character
(c:
CHARACTER
):
BOOLEAN
tag
:
FIXED_STRING
format
:
FIXED_STRING
set_format
(a_format:
ABSTRACT_STRING
)
put_character
(c:
CHARACTER
)
flush
Flushes the pipe.
detach
Shake off the filter.
event_can_write
:
EVENT_DESCRIPTOR
descriptor
:
INTEGER_32
Some OS-dependent descriptor.
has_descriptor
:
BOOLEAN
True if that stream can be associated to some OS-meaningful descriptor.
url
:
URL
The
URL
to this stream as resource
event_exception
:
EVENT_DESCRIPTOR
is_filtered
:
BOOLEAN
put_string
(s:
ABSTRACT_STRING
)
Output
s
to current output device.
put_unicode_string
(unicode_string:
UNICODE_STRING
)
Output the UTF-8 encoding of the
unicode_string
.
put_line
(s:
ABSTRACT_STRING
)
Output the string followed by a
'%N'
.
To write a number:
put_integer
(i:
INTEGER_64
)
Output
i
to current output device.
put_integer_format
(i:
INTEGER_64
, s:
INTEGER_32
)
Output
i
to current output device using at most
s
character.
put_natural_8
(n:
NATURAL_8
)
Output
n
to current output device.
put_natural_8_format
(n:
NATURAL_8
, s:
INTEGER_32
)
Output
n
to current output device using at most
s
character.
put_natural_16
(n:
NATURAL_16
)
Output
n
to current output device.
put_natural_16_format
(n:
NATURAL_16
, s:
INTEGER_32
)
Output
n
to current output device using at most
s
character.
put_natural_32
(n:
NATURAL_32
)
Output
n
to current output device.
put_natural_32_format
(n:
NATURAL_32
, s:
INTEGER_32
)
Output
n
to current output device using at most
s
character.
put_natural_64
(n:
NATURAL_64
)
Output
n
to current output device.
put_natural_64_format
(n:
NATURAL_64
, s:
INTEGER_32
)
Output
n
to current output device using at most
s
character.
put_real
(r:
REAL_64
)
Output
r
to current output device.
put_real_format
(r:
REAL_64
, f:
INTEGER_32
)
Output
r
with only
f
digit for the fractional part.
put_real_scientific
(r:
REAL_64
, f:
INTEGER_32
)
Output
r
using the scientific notation with only
f
digit for the fractional part.
put_number
(number:
NUMBER
)
Output the
number
.
Other features:
put_boolean
(b:
BOOLEAN
)
Output
b
to current output device according to the Eiffel format.
put_pointer
(p:
POINTER
)
Output a viewable version of
p
.
put_new_line
Output a newline character.
put_spaces
(nb:
INTEGER_32
)
Output
nb
spaces character.
append_file
(file_name:
STRING
)
put_message
(message: TRAVERSABLE[E_], arguments: TRAVERSABLE[F_])
is_connected
:
BOOLEAN
effective function
top
True if the stream is connected.
Only in that case can data be transferred via this stream.
can_disconnect
:
BOOLEAN
is False
constant attribute
top
True if the stream can be safely disconnected (without data loss, etc.)
require
is_connected
is_connected
disconnect
effective procedure
top
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
can_put_character
(c:
CHARACTER
):
BOOLEAN
effective function
top
tag
:
FIXED_STRING
writable attribute
top
format
:
FIXED_STRING
writable attribute
top
set_format
(a_format:
ABSTRACT_STRING
)
effective procedure
top
require
a_format /= Void
ensure
format
.is_equal(a_format)
put_character
(c:
CHARACTER
)
effective procedure
top
require
is_connected
not is_filtered and then can_put_character(c)
flush
effective procedure
top
Flushes the pipe.
If
is_filtered
, calls the filter's
flush
instead.
require
is_connected
detach
effective procedure
top
Shake off the filter.
ensure
not is_filtered
event_can_write
:
EVENT_DESCRIPTOR
effective function
top
descriptor
:
INTEGER_32
effective function
top
Some OS-dependent descriptor.
Mainly used by the sequencer library (see READY_CONDITION).
require
is_connected
has_descriptor
has_descriptor
:
BOOLEAN
effective function
top
True if that stream can be associated to some OS-meaningful descriptor.
require
is_connected
url
:
URL
frozen
effective function
top
The
URL
to this stream as resource
ensure
not_void:
Result /= Void
always_the_same:
Result =
url
event_exception
:
EVENT_DESCRIPTOR
effective function
top
is_filtered
:
BOOLEAN
deferred function
top
put_string
(s:
ABSTRACT_STRING
)
effective procedure
top
Output
s
to current output device.
require
is_connected
not
is_filtered
s /= Void
put_unicode_string
(unicode_string:
UNICODE_STRING
)
effective procedure
top
Output the UTF-8 encoding of the
unicode_string
.
require
is_connected
not
is_filtered
unicode_string /= Void
put_line
(s:
ABSTRACT_STRING
)
effective procedure
top
Output the string followed by a
'%N'
.
%
put_integer
(i:
INTEGER_64
)
frozen
effective procedure
top
Output
i
to current output device.
require
is_connected
not
is_filtered
put_integer_format
(i:
INTEGER_64
, s:
INTEGER_32
)
frozen
effective procedure
top
Output
i
to current output device using at most
s
character.
require
is_connected
not
is_filtered
put_natural_8
(n:
NATURAL_8
)
frozen
effective procedure
top
Output
n
to current output device.
require
is_connected
not
is_filtered
put_natural_8_format
(n:
NATURAL_8
, s:
INTEGER_32
)
frozen
effective procedure
top
Output
n
to current output device using at most
s
character.
require
is_connected
not
is_filtered
put_natural_16
(n:
NATURAL_16
)
frozen
effective procedure
top
Output
n
to current output device.
require
is_connected
not
is_filtered
put_natural_16_format
(n:
NATURAL_16
, s:
INTEGER_32
)
frozen
effective procedure
top
Output
n
to current output device using at most
s
character.
require
is_connected
not
is_filtered
put_natural_32
(n:
NATURAL_32
)
frozen
effective procedure
top
Output
n
to current output device.
require
is_connected
not
is_filtered
put_natural_32_format
(n:
NATURAL_32
, s:
INTEGER_32
)
frozen
effective procedure
top
Output
n
to current output device using at most
s
character.
require
is_connected
not
is_filtered
put_natural_64
(n:
NATURAL_64
)
frozen
effective procedure
top
Output
n
to current output device.
require
is_connected
not
is_filtered
put_natural_64_format
(n:
NATURAL_64
, s:
INTEGER_32
)
frozen
effective procedure
top
Output
n
to current output device using at most
s
character.
require
is_connected
not
is_filtered
put_real
(r:
REAL_64
)
effective procedure
top
Output
r
to current output device.
require
is_connected
not
is_filtered
put_real_format
(r:
REAL_64
, f:
INTEGER_32
)
effective procedure
top
Output
r
with only
f
digit for the fractional part.
Examples:
put_real(3.519,2) print
"3.51"
.
require
is_connected
not
is_filtered
f >= 0
put_real_scientific
(r:
REAL_64
, f:
INTEGER_32
)
effective procedure
top
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
is_connected
not
is_filtered
f >= 0
put_number
(number:
NUMBER
)
effective procedure
top
Output the
number
.
require
is_connected
not
is_filtered
number /= Void
put_boolean
(b:
BOOLEAN
)
effective procedure
top
Output
b
to current output device according to the Eiffel format.
require
is_connected
not
is_filtered
put_pointer
(p:
POINTER
)
effective procedure
top
Output a viewable version of
p
.
require
is_connected
not
is_filtered
put_new_line
effective procedure
top
Output a newline character.
require
is_connected
not
is_filtered
put_spaces
(nb:
INTEGER_32
)
effective procedure
top
Output
nb
spaces character.
require
is_connected
not
is_filtered
nb >= 0
append_file
(file_name:
STRING
)
effective procedure
top
require
is_connected
not
is_filtered
(create {
FILE_TOOLS
}).is_readable(file_name)
put_message
(message: TRAVERSABLE[E_], arguments: TRAVERSABLE[F_])
effective procedure
top