From b5884019cd1c6fdc5422f1779b46eb16a367733c Mon Sep 17 00:00:00 2001 From: halw Date: Mon, 7 Mar 2011 18:09:48 +0000 Subject: [PATCH] Author:halw Date:2011-03-07T17:56:33.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@836 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../cecil/cecil-reference/eif-access.wiki | 2 +- .../cecil/cecil-reference/eif-adopt.wiki | 6 +- .../cecil-reference/eif-attribute-type.wiki | 4 +- .../cecil/cecil-reference/eif-attribute.wiki | 6 +- .../cecil/cecil-reference/eif-function.wiki | 124 ++++++++++++++++++ 5 files changed, 135 insertions(+), 7 deletions(-) create mode 100644 documentation/current/solutions/other-languages/cecil/cecil-reference/eif-function.wiki diff --git a/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-access.wiki b/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-access.wiki index bc536124..25374076 100644 --- a/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-access.wiki +++ b/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-access.wiki @@ -9,7 +9,7 @@ EIF_REFERENCE eif_access (EIF_OBJECT obj); ==Description== -The eif_access() macro accesses the Eiffel object obj. +The eif_access macro accesses the Eiffel object obj. ==Return value== The Eiffel reference (EIF_REFERENCE) protected by obj which can be passed to Eiffel routines. diff --git a/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-adopt.wiki b/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-adopt.wiki index 728789b8..4933b1c4 100644 --- a/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-adopt.wiki +++ b/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-adopt.wiki @@ -9,10 +9,10 @@ EIF_OBJECT eif_adopt (EIF_OBJECT obj); ==Description== -The eif_adopt() function adopts obj. By adopting it, the user prevents obj from being unprotected automatically by the Eiffel run-time. The run-time protects automatically the Eiffel objects passed to a C external before entering the external and unprotects them after exiting the C external. To keep this protection later on, you must call eif_adopt(). +The eif_adopt function adopts obj. By adopting it, the user prevents obj from being unprotected automatically by the Eiffel run-time. The run-time protects automatically the Eiffel objects passed to a C external before entering the external and unprotects them after exiting the C external. To keep this protection later on, you must call eif_adopt. ==Return value== -An EIF_OBJECT. This return value can be used later to access the nested, protected Eiffel reference with eif_access(). +An EIF_OBJECT. This return value can be used later to access the nested, protected Eiffel reference with [[eif_access]]. ==Conformance== ISE Eiffel 4.1 and later. @@ -24,3 +24,5 @@ ISE Eiffel 4.1 and later. [[eif_wean]] }} + + diff --git a/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-attribute-type.wiki b/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-attribute-type.wiki index 290c4aa5..e16ba38c 100644 --- a/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-attribute-type.wiki +++ b/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-attribute-type.wiki @@ -9,7 +9,7 @@ int eif_attribute_type (char *attr, EIF_TYPE_ID tid); ==Description== -The eif_attribute_type() function returns the type of the attribute attr, from the Eiffel type, which type identifier is tid. +The eif_attribute_type function returns the type of the attribute attr, from the Eiffel type, which type identifier is tid. ==Return value== @@ -35,3 +35,5 @@ ISE Eiffel 4.5 and later. [[eif_reference_function]] }} + + diff --git a/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-attribute.wiki b/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-attribute.wiki index 7a251fce..bb0c5637 100644 --- a/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-attribute.wiki +++ b/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-attribute.wiki @@ -9,7 +9,7 @@ EIFFEL_TYPE eif_attribute (EIF_REFERENCE object, char * name, EIFFEL_TYPE, int * ==Description== -The eif_attribute() macro returns the attribute of name name, which is of type EIFFEL_TYPE. +The eif_attribute macro returns the attribute of name name, which is of type EIFFEL_TYPE. EIFFEL_TYPE is the type of the Eiffel attribute. It can be one of the following: # EIF_INTEGER # EIF_CHARACTER @@ -30,9 +30,9 @@ Failing: (EIFFEL_TYPE) 0 ==Notes== -If the return value is an EIF_REFERENCE, you must protect it with eif_protect(). +If the return value is an EIF_REFERENCE, you must protect it with [[eif_protect]]. -You cannot access a constant attribute, or the result of a once function with eif_attribute(). +You cannot access a constant attribute, or the result of a once function with eif_attribute. ==Conformance== diff --git a/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-function.wiki b/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-function.wiki new file mode 100644 index 00000000..9130e675 --- /dev/null +++ b/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-function.wiki @@ -0,0 +1,124 @@ +[[Property:title|eif_*_function]] +[[Property:weight|15]] +[[Property:uuid|b3e29e7a-2ab6-c98e-483a-33139b279edc]] +==Overview== + +This page documents all CECIL functions of the form eif_*_function where "*" is a supported type such as "integer", "bit", "character", "real", etc. + +==Synopsis== + +#include "eif_cecil.h" + +EIF_REFERENCE_FUNCTION eif_reference_function (char * name, int * tid); + +EIF_INTEGER_FUNCTION eif_integer_function (char * name, int * tid); + +EIF_CHARACTER_FUNCTION eif_character_function (char * name, int * tid); + +EIF_REAL_FUNCTION eif_real_function (char * name, int * tid); + +EIF_DOUBLE_FUNCTION eif_double_function (char * name, int * tid); + +EIF_BOOLEAN_FUNCTION eif_boolean_function (char * name, int * tid); + +EIF_POINTER_FUNCTION eif_pointer_function (char * name, int * tid); + +EIF_BIT_FUNCTION eif_bit_function (char * name, int * tid); + + +==Description== + +These functions return the address of the Eiffel function of name name from the class, which type identifier is tid. + +{| border="1" +! Use this function !! For an Eiffel function returning +|- +| eif_reference_function +| Eiffel reference +|- +| eif_integer_function +| Eiffel integer +|- +| eif_character_function +| Eiffel character +|- +| eif_real_function +| Eiffel real +|- +| eif_double_function +| Eiffel double +|- +| eif_boolean_function +| Eiffel boolean +|- +| eif_pointer_function +| Eiffel pointer +|- +| eif_bit_function +| Eiffel bit +|} + + +If the visible exception is enabled, it raises an visible exception upon failure. + +==Return value== + +Successful: The address of the function. + +Failing: NULL (function does not exist or is not visible). + +==Notes== + +The Eiffel function cannot be a C external. In this case, you must directly call the C routine. + +The return value is an address: to use it as a routine, you must call it with arguments or at least with (). + +No argument type checking is done. You may cast the address of an Eiffel routine, obtained with these functions, when calling it with real arguments. + +If the function returns an Eiffel reference, you must protect it with [[eif_protect]]. + +==Conformance== +ISE Eiffel 4.4 and later. + +==Compatibility== + +Compatibility with deprecated functions is shown in this table. + + +{| border="1" +! Function name !! Equivalent deprecated function name +|- +| eif_reference_function +| eif_fn_ref +|- +| eif_integer_function +| eif_fn_int +|- +| eif_real_function +| eif_fn_float +|- +| eif_double_function +| eif_fn_double +|- +| eif_character_function +| eif_fn_char +|- +| eif_bit_function +| eif_fn_bit +|- +| eif_boolean_function +| eif_fn_bool +|- +| eif_pointer_function +| eif_fn_pointer +|} + + +{{SeeAlso|
+[[eif_type_id]]
+[[eif_protect]]
+[[eif_procedure]] }} + + + +