GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
EIFFEL_LIST_NODE
+
Point of view
All features
ANY
EIFFEL_GRAMMAR
EIFFEL_NODE_HANDLER
EIFFEL_NON_TERMINAL_NODE
EIFFEL_LIST_NODE
All features
deferred class EIFFEL_LIST_NODE
Summary
top
Direct parents
Inherit list:
EIFFEL_NODE
Insert list:
TRAVERSABLE
Known children
Inherit list:
EIFFEL_LIST_NODE_IMPL
Overview
top
Features
{
ANY
}
new_iterator
:
ITERATOR
[
EIFFEL_NODE
]
source_line
:
INTEGER_32
source_column
:
INTEGER_32
source_index
:
INTEGER_32
{
EIFFEL_GRAMMAR
}
add
(a_child:
EIFFEL_NODE
)
{
ANY
}
parent
:
EIFFEL_NODE
the parent node
forgotten
:
FAST_ARRAY
[
EIFFEL_NODE
]
used when this node is in a
EIFFEL_LIST_NODE
and nodes are between this node and the next one
name
:
FIXED_STRING
the name of the node in the grammar
{
EIFFEL_GRAMMAR
}
set_forgotten
(a_forgotten:
FAST_ARRAY
[
EIFFEL_NODE
])
Basic operations
{
EIFFEL_NODE_HANDLER
}
display
(output:
OUTPUT_STREAM
, indent:
INTEGER_32
, p:
STRING
)
Display the node in a tree fashion in the provided
output
stream
generate
(o:
OUTPUT_STREAM
)
Generate the node exactly as it was written, including blanks and
forgotten
nodes, onto the provided
output
stream
{
EIFFEL_NODE_HANDLER
}
generate_forgotten
(o:
OUTPUT_STREAM
)
{
EIFFEL_NON_TERMINAL_NODE
,
EIFFEL_LIST_NODE
}
set_parent
(a_parent:
EIFFEL_NODE
)
{}
do_indent
(output:
OUTPUT_STREAM
, indent:
INTEGER_32
, p:
STRING
)
{
ANY
}
accept
(visitor:
VISITOR
)
Accept to be visited by the
visitor
.
{
ANY
}
enumerate
: ENUMERATE[E_]
Other features:
{
ANY
}
get_new_iterator
: ITERATOR[E_]
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.
Printing:
{
ANY
}
out_in_tagged_out_memory
Append terse printable representation of current object in
tagged_out_memory
.
{
ANY
}
generation
:
INTEGER_32
{}
next_generation
Counting:
{
ANY
}
count
:
INTEGER_32
Number of available items in the hoard.
is_empty
:
BOOLEAN
Is the hoard empty ?
See also
count
.
Agent-based features:
{
ANY
}
do_all
(action:
ROUTINE
[
TUPLE
[TUPLE 1[E_]]])
Apply
action
to every item of
Current
.
{}
_inline_agent1
(a:
ROUTINE
[
TUPLE
[TUPLE 1[E_]]], e: E_)
Indexing:
{
ANY
}
lower
:
INTEGER_32
Minimum index.
upper
:
INTEGER_32
Maximum index.
valid_index
(i:
INTEGER_32
):
BOOLEAN
True when
i
is valid (i.e., inside actual bounds).
Accessing:
{
ANY
}
item
(i:
INTEGER_32
): E_
Item at the corresponding index
i
.
first
: E_
The very
first
item.
last
: E_
The
last
item.
new_iterator
:
ITERATOR
[
EIFFEL_NODE
]
frozen
effective function
{
ANY
}
top
ensure
Result /= Void
Result.generation = generation
source_line
:
INTEGER_32
effective function
{
ANY
}
top
source_column
:
INTEGER_32
effective function
{
ANY
}
top
source_index
:
INTEGER_32
effective function
{
ANY
}
top
add
(a_child:
EIFFEL_NODE
)
deferred procedure
{
EIFFEL_GRAMMAR
}
top
ensure
count
= old
count
+ 1
first
= a_child
because the grammar is right-recursive the last child is added first
parent
:
EIFFEL_NODE
writable attribute
{
ANY
}
top
the parent node
forgotten
:
FAST_ARRAY
[
EIFFEL_NODE
]
writable attribute
{
ANY
}
top
used when this node is in a
EIFFEL_LIST_NODE
and nodes are between this node and the next one
name
:
FIXED_STRING
deferred function
{
ANY
}
top
the name of the node in the grammar
ensure
name
/= Void
set_forgotten
(a_forgotten:
FAST_ARRAY
[
EIFFEL_NODE
])
effective procedure
{
EIFFEL_GRAMMAR
}
top
ensure
forgotten
= a_forgotten
display
(output:
OUTPUT_STREAM
, indent:
INTEGER_32
, p:
STRING
)
deferred procedure
{
EIFFEL_NODE_HANDLER
}
top
Display the node in a tree fashion in the provided
output
stream
generate
(o:
OUTPUT_STREAM
)
deferred procedure
{
EIFFEL_NODE_HANDLER
}
top
Generate the node exactly as it was written, including blanks and
forgotten
nodes, onto the provided
output
stream
generate_forgotten
(o:
OUTPUT_STREAM
)
effective procedure
{
EIFFEL_NODE_HANDLER
}
top
set_parent
(a_parent:
EIFFEL_NODE
)
effective procedure
{
EIFFEL_NON_TERMINAL_NODE
,
EIFFEL_LIST_NODE
}
top
require
a_parent /= Void
parent
= Void
ensure
parent
= a_parent
do_indent
(output:
OUTPUT_STREAM
, indent:
INTEGER_32
, p:
STRING
)
effective procedure
{}
top
accept
(visitor:
VISITOR
)
deferred procedure
{
ANY
}
top
Accept to be visited by the
visitor
.
require
visitor /= Void
enumerate
: ENUMERATE[E_]
effective function
{
ANY
}
top
get_new_iterator
: ITERATOR[E_]
frozen
effective function
{
ANY
}
top
This feature is obsolete:
Use `new_iterator' instead. This historical SmartEiffel feature is badly named.
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
.
require
action /= Void
for_all
(test:
FUNCTION
[
TUPLE
[TUPLE 1[E_]]]):
BOOLEAN
effective function
{
ANY
}
top
Do all items satisfy
test
?
See also
for_each
,
exists
,
aggregate
.
require
test /= Void
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
.
require
test /= Void
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
.
require
action /= Void
out_in_tagged_out_memory
effective procedure
{
ANY
}
top
Append terse printable representation of current object in
tagged_out_memory
.
require
locked:
tagged_out_locked
ensure
still_locked:
tagged_out_locked
not_cleared:
tagged_out_memory.count >= old tagged_out_memory.count
append_only:
old tagged_out_memory.twin.is_equal(tagged_out_memory.substring(1, old tagged_out_memory.count))
generation
:
INTEGER_32
writable attribute
{
ANY
}
top
next_generation
effective procedure
{}
top
ensure
generation
> old
generation
count
:
INTEGER_32
deferred function
{
ANY
}
top
Number of available items in the hoard.
See also
is_empty
ensure
Result >= 0
is_empty
:
BOOLEAN
deferred function
{
ANY
}
top
Is the hoard empty ?
See also
count
.
ensure
definition:
Result =
count
= 0
do_all
(action:
ROUTINE
[
TUPLE
[TUPLE 1[E_]]])
frozen
effective procedure
{
ANY
}
top
Apply
action
to every item of
Current
.
This feature is obsolete:
Use `for_each` instead. This feature is not secure because it accepts a FUNCTION, the result of which is lost.
_inline_agent1
(a:
ROUTINE
[
TUPLE
[TUPLE 1[E_]]], e: E_)
frozen
effective procedure
{}
top
lower
:
INTEGER_32
deferred function
{
ANY
}
top
Minimum index.
See also
upper
,
valid_index
,
item
.
upper
:
INTEGER_32
deferred function
{
ANY
}
top
Maximum index.
See also
lower
,
valid_index
,
item
.
valid_index
(i:
INTEGER_32
):
BOOLEAN
effective function
{
ANY
}
top
True when
i
is valid (i.e., inside actual bounds).
See also
lower
,
upper
,
item
.
ensure
definition:
Result =
lower
<= i and i <=
upper
item
(i:
INTEGER_32
): E_
deferred function
{
ANY
}
top
Item at the corresponding index
i
.
See also
lower
,
upper
,
valid_index
.
require
valid_index
(i)
first
: E_
deferred function
{
ANY
}
top
The very
first
item.
See also
last
,
item
.
require
not
is_empty
ensure
definition:
Result =
item
(
lower
)
last
: E_
deferred function
{
ANY
}
top
The
last
item.
See also
first
,
item
.
require
not
is_empty
ensure
definition:
Result =
item
(
upper
)