GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
LOOP_STACK
+
Point of view
All features
ANY
All features
class LOOP_STACK
Summary
top
Manage
LOOP_ITEM
. When a new loop is pushed, all jobs in the currently running loop are suspended until the new loop ends (all jobs end or break).
Direct parents
Insert list:
ANY
Overview
top
Creation features
{
ANY
}
make
Features
{}
loop_stack
:
FAST_ARRAY
[
LOOP_ITEM
]
make
{
ANY
}
stop
:
BOOLEAN
new_loop
create new empty loop (ie without job) and push it on the stack
push_loop
(l:
LOOP_ITEM
)
l
is restarted and pushed on the stack
run
run
current_loop
(ie execute it's jobs)
add_job
(j:
JOB
)
Add a job to the current loop
break
Exit current loop
exit_all
TODO: Really needed feature ?
current_loop
:
LOOP_ITEM
TODO: change this function into an attribute to be more efficient
loop_stack
:
FAST_ARRAY
[
LOOP_ITEM
]
writable attribute
{}
top
make
effective procedure
{}
top
ensure
current_loop
/= Void
stop
:
BOOLEAN
writable attribute
{
ANY
}
top
new_loop
effective procedure
{
ANY
}
top
create new empty loop (ie without job) and push it on the stack
push_loop
(l:
LOOP_ITEM
)
effective procedure
{
ANY
}
top
l
is restarted and pushed on the stack
require
l /= Void
ensure
current_loop
= l
run
effective procedure
{
ANY
}
top
run
current_loop
(ie execute it's jobs)
require
current_loop
/= Void
ensure
loop_stack
.is_empty or
stop
add_job
(j:
JOB
)
effective procedure
{
ANY
}
top
Add a job to the current loop
require
j /= Void
break
effective procedure
{
ANY
}
top
Exit current loop
require
current_loop
/= Void
ensure
current_loop
/= old
current_loop
exit_all
effective procedure
{
ANY
}
top
TODO: Really needed feature ?
require
stop
= False
ensure
stop
= True
current_loop
:
LOOP_ITEM
effective function
{
ANY
}
top
TODO: change this function into an attribute to be more efficient