GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
PROTOCOL
+
Point of view
All features
ANY
RECYCLING_POOL
URL_VALIDITY
URL
All features
deferred class PROTOCOL
Summary
top
Direct parents
Insert list:
DISPOSABLE
,
RECYCLABLE
Known children
Inherit list:
FILE_PROTOCOL
,
STREAM_PROTOCOL
,
TCP_PROTOCOL
Class invariant
top
error
/= Void implies not
is_connected
Overview
top
Features
{
ANY
}
name
:
FIXED_STRING
is_connected
:
BOOLEAN
error
:
STRING
{
URL_VALIDITY
}
valid_uri
(a_uri:
STRING
):
BOOLEAN
{
URL
}
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
)
{
RECYCLING_POOL
}
recycle
Do whatever needs to be done to free resources or recycle other objects when recycling this one
{}
dispose
Action to be executed just before garbage collection reclaims an object.
name
:
FIXED_STRING
deferred function
{
ANY
}
top
is_connected
:
BOOLEAN
deferred function
{
ANY
}
top
error
:
STRING
deferred function
{
ANY
}
top
valid_uri
(a_uri:
STRING
):
BOOLEAN
deferred function
{
URL_VALIDITY
}
top
connect_to
(url:
URL
, read:
BOOLEAN
, write:
BOOLEAN
)
deferred procedure
{
URL
}
top
require
url.uri /= Void
not
is_connected
read or write
disconnect
deferred procedure
{
URL
}
top
require
is_connected
ensure
not
is_connected
input
:
INPUT_STREAM
deferred function
{
URL
}
top
require
is_connected
output
:
OUTPUT_STREAM
deferred function
{
URL
}
top
require
is_connected
locator
(a_uri:
STRING
):
RESOURCE_LOCATOR
deferred function
{
URL
}
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
)
deferred procedure
{
URL
}
top
require
a_locator /= Void
recycle
effective procedure
{
RECYCLING_POOL
}
top
Do whatever needs to be done to free resources or recycle other objects when recycling this one
dispose
effective procedure
{}
top
Action to be executed just before garbage collection reclaims an object.