indexing
	description: "Platform independent abstraction of a shared library routine"
	status: "See notice at end of class"
	date: "$Date$"
	revision: "$Revision$"
deferred class interface
	SHARED_LIBRARY_ROUTINE
feature 
	make_by_name (lib: SHARED_LIBRARY; f_name: STRING; arg_types: ARRAY [INTEGER]; ret_type: INTEGER)
			f_namelib
		require
			library_exists: lib /= void
			meaningful: lib.meaningful
			function_name_non_void: f_name /= void
			function_name_non_empty: not f_name.is_empty
			valid_argument_array: arg_types /= void
			valid_argument_types: valid_argument_types (arg_types)
			valid_return_type: valid_return_type (ret_type)
		ensure
			consistent_f_name: f_name.is_equal (function_name)
			consistent_lib: lib = shared_library
			routine_not_called: not routine_called
	
feature 
	argument_types: ARRAY [INTEGER]
			
	function_name: STRING
			
	library_name: STRING
			
	return_type: INTEGER
			
	shared_library: SHARED_LIBRARY
			
	T_array: INTEGER is 0
			 SHARED_LIBRARY_CONSTANTS
	T_boolean: INTEGER is 1
			 SHARED_LIBRARY_CONSTANTS
	T_character: INTEGER is 2
			 SHARED_LIBRARY_CONSTANTS
	T_double: INTEGER is 3
			 SHARED_LIBRARY_CONSTANTS
	T_integer: INTEGER is 4
			 SHARED_LIBRARY_CONSTANTS
	T_no_type: INTEGER is 10
			 SHARED_LIBRARY_CONSTANTS
	T_pointer: INTEGER is 5
			 SHARED_LIBRARY_CONSTANTS
	T_real: INTEGER is 6
			 SHARED_LIBRARY_CONSTANTS
	T_reference: INTEGER is 7
			 SHARED_LIBRARY_CONSTANTS
	T_short_integer: INTEGER is 8
			 SHARED_LIBRARY_CONSTANTS
	T_string: INTEGER is 9
			 SHARED_LIBRARY_CONSTANTS
	
feature 
	argument_count: INTEGER
			
	boolean_result: BOOLEAN
			
		require
			routine_called: routine_called
			valid_return_type: return_type = t_boolean
	character_result: CHARACTER
			
		require
			routine_called: routine_called
			valid_return_type: return_type = t_character
	conforms_to_signature (arguments: ARRAY [ANY]): BOOLEAN
			arguments
		require
			valid_array: arguments /= void
	double_result: DOUBLE
			
		require
			routine_called: routine_called
			valid_return_type: return_type = t_double
	error_code: INTEGER
			
	integer_result: INTEGER
			
		require
			routine_called: routine_called
			valid_return_type: return_type = t_integer or return_type = t_short_integer
	Library_freed: INTEGER is 3
			 SHARED_LIBRARY_CONSTANTS
	meaningful: BOOLEAN
			
	No_error: INTEGER is 0
			 SHARED_LIBRARY_CONSTANTS
	No_library: INTEGER is 1
			 SHARED_LIBRARY_CONSTANTS
	No_routine: INTEGER is 2
			 SHARED_LIBRARY_CONSTANTS
	pointer_result: POINTER
			
		require
			routine_called: routine_called
			valid_return_type: return_type = t_pointer
	real_result: REAL
			
		require
			routine_called: routine_called
			valid_return_type: return_type = t_real
	reference_result: ANY
			
		require
			routine_called: routine_called
			valid_return_type: return_type = t_reference
	routine_called: BOOLEAN
			
	string_result: STRING
			
		require
			routine_called: routine_called
			valid_return_type: return_type = t_string
	valid_argument_types (args: ARRAY [INTEGER]): BOOLEAN
			args
	valid_return_type (ret_type: INTEGER): BOOLEAN
			ret_type
	
feature 
	call (args: ARRAY [ANY])
			args
		require
			meaningful: meaningful
			valid_array: args /= void
			conformant: conforms_to_signature (args)
		ensure
			routine_called: routine_called
	
invariant
	library_exists: shared_library /= void
	meaningful_only_if_no_error: meaningful implies (error_code = no_error)
	meaningful_library: meaningful implies shared_library.meaningful
		 ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)
indexing
	library: "[
			EiffelBase: Library of reusable components for Eiffel.
	]"
	status: "[
			Copyright 1986-2001 Interactive Software Engineering (ISE).
			For ISE customers the original versions are an ISE product
			covered by the ISE Eiffel license and support agreements.
	]"
	license: "[
			EiffelBase may now be used by anyone as FREE SOFTWARE to
			develop any product, public-domain or commercial, without
			payment to ISE, under the terms of the ISE Free Eiffel Library
			License (IFELL) at http://eiffel.com/products/base/license.html.
	]"
	source: "[
			Interactive Software Engineering Inc.
			ISE Building
			360 Storke Road, Goleta, CA 93117 USA
			Telephone 805-685-1006, Fax 805-685-6869
			Electronic mail <info@eiffel.com>
			Customer support http://support.eiffel.com
	]"
	info: "[
			For latest info see award-winning pages: http://eiffel.com
	]"
end -- SHARED_LIBRARY_ROUTINE