note description: "Stream of data stored in non Eiffel memory" library: "Free implementation of ELKS library" status: "See notice at end of class." legal: "See notice at end of class." date: "$Date: 2012-05-24 04:13:10 +0000 (Thu, 24 May 2012) $" revision: "$Revision: 91981 $" class interface MEMORY_STREAM create make, make_from_pointer feature -- Access count: INTEGER_32 -- Number of bytes in Current. capacity: INTEGER_32 -- Number of bytes in Current. area: POINTER -- Memory area that holds data. ensure non_void_area: Result /= default_pointer item alias "[]" (i: INTEGER_32): INTEGER_8 assign put -- Entry at index i. -- Was declared in MEMORY_STREAM as synonym of at. require valid_index: valid_index (i) at alias "@" (i: INTEGER_32): INTEGER_8 assign put -- Entry at index i. -- Was declared in MEMORY_STREAM as synonym of item. require valid_index: valid_index (i) feature -- Status report valid_index (i: INTEGER_32): BOOLEAN -- Is i within the bounds of Current? is_resizable: BOOLEAN -- Can Current be resized? feature -- Setting set_count (n: INTEGER_32) -- Was declared in MEMORY_STREAM as synonym of set_capacity. require valid_index: valid_index (n - 1) ensure capacity_set: capacity = n set_capacity (n: INTEGER_32) -- Was declared in MEMORY_STREAM as synonym of set_count. require valid_index: valid_index (n - 1) ensure capacity_set: capacity = n feature -- Element change put (v: INTEGER_8; i: INTEGER_32) -- Replace i-th entry by v. require valid_index: valid_index (i) ensure inserted: item (i) = v force (v: INTEGER_8; i: INTEGER_32) -- Replace i-th entry by v. -- If i is out of bound, reallocate Current. require positive_index: i > 0 ensure inserted: item (i) = v append (other: like Current) -- Append other at the end of Current. require other_not_void: other /= Void resizable: is_resizable feature -- Comparison is_equal (other: like Current): BOOLEAN -- Is other attached to an object considered -- equal to current object? feature -- Duplication copy (other: like Current) -- Copy other in Current feature -- Disposal dispose -- Release area. invariant non_void_internal_area: internal_area /= Void area_not_null: area /= default_pointer note copyright: "Copyright (c) 1984-2012, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class MEMORY_STREAM
Generated by ISE EiffelStudio