GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
SIGNAL_4
+
Point of view
All features
ANY
All features
class SIGNAL_4 [E_, F_, G_, H_]
Summary
top
See tutorial/signal/signals.txt for usage
Direct parents
Insert list:
ANY
Class invariant
top
callbacks
/= Void
Overview
top
Creation features
{
ANY
}
make
Initialize new signal object
Features
{}
callbacks
: FAST_ARRAY[
PROCEDURE
[
TUPLE
[TUPLE 4[E_, F_, G_, H_]]]]
index
:
INTEGER_32
work to do while emit is between index and last.
last
:
INTEGER_32
work to do while emit is between index and last.
make
Initialize new signal object
{
ANY
}
connect
(p:
PROCEDURE
[
TUPLE
[TUPLE 4[E_, F_, G_, H_]]])
Connect procedure to be called when signal is emitted See also last_connect_id
emit
(val1: E_, val2: F_, val3: G_, val4: H_)
Emit signal, ie.
last_connect_id
:
PROCEDURE
[
TUPLE
[TUPLE 4[E_, F_, G_, H_]]]
return identifier on the last connect which may be used for disconnect (unregister procedure)
disconnect
(connect_identifier:
PROCEDURE
[
TUPLE
[TUPLE 4[E_, F_, G_, H_]]])
Unregister procedure for this signal.
is_empty
:
BOOLEAN
return True if no callback is registered for this signal
callbacks
: FAST_ARRAY[
PROCEDURE
[
TUPLE
[TUPLE 4[E_, F_, G_, H_]]]]
writable attribute
{}
top
index
:
INTEGER_32
writable attribute
{}
top
work to do while emit is between index and last.
last
:
INTEGER_32
writable attribute
{}
top
work to do while emit is between index and last.
make
effective procedure
{}
top
Initialize new signal object
ensure
callbacks
.is_empty
connect
(p:
PROCEDURE
[
TUPLE
[TUPLE 4[E_, F_, G_, H_]]])
effective procedure
{
ANY
}
top
Connect procedure to be called when signal is emitted See also last_connect_id
require
p /= Void
ensure
not
callbacks
.is_empty
last_connect_id
= p
emit
(val1: E_, val2: F_, val3: G_, val4: H_)
effective procedure
{
ANY
}
top
Emit signal, ie.
already registered procedure will be called in registration order except if removed by another before.
last_connect_id
:
PROCEDURE
[
TUPLE
[TUPLE 4[E_, F_, G_, H_]]]
effective function
{
ANY
}
top
return identifier on the last connect which may be used for disconnect (unregister procedure)
require
not
is_empty
ensure
Result /= Void
disconnect
(connect_identifier:
PROCEDURE
[
TUPLE
[TUPLE 4[E_, F_, G_, H_]]])
effective procedure
{
ANY
}
top
Unregister procedure for this signal.
If the same procedure was registered many times, only first is removed.
ensure
old
callbacks
.fast_has(connect_identifier) implies
callbacks
.count = old
callbacks
.count - 1
old not
callbacks
.fast_has(connect_identifier) implies
callbacks
.count = old
callbacks
.count
is_empty
:
BOOLEAN
effective function
{
ANY
}
top
return True if no callback is registered for this signal