+
Point of view
ANY
expanded class NATIVE_ARRAY [E_]
Summary
Overview
creation features
exported features
Basic features:
Comparison:
Searching:
Removing:
Replacing:
  • replace_all (old_value: E_, new_value: E_, upper: INTEGER_32)
    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_, upper: INTEGER_32)
    Replace all occurrences of the element old_value by new_value using basic = for comparison.
Adding:
  • copy_at (at: INTEGER_32, src: NATIVE_ARRAY [E_], src_capacity: INTEGER_32)
    Copy range [0 .. src_capacity - 1] of src to range [at .. at + src_capacity - 1] of Current.
  • slice_copy (at: INTEGER_32, src: NATIVE_ARRAY [E_], src_min: INTEGER_32, src_max: INTEGER_32)
    Copy range [src_min .. src_max] of src to range [at .. at + src_max - src_min] of Current.
Other:
Interfacing with other languages:
  • test (e1: E_, e2: E_): BOOLEAN
    In order to avoid run-time type errors, feature safe_equal calls is_equal only when e1 and e2 have exactly the same dynamic type.
  • safe_equal (e1: E_, e2: E_): BOOLEAN
    In order to avoid run-time type errors, feature safe_equal calls is_equal only when e1 and e2 have exactly the same dynamic type.
element_sizeof: INTEGER_32
The size in number of bytes for type E_.
calloc (nb_elements: INTEGER_32): NATIVE_ARRAY [E_]
Allocate a new array of nb_elements of type E_.
item (index: INTEGER_32): E_
To read an item.
put (element: E_, index: INTEGER_32)
To write an item.
realloc (old_nb_elts: INTEGER_32, new_nb_elts: INTEGER_32): NATIVE_ARRAY [E_]
effective function
Assume Current is a valid NATIVE_ARRAY in range [0 .. old_nb_elts-1].
memcmp (other: NATIVE_ARRAY [E_], capacity: INTEGER_32): BOOLEAN
effective function
True if all elements in range [0 .. capacity-1] are identical using is_equal.
slice_memcmp (at: INTEGER_32, other: NATIVE_ARRAY [E_], other_lower: INTEGER_32, other_upper: INTEGER_32): BOOLEAN
effective function
True if all elements in range [0 .. other_upper - other_lower] are identical to the elements in range [other_lower .. other_upper] of other using is_equal.
fast_memcmp (other: NATIVE_ARRAY [E_], capacity: INTEGER_32): BOOLEAN
effective function
Same jobs as memcmp but uses infix "=" instead of is_equal.
slice_fast_memcmp (at: INTEGER_32, other: NATIVE_ARRAY [E_], other_lower: INTEGER_32, other_upper: INTEGER_32): BOOLEAN
effective function
Same jobs as slice_memcmp but uses infix "=" instead of is_equal.
deep_memcmp (other: NATIVE_ARRAY [E_], capacity: INTEGER_32): BOOLEAN
effective function
Same jobs as memcmp but uses is_deep_equal instead of is_equal.
slice_deep_memcmp (at: INTEGER_32, other: NATIVE_ARRAY [E_], other_lower: INTEGER_32, other_upper: INTEGER_32): BOOLEAN
effective function
Same jobs as slice_memcmp but uses is_deep_equal instead of is_equal.
first_index_of (element: E_, upper: INTEGER_32): INTEGER_32
effective function
Using is_equal for comparison, gives the index of the first occurrence of element at or after 0.
index_of (element: E_, start_index: INTEGER_32, upper: INTEGER_32): INTEGER_32
effective 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_, upper: INTEGER_32): INTEGER_32
effective function
Using is_equal for comparison, gives the index of the first occurrence of element at or before upper.
fast_index_of (element: E_, start_index: INTEGER_32, upper: INTEGER_32): INTEGER_32
effective 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_, upper: INTEGER_32): INTEGER_32
effective function
Using basic = for comparison, gives the index of the first occurrence of element at or before upper.
fast_first_index_of (element: E_, upper: INTEGER_32): INTEGER_32
effective function
Using basic = for comparison, gives the index of the first occurrence of element at or after 0.
has (element: E_, upper: INTEGER_32): BOOLEAN
effective function
Look for element using is_equal for comparison.
fast_has (element: E_, upper: INTEGER_32): BOOLEAN
effective function
Look for element using basic = for comparison.
remove_first (upper: INTEGER_32)
effective procedure
Assume upper is a valid index.
remove (index: INTEGER_32, upper: INTEGER_32)
effective procedure
Assume upper is a valid index.
replace_all (old_value: E_, new_value: E_, upper: INTEGER_32)
effective 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_, upper: INTEGER_32)
effective procedure
Replace all occurrences of the element old_value by new_value using basic = for comparison.
copy_at (at: INTEGER_32, src: NATIVE_ARRAY [E_], src_capacity: INTEGER_32)
effective procedure
Copy range [0 .. src_capacity - 1] of src to range [at .. at + src_capacity - 1] of Current.
slice_copy (at: INTEGER_32, src: NATIVE_ARRAY [E_], src_min: INTEGER_32, src_max: INTEGER_32)
effective procedure
Copy range [src_min .. src_max] of src to range [at .. at + src_max - src_min] of Current.
set_all_with (v: E_, upper: INTEGER_32)
effective procedure
Set all elements in range [0 .. upper] with value v.
set_slice_with (v: E_, lower: INTEGER_32, upper: INTEGER_32)
effective procedure
Set all elements in range [lower .. upper] with value v.
clear_all (upper: INTEGER_32)
effective procedure
Set all elements in range [0 .. upper] with the default value.
clear (lower: INTEGER_32, upper: INTEGER_32)
effective procedure
Set all elements in range [lower .. upper] with the default value.
copy_from (model: NATIVE_ARRAY [E_], upper: INTEGER_32)
effective procedure
Assume upper is a valid index both in Current and model.
deep_twin_from (capacity: INTEGER_32): NATIVE_ARRAY [E_]
effective function
To implement deep_twin.
move (lower: INTEGER_32, upper: INTEGER_32, offset: INTEGER_32)
effective procedure
Move range [lower .. upper] by offset positions.
occurrences (element: E_, upper: INTEGER_32): INTEGER_32
effective function
Number of occurrences of element in range [0 .. upper] using is_equal for comparison.
slice_occurrences (element: E_, lower: INTEGER_32, upper: INTEGER_32): INTEGER_32
effective function
Number of occurrences of element in range [lower .. upper] using is_equal for comparison.
fast_occurrences (element: E_, upper: INTEGER_32): INTEGER_32
effective function
Number of occurrences of element in range [0 .. upper] using basic "=" for comparison.
slice_fast_occurrences (element: E_, lower: INTEGER_32, upper: INTEGER_32): INTEGER_32
effective function
Number of occurrences of element in range [lower .. upper] using basic "=" for comparison.
all_default (upper: INTEGER_32): BOOLEAN
effective function
Do all items in range [0 .. upper] have their type's default value?
slice_default (lower: INTEGER_32, upper: INTEGER_32): BOOLEAN
effective function
Do all items in range [lower .. upper] have their type's default value?
to_external: POINTER
effective function
Gives access to the C pointer on the area of storage.
from_pointer (pointer: POINTER): NATIVE_ARRAY [E_]
Convert pointer into Current type.
is_not_null: BOOLEAN
effective function
is_null: BOOLEAN
effective function
test (e1: E_, e2: E_): BOOLEAN
effective function
In order to avoid run-time type errors, feature safe_equal calls is_equal only when e1 and e2 have exactly the same dynamic type.
safe_equal (e1: E_, e2: E_): BOOLEAN
effective function
In order to avoid run-time type errors, feature safe_equal calls is_equal only when e1 and e2 have exactly the same dynamic type.