mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 15:22:31 +01:00
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
This commit is contained in:
@@ -9,7 +9,7 @@ EIF_REFERENCE eif_access (EIF_OBJECT obj);
|
||||
</code>
|
||||
|
||||
==Description==
|
||||
The <code lang="text">eif_access()</code> macro accesses the Eiffel object <code lang="text">obj</code>.
|
||||
The <code lang="text">eif_access</code> macro accesses the Eiffel object <code lang="text">obj</code>.
|
||||
|
||||
==Return value==
|
||||
The Eiffel reference (<code lang="text">EIF_REFERENCE</code>) protected by <code lang="text">obj</code> which can be passed to Eiffel routines.
|
||||
|
||||
@@ -9,10 +9,10 @@ EIF_OBJECT eif_adopt (EIF_OBJECT obj);
|
||||
</code>
|
||||
|
||||
==Description==
|
||||
The <code lang="text">eif_adopt()</code> function adopts <code lang="text">obj</code>. By adopting it, the user prevents <code lang="text">obj</code> 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 <code lang="text">eif_adopt()</code>.
|
||||
The <code lang="text">eif_adopt</code> function adopts <code lang="text">obj</code>. By adopting it, the user prevents <code lang="text">obj</code> 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 <code lang="text">eif_adopt</code>.
|
||||
|
||||
==Return value==
|
||||
An <code lang="text">EIF_OBJECT</code>. This return value can be used later to access the nested, protected Eiffel reference with <code lang="text">eif_access()</code>.
|
||||
An <code lang="text">EIF_OBJECT</code>. 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]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ int eif_attribute_type (char *attr, EIF_TYPE_ID tid);
|
||||
</code>
|
||||
|
||||
==Description==
|
||||
The <code lang="text">eif_attribute_type()</code> function returns the type of the attribute <code lang="text">attr</code>, from the Eiffel type, which type identifier is <code lang="text">tid</code>.
|
||||
The <code lang="text">eif_attribute_type</code> function returns the type of the attribute <code lang="text">attr</code>, from the Eiffel type, which type identifier is <code lang="text">tid</code>.
|
||||
|
||||
==Return value==
|
||||
|
||||
@@ -35,3 +35,5 @@ ISE Eiffel 4.5 and later.
|
||||
[[eif_reference_function]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ EIFFEL_TYPE eif_attribute (EIF_REFERENCE object, char * name, EIFFEL_TYPE, int *
|
||||
</code>
|
||||
|
||||
==Description==
|
||||
The <code lang="text">eif_attribute()</code> macro returns the attribute of name <code lang="text">name</code>, which is of type <code lang="text">EIFFEL_TYPE</code>.
|
||||
The <code lang="text">eif_attribute</code> macro returns the attribute of name <code lang="text">name</code>, which is of type <code lang="text">EIFFEL_TYPE</code>.
|
||||
<code lang="text">EIFFEL_TYPE</code> is the type of the Eiffel attribute. It can be one of the following:
|
||||
# <code lang="text">EIF_INTEGER</code>
|
||||
# <code lang="text">EIF_CHARACTER</code>
|
||||
@@ -30,9 +30,9 @@ Failing: (<code lang="text">EIFFEL_TYPE</code>) 0
|
||||
|
||||
==Notes==
|
||||
|
||||
If the return value is an <code lang="text">EIF_REFERENCE</code>, you must protect it with <code lang="text">eif_protect()</code>.
|
||||
If the return value is an <code lang="text">EIF_REFERENCE</code>, you must protect it with [[eif_protect]].
|
||||
|
||||
You cannot access a constant attribute, or the result of a once function with <code lang="text">eif_attribute()</code>.
|
||||
You cannot access a constant attribute, or the result of a once function with <code lang="text">eif_attribute</code>.
|
||||
|
||||
==Conformance==
|
||||
|
||||
|
||||
@@ -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==
|
||||
<code lang="text">
|
||||
#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);
|
||||
</code>
|
||||
|
||||
==Description==
|
||||
|
||||
These functions return the address of the Eiffel function of name <code lang="text">name</code> from the class, which type identifier is <code lang="text">tid</code>.
|
||||
|
||||
{| 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| <br/>
|
||||
[[eif_type_id]]<br/>
|
||||
[[eif_protect]]<br/>
|
||||
[[eif_procedure]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user