GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
WAITPID_JOB
+
Point of view
All features
ANY
JOB
LOOP_ITEM
All features
class WAITPID_JOB
Summary
top
Direct parents
Inherit list:
JOB
Insert list:
PROCESS_WAIT
,
SINGLETON
Class invariant
top
current_is_not_an_expanded_type
is_real_singleton
priority /= Minimum_integer
Overview
top
Creation features
{
PROCESS_WAIT
}
make
Features
{
ANY
}
stop
arm
(a_timeout:
INTEGER_32
)
disarm
trigger
(a_timeout:
INTEGER_32
)
timeout
:
INTEGER_32
set_action
(a_tag:
ABSTRACT_STRING
, a_on_waitpid:
PROCEDURE
[
TUPLE 2
[
INTEGER_32
,
INTEGER_32
]], a_on_timeout:
PROCEDURE
[
TUPLE
])
unset_action
(a_tag:
ABSTRACT_STRING
)
has_action
(a_tag:
ABSTRACT_STRING
):
BOOLEAN
{
LOOP_ITEM
}
prepare
(events:
EVENTS_SET
)
Use
events
to describe condition that make this job ready to
continue
.
is_ready
(events:
EVENTS_SET
):
BOOLEAN
Check if this job is ready to continue his work.
continue
Continue to do the job.
done
:
BOOLEAN
done
returns
True
when the job is finished.
restart
Configure the job like in its initial state.
{}
make
timeout_event
:
EVENT_DESCRIPTOR
actions
:
HASHED_DICTIONARY
[
WAITPID_ACTION
,
FIXED_STRING
]
triggered
:
BOOLEAN
armed
:
BOOLEAN
running
:
BOOLEAN
{
JOB
,
LOOP_ITEM
}
priority
:
INTEGER_32
never change a job's priority after inserting it in loop_item.
{
LOOP_ITEM
}
infix "<"
(other:
JOB
):
BOOLEAN
Maximum:
{}
Maximum_character_code
:
INTEGER_16
Largest supported code for
CHARACTER
values.
Maximum_integer_8
:
INTEGER_8
Largest supported value of type
INTEGER_8
.
Maximum_integer_16
:
INTEGER_16
Largest supported value of type
INTEGER_16
.
Maximum_integer
:
INTEGER_32
Largest supported value of type INTEGER/
INTEGER_32
.
Maximum_integer_32
:
INTEGER_32
Largest supported value of type INTEGER/
INTEGER_32
.
Maximum_integer_64
:
INTEGER_64
Largest supported value of type
INTEGER_64
.
Maximum_real_32
:
REAL_32
Largest non-special (no NaNs nor infinity) supported value of type
REAL_32
.
Maximum_real
:
REAL_64
Largest non-special (no NaNs nor infinity) supported value of type REAL.
Maximum_real_64
:
REAL_64
Largest non-special (no NaNs nor infinity) supported value of type REAL.
Maximum_real_80
:
REAL_EXTENDED
Largest supported value of type
REAL_80
.
Minimum:
{}
Minimum_character_code
:
INTEGER_16
Smallest supported code for
CHARACTER
values.
Minimum_integer_8
:
INTEGER_8
Smallest supported value of type
INTEGER_8
.
Minimum_integer_16
:
INTEGER_16
Smallest supported value of type
INTEGER_16
.
Minimum_integer
:
INTEGER_32
Smallest supported value of type INTEGER/
INTEGER_32
.
Minimum_integer_32
:
INTEGER_32
Smallest supported value of type INTEGER/
INTEGER_32
.
Minimum_integer_64
:
INTEGER_64
Smallest supported value of type
INTEGER_64
.
Minimum_real_32
:
REAL_32
Smallest non-special (no NaNs nor infinity) supported value of type
REAL_32
.
Minimum_real
:
REAL_64
Smallest non-special (no NaNs nor infinity) supported value of type REAL.
Minimum_real_64
:
REAL_64
Smallest non-special (no NaNs nor infinity) supported value of type REAL.
Minimum_real_80
:
REAL_64
Smallest supported value of type
REAL_80
.
Bits:
{}
Boolean_bits
:
INTEGER_32
Number of bits in a value of type
BOOLEAN
.
Character_bits
:
INTEGER_32
Number of bits in a value of type
CHARACTER
.
Integer_bits
:
INTEGER_32
Number of bits in a value of type INTEGER.
Real_bits
:
INTEGER_32
Number of bits in a value of type REAL.
Pointer_bits
:
INTEGER_32
Number of bits in a value of type
POINTER
.
{
ANY
}
is_equal
(other: WAITPID_JOB):
BOOLEAN
Is
other
attached to an object considered equal to current object?
{}
is_real_singleton
:
BOOLEAN
singleton_memory_pool
:
HASHED_DICTIONARY
[
POINTER
,
STRING
]
This pool is unique in the whole system.
current_is_not_an_expanded_type
:
BOOLEAN
Check that the dynamic type of the
SINGLETON
is not an expanded type.
{
ANY
}
in
:
WAITPID_INPUT
job
: WAITPID_JOB
stop
effective procedure
{
ANY
}
top
arm
(a_timeout:
INTEGER_32
)
effective procedure
{
ANY
}
top
require
timeout
>= -1
ensure
timeout
= a_timeout
armed
not
triggered
disarm
effective procedure
{
ANY
}
top
require
armed
ensure
not
armed
trigger
(a_timeout:
INTEGER_32
)
effective procedure
{
ANY
}
top
require
timeout
>= -1
ensure
timeout
= a_timeout
triggered
not
armed
timeout
:
INTEGER_32
writable attribute
{
ANY
}
top
set_action
(a_tag:
ABSTRACT_STRING
, a_on_waitpid:
PROCEDURE
[
TUPLE 2
[
INTEGER_32
,
INTEGER_32
]], a_on_timeout:
PROCEDURE
[
TUPLE
])
effective procedure
{
ANY
}
top
require
a_tag /= Void
ensure
has_action
(a_tag)
unset_action
(a_tag:
ABSTRACT_STRING
)
effective procedure
{
ANY
}
top
require
a_tag /= Void
ensure
not
has_action
(a_tag)
has_action
(a_tag:
ABSTRACT_STRING
):
BOOLEAN
effective function
{
ANY
}
top
prepare
(events:
EVENTS_SET
)
effective procedure
{
LOOP_ITEM
}
top
Use
events
to describe condition that make this job ready to
continue
.
events
describe the conditions to be satisfied before running this job for one more step.
require
events /= Void
not events.queryable
not done
is_ready
(events:
EVENTS_SET
):
BOOLEAN
effective function
{
LOOP_ITEM
}
top
Check if this job is ready to continue his work.
events
describe the events which occurred.
require
events /= Void
events.queryable
not done
continue
effective procedure
{
LOOP_ITEM
}
top
Continue to do the job.
The work to do has to be small work and non blocking, it will continue on next call.
require
not done
done
:
BOOLEAN
writable attribute
{
LOOP_ITEM
}
top
done
returns
True
when the job is finished.
Then the job may be
restart
(ed) if it needs to run again.
restart
effective procedure
{
LOOP_ITEM
}
top
Configure the job like in its initial state.
Example: when some window dialog appears a second time, all jobs from this window are restarted.
require
done
ensure
not done
make
effective procedure
{}
top
timeout_event
:
EVENT_DESCRIPTOR
writable attribute
{}
top
actions
:
HASHED_DICTIONARY
[
WAITPID_ACTION
,
FIXED_STRING
]
writable attribute
{}
top
triggered
:
BOOLEAN
writable attribute
{}
top
armed
:
BOOLEAN
writable attribute
{}
top
running
:
BOOLEAN
writable attribute
{}
top
priority
:
INTEGER_32
writable attribute
{
JOB
,
LOOP_ITEM
}
top
never change a job's priority after inserting it in loop_item.
Priority should only be set at creation time.
infix "<"
(other:
JOB
):
BOOLEAN
effective function
{
LOOP_ITEM
}
top
Maximum_character_code
:
INTEGER_16
{}
top
Largest supported code for
CHARACTER
values.
ensure
meaningful:
Result >= 127
Maximum_integer_8
:
INTEGER_8
is 127
constant attribute
{}
top
Largest supported value of type
INTEGER_8
.
Maximum_integer_16
:
INTEGER_16
is 32767
constant attribute
{}
top
Largest supported value of type
INTEGER_16
.
Maximum_integer
:
INTEGER_32
is 2147483647
constant attribute
{}
top
Largest supported value of type INTEGER/
INTEGER_32
.
Maximum_integer_32
:
INTEGER_32
is 2147483647
constant attribute
{}
top
Largest supported value of type INTEGER/
INTEGER_32
.
Maximum_integer_64
:
INTEGER_64
is 9223372036854775807
constant attribute
{}
top
Largest supported value of type
INTEGER_64
.
Maximum_real_32
:
REAL_32
is {REAL_32 3.4028234663852885981170418348451692544e+38}
constant attribute
{}
top
Largest non-special (no NaNs nor infinity) supported value of type
REAL_32
.
Maximum_real
:
REAL_64
{}
top
Largest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: 1.79769313486231570....e+308
Maximum_real_64
:
REAL_64
{}
top
Largest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: 1.79769313486231570....e+308
Maximum_real_80
:
REAL_EXTENDED
{}
top
Largest supported value of type
REAL_80
.
ensure
meaningful:
Result >=
Maximum_real
Minimum_character_code
:
INTEGER_16
{}
top
Smallest supported code for
CHARACTER
values.
ensure
meaningful:
Result <= 0
Minimum_integer_8
:
INTEGER_8
is -128
constant attribute
{}
top
Smallest supported value of type
INTEGER_8
.
Minimum_integer_16
:
INTEGER_16
is -32768
constant attribute
{}
top
Smallest supported value of type
INTEGER_16
.
Minimum_integer
:
INTEGER_32
is -2147483648
constant attribute
{}
top
Smallest supported value of type INTEGER/
INTEGER_32
.
Minimum_integer_32
:
INTEGER_32
is -2147483648
constant attribute
{}
top
Smallest supported value of type INTEGER/
INTEGER_32
.
Minimum_integer_64
:
INTEGER_64
is -9223372036854775808
constant attribute
{}
top
Smallest supported value of type
INTEGER_64
.
Minimum_real_32
:
REAL_32
is {REAL_32 -3.40282346638528859811704183484516925440e+38}
constant attribute
{}
top
Smallest non-special (no NaNs nor infinity) supported value of type
REAL_32
.
Minimum_real
:
REAL_64
{}
top
Smallest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: -1.79769313486231570....e+308
Minimum_real_64
:
REAL_64
{}
top
Smallest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: -1.79769313486231570....e+308
Minimum_real_80
:
REAL_64
{}
top
Smallest supported value of type
REAL_80
.
ensure
meaningful:
Result <= 0.0
Boolean_bits
:
INTEGER_32
{}
top
Number of bits in a value of type
BOOLEAN
.
ensure
meaningful:
Result >= 1
Character_bits
:
INTEGER_32
{}
top
Number of bits in a value of type
CHARACTER
.
ensure
meaningful:
Result >= 1
large_enough:
{INTEGER_32 2} ^ Result >=
Maximum_character_code
Integer_bits
:
INTEGER_32
{}
top
Number of bits in a value of type INTEGER.
ensure
integer_definition:
Result = 32
Real_bits
:
INTEGER_32
is 64
constant attribute
{}
top
Number of bits in a value of type REAL.
Pointer_bits
:
INTEGER_32
{}
top
Number of bits in a value of type
POINTER
.
is_equal
(other: WAITPID_JOB):
BOOLEAN
effective function
{
ANY
}
top
Is
other
attached to an object considered equal to current object?
require
other /= Void
ensure
commutative:
generating_type = other.generating_type implies Result = other.is_equal(Current)
is_real_singleton
:
BOOLEAN
effective function
{}
top
ensure
assertion_check_only:
Result
singleton_memory_pool
:
HASHED_DICTIONARY
[
POINTER
,
STRING
]
once function
{}
top
This pool is unique in the whole system.
A memory is kept for each singleton type (type, not class) in the system.
current_is_not_an_expanded_type
:
BOOLEAN
effective function
{}
top
Check that the dynamic type of the
SINGLETON
is not an expanded type.
in
:
WAITPID_INPUT
once function
{
ANY
}
top
job
: WAITPID_JOB
once function
{
ANY
}
top