Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

kernel.spec.ise

Class KL_NATIVE_ARRAY_ROUTINES


Direct ancestors

KL_IMPORTED_NATIVE_ARRAY_TYPE

Features

Invariants

indexing

description

Routines that ought to be in class NATIVE_ARRAY. %
%A native array is a zero-based indexed sequence of values, %
%equipped with features put and item, but the clients %
%have to keep track of count.

library

Gobo Eiffel Kernel Library

copyright

Copyright (c) 2002, Eric Bezault and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2005/02/03 15:48:47 $

revision

$Revision: 1.9 $

class

KL_NATIVE_ARRAY_ROUTINES [G]

obsolete

[041219] Use SPECIAL and KL_SPECIAL_ROUTINES instead.

inherit

KL_IMPORTED_NATIVE_ARRAY_TYPE

feature -- Initialization

make (n: INTEGER): like NATIVE_ARRAY_TYPE

-- Create a new native array being able to contain n items.

require
non_negative_n: n >= 0
ensure
native_array_not_void: Result /= Void
valid_native_array: valid_native_array (Result)

feature -- Status report

valid_native_array (an_array: like NATIVE_ARRAY_TYPE): BOOLEAN

-- Make sure that the lower bound of an_array is zero.

require
an_array_not_void: an_array /= Void

feature -- Resizing

resize (an_array: like NATIVE_ARRAY_TYPE; old_size, new_size: INTEGER): like NATIVE_ARRAY_TYPE

-- Resize an_array so that it contains n items.
-- Do not lose any previously entered items.
-- Note: the returned native array might be an_array
-- or a newly created native array where items from
-- an_array have been copied to.

require
an_array_not_void: an_array /= Void
valid_native_array: valid_native_array (an_array)
old_size_positive: old_size >= 0
new_size_large_enough: new_size > old_size
ensure
native_array_not_void: Result /= Void
valid_native_array: valid_native_array (Result)

feature -- Type anchors

invariant


-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end