GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
STANDARD_STREAMS
+
Point of view
All features
ANY
All features
class STANDARD_STREAMS
Summary
top
Thanks to this
standard_streams
singleton object, you can redirect
std_input_stream
,
std_output_stream
as well as
std_error_stream
.
See also the examples from our tutorial/io directory.
Direct parents
Insert list:
SINGLETON
Class invariant
top
current_is_not_an_expanded_type
is_real_singleton
Overview
top
Creation features
{
ANY
}
make
Features
{
ANY
}
std_input
:
INPUT_STREAM
std_output
:
OUTPUT_STREAM
std_error
:
OUTPUT_STREAM
{
ANY
}
set_std_input
(a_std_input:
INPUT_STREAM
)
restore_std_input
set_std_output
(a_std_output:
OUTPUT_STREAM
)
restore_std_output
set_std_error
(a_std_error:
OUTPUT_STREAM
)
restore_std_error
{}
make
{
ANY
}
is_equal
(other: STANDARD_STREAMS):
BOOLEAN
Is
other
attached to an object considered equal to current object?
{}
is_real_singleton
:
BOOLEAN
singleton_memory_pool
:
HASHED_DICTIONARY
[
POINTER
,
STRING
]
This pool is unique in the whole system.
current_is_not_an_expanded_type
:
BOOLEAN
Check that the dynamic type of the
SINGLETON
is not an expanded type.
std_input
:
INPUT_STREAM
writable attribute
{
ANY
}
top
std_output
:
OUTPUT_STREAM
writable attribute
{
ANY
}
top
std_error
:
OUTPUT_STREAM
writable attribute
{
ANY
}
top
set_std_input
(a_std_input:
INPUT_STREAM
)
effective procedure
{
ANY
}
top
require
a_std_input.is_connected
restore_std_input
effective procedure
{
ANY
}
top
set_std_output
(a_std_output:
OUTPUT_STREAM
)
effective procedure
{
ANY
}
top
require
a_std_output.is_connected
restore_std_output
effective procedure
{
ANY
}
top
set_std_error
(a_std_error:
OUTPUT_STREAM
)
effective procedure
{
ANY
}
top
require
a_std_error.is_connected
restore_std_error
effective procedure
{
ANY
}
top
make
effective procedure
{}
top
is_equal
(other: STANDARD_STREAMS):
BOOLEAN
effective function
{
ANY
}
top
Is
other
attached to an object considered equal to current object?
require
other /= Void
ensure
commutative:
generating_type = other.generating_type implies Result = other.is_equal(Current)
is_real_singleton
:
BOOLEAN
effective function
{}
top
ensure
assertion_check_only:
Result
singleton_memory_pool
:
HASHED_DICTIONARY
[
POINTER
,
STRING
]
once function
{}
top
This pool is unique in the whole system.
A memory is kept for each singleton type (type, not class) in the system.
current_is_not_an_expanded_type
:
BOOLEAN
effective function
{}
top
Check that the dynamic type of the
SINGLETON
is not an expanded type.