+
Point of view
ANY
class MACRO_COMMAND [C_ -> COMMAND]
Summary
Class invariant
Overview
creation features
exported features
Accessing:
Writing:
Adding:
  • add_first (element: E_)
    Add a new item in first position : count is increased by one and all other items are shifted right.
  • add_last (element: E_)
    Add a new item at the end : count is increased by one.
  • add (element: E_, index: INTEGER_32)
    Add a new element at rank index : count is increased by one and range [index .. upper] is shifted right by one position.
  • append_collection (other: COLLECTION[E_])
    Append other to Current.
Modification:
  • force (element: E_, index: INTEGER_32)
    Make element the item at index, enlarging the collection if necessary (new bounds except index are initialized with default values).
  • from_collection (model: TRAVERSABLE[E_])
    Initialize the current object with the contents of model.
Removing:
Looking and Searching:
Looking and comparison:
Printing:
Agents based features:
Other features:
  • replace_all (old_value: E_, new_value: E_)
    Replace all occurrences of the element old_value by new_value using is_equal for comparison.
  • fast_replace_all (old_value: E_, new_value: E_)
    Replace all occurrences of the element old_value by new_value using basic = for comparison.
  • move (lower_index: INTEGER_32, upper_index: INTEGER_32, distance: INTEGER_32)
    Move range lower_index ..
  • slice (min: INTEGER_32, max: INTEGER_32): MACRO_COMMAND [C_ -> COMMAND]
    New collection consisting of items at indexes in [min..max].
  • reverse
    Reverse the order of the elements.
Indexing:
Counting:
Accessing:
Other features:
Creation and modification:
Modification:
Implementation of deferred:
Interfacing with C:
execute
effective procedure
Execute the command.
copy (other: MACRO_COMMAND [C_ -> COMMAND])
effective procedure
Copy other onto Current.
is_equal (other: MACRO_COMMAND [C_ -> COMMAND]): BOOLEAN
effective function
Do both collections have the same lower, upper, and items?
infix "@" (i: INTEGER_32): E_
frozen
effective function
The infix notation which is actually just a synonym for item.
put (element: E_, i: INTEGER_32)
deferred procedure
Make element the item at index i.
swap (i1: INTEGER_32, i2: INTEGER_32)
effective procedure
Swap item at index i1 with item at index i2.
set_all_with (v: E_)
deferred procedure
Set all items with value v.
set_slice_with (v: E_, lower_index: INTEGER_32, upper_index: INTEGER_32)
effective procedure
Set all items in range [lower_index .. upper_index] with v.
clear_all
effective procedure
Set every item to its default value.
add_first (element: E_)
deferred procedure
Add a new item in first position : count is increased by one and all other items are shifted right.
add_last (element: E_)
deferred procedure
Add a new item at the end : count is increased by one.
add (element: E_, index: INTEGER_32)
deferred procedure
Add a new element at rank index : count is increased by one and range [index .. upper] is shifted right by one position.
append_collection (other: COLLECTION[E_])
effective procedure
Append other to Current.
force (element: E_, index: INTEGER_32)
deferred procedure
Make element the item at index, enlarging the collection if necessary (new bounds except index are initialized with default values).
from_collection (model: TRAVERSABLE[E_])
deferred procedure
Initialize the current object with the contents of model.
remove_first
deferred procedure
Remove the first element of the collection.
remove_head (n: INTEGER_32)
deferred procedure
Remove the n elements of the collection.
remove (index: INTEGER_32)
deferred procedure
Remove the item at position index.
remove_last
deferred procedure
Remove the last item.
remove_tail (n: INTEGER_32)
deferred procedure
Remove the last n item(s).
clear_count
deferred procedure
Discard all items (is_empty is True after that call).
clear_count_and_capacity
deferred procedure
Discard all items (is_empty is True after that call).
has (x: E_): BOOLEAN
effective function
Look for x using is_equal for comparison.
fast_has (x: E_): BOOLEAN
effective function
Look for x using basic = for comparison.
first_index_of (element: E_): INTEGER_32
deferred function
Give the index of the first occurrence of element using is_equal for comparison.
index_of (element: E_, start_index: INTEGER_32): INTEGER_32
deferred function
Using is_equal for comparison, gives the index of the first occurrence of element at or after start_index.
reverse_index_of (element: E_, start_index: INTEGER_32): INTEGER_32
deferred function
Using is_equal for comparison, gives the index of the first occurrence of element at or before start_index.
last_index_of (element: E_): INTEGER_32
effective function
Using is_equal for comparison, gives the index of the last occurrence of element at or before upper.
fast_first_index_of (element: E_): INTEGER_32
deferred function
Give the index of the first occurrence of element using basic = for comparison.
fast_index_of (element: E_, start_index: INTEGER_32): INTEGER_32
deferred function
Using basic = for comparison, gives the index of the first occurrence of element at or after start_index.
fast_reverse_index_of (element: E_, start_index: INTEGER_32): INTEGER_32
deferred function
Using basic = comparison, gives the index of the first occurrence of element at or before start_index.
fast_last_index_of (element: E_): INTEGER_32
effective function
Using basic = for comparison, gives the index of the last occurrence of element at or before upper.
is_equal_map (other: MACRO_COMMAND [C_ -> COMMAND]): BOOLEAN
deferred function
Do both collections have the same lower, upper, and items?
all_default: BOOLEAN
deferred function
Do all items have their type's default value?
same_items (other: COLLECTION[E_]): BOOLEAN
effective function
Do both collections have the same items?
occurrences (element: E_): INTEGER_32
deferred function
Number of occurrences of element using is_equal for comparison.
fast_occurrences (element: E_): INTEGER_32
deferred function
Number of occurrences of element using basic = for comparison.
fill_tagged_out_memory
frozen
effective procedure
Append a viewable information in tagged_out_memory in order to affect the behavior of out, tagged_out, etc.
do_all (action: ROUTINE[TUPLE[TUPLE 1[E_]]])
effective procedure
Apply action to every item of Current.
for_all (test: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
Do all items satisfy test?
exists (test: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
Does at least one item satisfy test?
replace_all (old_value: E_, new_value: E_)
deferred procedure
Replace all occurrences of the element old_value by new_value using is_equal for comparison.
fast_replace_all (old_value: E_, new_value: E_)
deferred procedure
Replace all occurrences of the element old_value by new_value using basic = for comparison.
move (lower_index: INTEGER_32, upper_index: INTEGER_32, distance: INTEGER_32)
effective procedure
Move range lower_index ..
slice (min: INTEGER_32, max: INTEGER_32): MACRO_COMMAND [C_ -> COMMAND]
deferred function
New collection consisting of items at indexes in [min..max].
reverse
deferred procedure
Reverse the order of the elements.
lower: INTEGER_32
deferred function
Minimum index.
upper: INTEGER_32
deferred function
Maximum index.
valid_index (i: INTEGER_32): BOOLEAN
effective function
True when i is valid (i.e., inside actual bounds).
count: INTEGER_32
deferred function
Number of available indices.
is_empty: BOOLEAN
deferred function
Is collection empty ?
See also count.
item (i: INTEGER_32): E_
deferred function
Item at the corresponding index i.
first: E_
deferred function
The very first item.
last: E_
deferred function
The last item.
get_new_iterator: ITERATOR[E_]
deferred function
make (new_count: INTEGER_32)
effective procedure
Make array with range [0 .. new_count - 1].
with_capacity (needed_capacity: INTEGER_32)
effective procedure
Create an empty array with at least needed_capacity.
resize (new_count: INTEGER_32)
effective procedure
Resize the array.
subarray (min: INTEGER_32, max: INTEGER_32): MACRO_COMMAND [C_ -> COMMAND]
effective function
New collection consisting of items at indexes in [min .. max].
capacity: INTEGER_32
writable attribute
Internal storage capacity in number of item.
to_external: POINTER
effective function
Gives C access into the internal storage of the ARRAY.