indexing
description: "IMalloc interface wrapper."
author: ""
date: "$Date$"
revision: "$Revision$"
class interface
WEL_IMALLOC
create
make
ensure WEL_STRUCTURE
not_shared: not shared
feature
make
ensure WEL_STRUCTURE
not_shared: not shared
feature
allocated (a_pointer: POINTER): BOOLEAN
a_pointer
allocated_buffer
True
allocated_not_reliable
allocated_buffer (an_integer: INTEGER): POINTER
an_integer
default_pointer
allocated_not_reliable: BOOLEAN
allocated
item: POINTER
WEL_ANY
reallocated_buffer (a_pointer: POINTER; an_integer: INTEGER): POINTER
an_integer
a_pointeran_integer
a_pointer
require
was_allocated: allocated (a_pointer)
size (a_pointer: POINTER): INTEGER
a_pointer
require
was_allocated: allocated (a_pointer)
feature
structure_size: INTEGER
ensure WEL_STRUCTURE
positive_result: Result > 0
feature
exists: BOOLEAN
item
WEL_ANY
ensure WEL_ANY
Result = (item /= default_pointer)
shared: BOOLEAN
item
item
destroy_item
item
WEL_ANY
feature
set_shared
shared
WEL_ANY
ensure WEL_ANY
shared: shared
set_unshared
shared
WEL_ANY
ensure WEL_ANY
unshared: not shared
feature
set_item (an_item: POINTER)
iteman_item
WEL_ANY
ensure WEL_ANY
item_set: item = an_item
feature
dispose
Current
Current
WEL_ANY
feature
to_integer: INTEGER
item
WEL_ANY
ensure WEL_ANY
Result = cwel_pointer_to_integer (item)
feature
initialize
WEL_STRUCTURE
require WEL_STRUCTURE
exists: exists
initialize_with_character (a_character: CHARACTER)
a_character
WEL_STRUCTURE
require WEL_STRUCTURE
exists: exists
memory_copy (source_pointer: POINTER; length: INTEGER)
lengthsource_pointeritem
WEL_STRUCTURE
require WEL_STRUCTURE
length_small_enough: length <= structure_size
length_large_enough: length > 0
exists: exists
feature
free_buffer (a_pointer: POINTER)
a_pointer
require
was_allocated: allocated (a_pointer)
invariant
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
end -- WEL_IMALLOC