GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
STREAM_PROTOCOL
+
Point of view
URL
ANY
INTERNALS_HANDLER
TYPED_INTERNALS
RECYCLING_POOL
URL_VALIDITY
URL
All features
class STREAM_PROTOCOL
Summary
top
A protocol used for internal purposes: implementation of
STREAM
.url
Direct parents
Inherit list:
PROTOCOL
Class invariant
top
error /= Void implies not is_connected
Overview
top
Creation features
make
(a_stream:
STREAM
)
Exported features
name
:
FIXED_STRING
is_connected
:
BOOLEAN
error
:
STRING
valid_uri
(a_uri:
STRING
):
BOOLEAN
connect_to
(url:
URL
, read:
BOOLEAN
, write:
BOOLEAN
)
disconnect
input
:
INPUT_STREAM
output
:
OUTPUT_STREAM
locator
(a_uri:
STRING
):
RESOURCE_LOCATOR
PROTOCOL
is a factory of
RESOURCE_LOCATOR
recycle_locator
(a_locator:
RESOURCE_LOCATOR
)
name
:
FIXED_STRING
effective function
top
is_connected
:
BOOLEAN
effective function
top
error
:
STRING
effective function
top
valid_uri
(a_uri:
STRING
):
BOOLEAN
effective function
top
connect_to
(url:
URL
, read:
BOOLEAN
, write:
BOOLEAN
)
effective procedure
top
require
(
True
) or else (
url.uri /= Void
not is_connected
read or write
)
disconnect
effective procedure
top
require
is_connected
ensure
not is_connected
input
:
INPUT_STREAM
effective function
top
require
is_connected
output
:
OUTPUT_STREAM
effective function
top
require
is_connected
locator
(a_uri:
STRING
):
RESOURCE_LOCATOR
effective function
top
PROTOCOL
is a factory of
RESOURCE_LOCATOR
require
valid_uri(a_uri)
ensure
Result.uri.is_equal(a_uri)
recycle_locator
(a_locator:
RESOURCE_LOCATOR
)
effective procedure
top
require
a_locator /= Void