GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
COROUTINE_ITERATOR
+
Point of view
All features
ANY
COROUTINE
All features
class COROUTINE_ITERATOR [O_ ->
TUPLE
, Y_]
Summary
top
Direct parents
Inherit list:
ANY_COROUTINE_ITERATOR
,
ITERATOR
Class invariant
top
generation_only_grows
Overview
top
Creation features
{
COROUTINE
}
make
(a_coroutine: COROUTINE[O_, Y_], a_arguments: O_)
Features
{
ANY
}
start
Positions the iterator to the first object in the aggregate to be traversed.
is_off
:
BOOLEAN
Returns True when there are no more objects in the sequence.
item
: Y_
Returns the object at the current position in the sequence.
next
Positions the iterator to the next object in the sequence.
generation
:
INTEGER_32
iterable_generation
:
INTEGER_32
{}
context
:
POINTER
{
COROUTINE
}
set_item
(a_item: Y_)
yield
called by the plugin using CECIL
{}
invoke
{}
arguments
: O_
coroutine
: COROUTINE[O_, Y_]
make
(a_coroutine: COROUTINE[O_, Y_], a_arguments: O_)
init
initialize
do_start
(a_iterator: COROUTINE_ITERATOR [O_ ->
TUPLE
, Y_], a_coroutine: COROUTINE[O_, Y_]):
POINTER
do_continue
(a_context:
POINTER
):
BOOLEAN
do_yield
(a_context:
POINTER
)
{
ANY
}
is_valid
:
BOOLEAN
Agent-based features:
{
ANY
}
for_each
(action:
PROCEDURE
[
TUPLE
[TUPLE 1[E_]]])
Apply
action
to every item of
Current
.
for_all
(test:
FUNCTION
[
TUPLE
[TUPLE 1[E_]]]):
BOOLEAN
Do all items satisfy
test
?
exists
(test:
FUNCTION
[
TUPLE
[TUPLE 1[E_]]]):
BOOLEAN
Does at least one item satisfy
test
?
aggregate
(action:
FUNCTION
[
TUPLE
[TUPLE 2[E_, E_], E_]], initial: E_): E_
Aggregate all the elements starting from the initial value.
Invariant on
generation` dynamics
{}
generation_for_invariant
:
INTEGER_32
generation_only_grows
:
BOOLEAN
{
COROUTINE
}
fix_dumb_cecil
Because there is a bug somewhere in Liberty Eiffel, ensures that the CECIL code is correctly generated.
start
effective procedure
{
ANY
}
top
Positions the iterator to the first object in the aggregate to be traversed.
ensure
is_valid
is_off
:
BOOLEAN
writable attribute
{
ANY
}
top
Returns True when there are no more objects in the sequence.
require
is_valid
ensure
generation = old generation
is_valid
item
: Y_
writable attribute
{
ANY
}
top
Returns the object at the current position in the sequence.
require
is_valid
not is_off
ensure
generation = old generation
is_valid
next
effective procedure
{
ANY
}
top
Positions the iterator to the next object in the sequence.
require
is_valid
not is_off
ensure
generation = old generation
is_valid
generation
:
INTEGER_32
is 0
constant attribute
{
ANY
}
top
iterable_generation
:
INTEGER_32
is 0
constant attribute
{
ANY
}
top
context
:
POINTER
writable attribute
{}
top
set_item
(a_item: Y_)
effective procedure
{
COROUTINE
}
top
ensure
item
= a_item
yield
effective procedure
{
COROUTINE
}
top
invoke
effective procedure
{}
top
arguments
: O_
writable attribute
{}
top
coroutine
: COROUTINE[O_, Y_]
writable attribute
{}
top
make
(a_coroutine: COROUTINE[O_, Y_], a_arguments: O_)
effective procedure
{}
top
ensure
coroutine
= a_coroutine
arguments
= a_arguments
init
once procedure
{}
top
initialize
{}
top
do_start
(a_iterator: COROUTINE_ITERATOR [O_ ->
TUPLE
, Y_], a_coroutine: COROUTINE[O_, Y_]):
POINTER
{}
top
do_continue
(a_context:
POINTER
):
BOOLEAN
{}
top
do_yield
(a_context:
POINTER
)
{}
top
is_valid
:
BOOLEAN
frozen
effective function
{
ANY
}
top
for_each
(action:
PROCEDURE
[
TUPLE
[TUPLE 1[E_]]])
effective procedure
{
ANY
}
top
Apply
action
to every item of
Current
.
See also
for_all
,
exists
,
aggregate
.
for_all
(test:
FUNCTION
[
TUPLE
[TUPLE 1[E_]]]):
BOOLEAN
effective function
{
ANY
}
top
Do all items satisfy
test
?
See also
for_each
,
exists
,
aggregate
.
exists
(test:
FUNCTION
[
TUPLE
[TUPLE 1[E_]]]):
BOOLEAN
effective function
{
ANY
}
top
Does at least one item satisfy
test
?
See also
for_each
,
for_all
,
aggregate
.
aggregate
(action:
FUNCTION
[
TUPLE
[TUPLE 2[E_, E_], E_]], initial: E_): E_
effective function
{
ANY
}
top
Aggregate all the elements starting from the initial value.
See also
for_each
,
for_all
,
exists
.
generation_for_invariant
:
INTEGER_32
writable attribute
{}
top
generation_only_grows
:
BOOLEAN
effective function
{}
top
fix_dumb_cecil
effective procedure
{
COROUTINE
}
top
Because there is a bug somewhere in Liberty Eiffel, ensures that the CECIL code is correctly generated.