note
	description: "[
		References to objects containing reference to object
		meant to be exchanged with non-Eiffel software.
	]"
	library: "Free implementation of ELKS library"
	status: "See notice at end of class."
	legal: "See notice at end of class."
	date: "$Date: 2018-04-28 20:48:52 +0000 (Sat, 28 Apr 2018) $"
	revision: "$Revision: 101697 $"

class interface
	POINTER_REF

create 
	default_create

feature -- Access

	item: POINTER
			-- Pointer value

	hash_code: INTEGER_32
			-- Hash code value
	
feature -- Element change

	frozen set_item (p: POINTER)
			-- Make p the item value.
	
feature -- Comparison

	is_equal (other: like Current): BOOLEAN
			-- Is other attached to an object of the same type
			-- as current object and identical to it?

	memory_compare (other: POINTER; a_size: INTEGER_32): BOOLEAN
			-- True if Current and other are identical on a_size bytes.
		require
			valid_size: a_size > 0
			valid_other: other /= default_pointer
	
feature -- Status report

	is_hashable: BOOLEAN
			-- May current object be hashed?
			-- (True if it is not its type's default.)

	is_default_pointer: BOOLEAN
			-- Is current default_pointer?
		ensure
			definition: Result = (item = default_pointer)
	
feature -- Operations

	plus alias "+" (offset: INTEGER_32): POINTER
			-- Pointer moved by an offset of offset bytes.
	
feature -- Conversion

	to_reference: POINTER_REF
			-- Associated reference of Current
		ensure
			to_reference_not_void: Result /= Void

	to_integer_32: INTEGER_32
			-- Convert item into an INTEGER_32 value.
	
feature -- Memory copy

	memory_copy (a_source: POINTER; a_size: INTEGER_32)
			-- Copy a_size bytes from a_source to Current.
			-- a_source and Current should not overlap.
		require
			valid_size: a_size >= 0
			valid_source: a_source /= default_pointer

	memory_move (a_source: POINTER; a_size: INTEGER_32)
			-- Copy a_size bytes from a_source to Current.
			-- a_source and Current can overlap.
		require
			valid_size: a_size >= 0
			valid_source: a_source /= default_pointer

	memory_set (val, n: INTEGER_32)
			-- Fill first n bytes of the memory pointed by Current
			-- with constant val.
		require
			valid_val: val >= 0
			valid_n: n >= 0
	
feature -- Allocation/free

	memory_alloc (a_size: INTEGER_32): POINTER
			-- Allocated size bytes using malloc.
		require
			valid_size: a_size > 0
		ensure
			instance_free: class

	memory_calloc (a_count, a_element_size: INTEGER_32): POINTER
			-- Allocate a_count elements of size a_element_size bytes using `calloc.
		require
			valid_element_count: a_count > 0
			valid_element_size: a_element_size > 0
		ensure
			instance_free: class

	memory_realloc (a_size: INTEGER_32): POINTER
			-- Realloc Current.
		require
			valid_size: a_size >= 0

	memory_free
			-- Free allocated memory with malloc.
	
feature -- Output

	out: STRING_8
			-- Printable representation of pointer value
	
note
	copyright: "Copyright (c) 1984-2018, 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 POINTER_REF

Generated by ISE EiffelStudio