updated to 22.12

git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2364 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
eifops
2022-12-22 13:24:07 +00:00
parent 3d4c795faf
commit ee2831d52f
2956 changed files with 63295 additions and 4 deletions

View File

@@ -0,0 +1,24 @@
[[Property:title|attribute_exists]]
[[Property:weight|-15]]
[[Property:uuid|7cdf93a7-6f63-869a-5443-b8908a086d18]]
==Overview==
<code lang="text">
#include "eif_cecil.h"
EIF_BOOLEAN attribute_exists (EIF_REFERENCE object, char * name);
</code>
==Description==
The <code lang="text">attribute_exists()</code> macro returns <code lang="text">EIF_TRUE</code> when the attribute of name <code lang="text">name</code> exists in the Eiffel object (reference) <code lang="text">object</code>.
==Return value==
<code lang="text">EIF_TRUE</code> or <code lang="text">EIF_FALSE</code>.
==Conformance==
ISE Eiffel 4.5 and later.
{{SeeAlso|<br/>
[[eif_attribute]] }}

View File

@@ -0,0 +1,28 @@
[[Property:title|eif_access]]
[[Property:weight|-14]]
[[Property:uuid|2f74eeb4-2508-bf32-adf2-87959cfb2593]]
==Synopsis==
<code lang="text">
#include "eif_hector.h"
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>.
==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.
==Conformance==
ISE Eiffel 4.1 and later.
{{SeeAlso| <br/>
[[eif_wean]]<br/>
[[eif_adopt]]<br/>
[[eif_protect]] }}

View File

@@ -0,0 +1,28 @@
[[Property:title|eif_adopt]]
[[Property:weight|-13]]
[[Property:uuid|dc8ef8a9-7082-2a27-4e45-8f1d4472dbda]]
==Synopsis==
<code lang="text">
#include "eif_hector.h"
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>.
==Return value==
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.
{{SeeAlso| <br/>
[[eif_access]]<br/>
[[eif_protect]]<br/>
[[eif_wean]] }}

View File

@@ -0,0 +1,39 @@
[[Property:title|eif_attribute_type]]
[[Property:weight|-11]]
[[Property:uuid|28b3840f-648f-dc4d-8c83-70532a5e8e63]]
==Synopsis==
<code lang="text">
#include "eif_cecil.h"
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>.
==Return value==
Sucessful: One of the following:
# <code lang="text">EIF_INTEGER_TYPE</code>
# <code lang="text">EIF_CHARACTER_TYPE</code>
# <code lang="text">EIF_BOOLEAN_TYPE</code>
# <code lang="text">EIF_DOUBLE_TYPE</code>
# <code lang="text">EIF_REAL_TYPE</code>
# <code lang="text">EIF_REFERENCE_TYPE</code>
# <code lang="text">EIF_EXPANDED_TYPE</code>
# <code lang="text">EIF_BIT_TYPE</code>
Failing: <code lang="text">EIF_NO_TYPE</code>
==Conformance==
ISE Eiffel 4.5 and later.
{{SeeAlso| <br/>
[[eif_protect]]<br/>
[[attribute_exists]]<br/>
[[eif_procedure]]<br/>
[[eif_*_function]] }}

View File

@@ -0,0 +1,62 @@
[[Property:title|eif_attribute]]
[[Property:weight|-12]]
[[Property:uuid|c843f272-8ac2-c30e-e71f-bd6c567e9de3]]
==Synopsis==
<code lang="text">
#include "eif_cecil.h"
EIFFEL_TYPE eif_attribute (EIF_REFERENCE object, char * name, EIFFEL_TYPE, int * status);
</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>.
<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>
# <code lang="text">EIF_BOOLEAN</code>
# <code lang="text">EIF_DOUBLE</code>
# <code lang="text">EIF_REAL</code>
# <code lang="text">EIF_REFERENCE</code>
If <code lang="text">status</code> is <code lang="text">NULL</code> then no status is set. Otherwise the status of the call is put into <code lang="text">*status</code>. Its value is one of the following:
# <code lang="text">EIF_NO_ATTRIBUTE</code>
# <code lang="text">EIF_CECIL_OK</code>
If the visible exception is enabled, then a visible exception is raised upon failure (<code lang="text">EIF_NO_ATTRIBUTE</code>, <code lang="text">EIF_CECIL_ERROR</code>).
==Return value==
Successful: the Eiffel attribute.
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 [[eif_protect]].
You cannot access a constant attribute, or the result of a once function with <code lang="text">eif_attribute</code>.
==Conformance==
ISE Eiffel 4.5 and later.
==Compatibility==
<code lang="text">
eif_attribute (object, name, type, NULL)
</code>
is equivalent to:
<code lang="text">
eif_field (object, name, type)
</code>
which is deprecated.
{{SeeAlso| <br/>
[[eif_protect]]<br/>
[[attribute_exists]]<br/>
[[eif_procedure]]<br/>
[[eif_*_function]] }}

View File

@@ -0,0 +1,30 @@
[[Property:title|eif_create]]
[[Property:weight|-7]]
[[Property:uuid|b928f4b9-2830-5723-6f02-57eac618b116]]
==Synopsis==
<code lang="text">
#include "eif_cecil. h"
EIF_OBJECT eif_create (EIF_TYPE_ID tid);
</code>
==Description==
The <code lang="text">eif_create</code> function creates an Eiffel object, which type identifier is <code lang="text">tid</code>.
==Return value==
It returns an Eiffel object, which is already protected.
==Notes==
You cannot pass the return value to Eiffel routines as is: you must call [[eif_access]] to pass it to Eiffel routine.
To release the protection of an Eiffel object created with <code lang="text">eif_create</code>, call [[eif_wean]]. It will be collected during the next collection.
==Conformance==
ISE Eiffel 4.1 and later.
{{SeeAlso| <br/>
[[eif_wean]]<br/>
[[eif_type_id]] }}

View File

@@ -0,0 +1,32 @@
[[Property:title|eif_disable_visible_exception]]
[[Property:weight|-6]]
[[Property:uuid|6b8323d9-1963-c6b8-0198-f07895916c46]]
==Synopsis==
<code lang="text">
#include "eif_cecil.h"
void eif_enable_visible_exception ();
void eif_disable_visible_exception ();
</code>
==Description==
The [[eif_enable_visible_exception]] routine enables the visible exception, while [[eif_disable_visible_exception]] disables it. These routines can be used for debugging purpose. A visible exception is raised when the user tries to access to an Eiffel attribute or a Eiffel routine address which is not visible.
The visible exception is disabled by default.
==Conformance==
ISE Eiffel 4.5 and later.
==Compatibility==
In ISE Eiffel 4.3 and 4.4, the visible exception is enabled by default.
{{SeeAlso| <br/>
[[eif_attribute]] <br/>
[[eif_procedure]] <br/>
[[eif_*_function]] }}

View File

@@ -0,0 +1,33 @@
[[Property:title|eif_enable_visible_exception]]
[[Property:weight|-4]]
[[Property:uuid|97b5a74c-d7ad-abf4-9390-59266b67c7c7]]
==Synopsis==
<code lang="text">
#include "eif_cecil.h"
void eif_enable_visible_exception ();
void eif_disable_visible_exception ();
</code>
==Description==
The [[eif_enable_visible_exception]] routine enables the visible exception, while [[eif_disable_visible_exception]] disables it. These routines can be used for debugging purpose. A visible exception is raised when the user tries to access to an Eiffel attribute or a Eiffel routine address which is not visible.
The visible exception is disabled by default.
==Conformance==
ISE Eiffel 4.5 and later.
==Compatibility==
In ISE Eiffel 4.3 and 4.4, the visible exception is enabled by default.
{{SeeAlso| <br/>
[[eif_attribute]] <br/>
[[eif_procedure]] <br/>
[[eif_*_function]] }}

View File

@@ -0,0 +1,125 @@
[[Property:title|eif_*_function]]
[[Property:weight|15]]
[[Property:uuid|643603a5-de12-1ffc-2da3-92c8475078e8]]
==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]] }}

View File

@@ -0,0 +1,35 @@
[[Property:title|eif_name_by_tid]]
[[Property:weight|-1]]
[[Property:uuid|7ae34f4d-5eaf-0703-29f7-54dc4f0fd49d]]
==Synopsis==
<code lang="text">
#include "eif_cecil.h"
char *eif_name_by_tid (EIF_TYPE_ID tid);
</code>
==Description==
The <code lang="text">eif_name_by_tid</code> function returns the name of the class corresponding to <code lang="text">tid</code>.
==Return value==
A statically allocated C string which is the name of the class. If <code lang="text">tid</code> is invalid, it returns <code lang="text">NULL</code>.
==Conformance==
ISE Eiffel 4.4 and later.
==Compatibility==
[[eif_name_by_tid]] is equivalent to [[eif_name]].
{{SeeAlso| <br/>
[[eif_type]] <br/>
[[eif_type_by_reference]] <br/>
[[eif_type_id]] }}

View File

@@ -0,0 +1,35 @@
[[Property:title|eif_name]]
[[Property:weight|-2]]
[[Property:uuid|2921b2ef-1f59-cd26-df50-5cb946eae84c]]
==Synopsis==
<code lang="text">
#include "eif_cecil.h"
char *eif_name (EIF_TYPE_ID tid);
</code>
==Description==
The <code lang="text">eif_name</code> function returns the name of the class corresponding to <code lang="text">tid</code>.
==Return value==
A statically allocated C string which is the name of the class. If <code lang="text">tid</code> is invalid, it returns <code lang="text">NULL</code>.
==Conformance==
ISE Eiffel 4.4 and later.
==Compatibility==
[[eif_name]] is equivalent to [[eif_name_by_tid]].
{{SeeAlso| <br/>
[[eif_type]] <br/>
[[eif_type_by_reference]] <br/>
[[eif_type_id]] }}

View File

@@ -0,0 +1,47 @@
[[Property:title|eif_procedure]]
[[Property:weight|1]]
[[Property:uuid|3937f124-fffa-3244-d2e4-46ccfcec5fa8]]
==Synopsis==
<code lang="text">
#include "eif_cecil.h"
EIF_PROCEDURE eif_procedure (char * name, int * tid);
</code>
==Description==
The <code lang="text">eif_procedure</code> function returns the address of the Eiffel procedure of name <code lang="text">name</code> from the class, which type identifier is <code lang="text">tid</code>.
If the visible exception is enabled, it raises an visible exception upon failure.
==Return value==
Successful: Address of the procedure.
Failing: <code lang="text">NULL</code>. (The procedure does not exist or is not visible).
Otherwise, the address of the procedure is returned.
==Notes==
The Eiffel procedure 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 <code lang="text">eif_procedure</code> when calling it with real arguments.
==Conformance==
ISE Eiffel 4.4 and later.
==Compatibility==
<code lang="text">eif_procedure</code> is equivalent to <code lang="text">eif_proc</code>, which is deprecated.
{{SeeAlso| <br/>
[[eif_type_id]] <br/>
[[eif_*_function]] }}

View File

@@ -0,0 +1,36 @@
[[Property:title|eif_protect]]
[[Property:weight|2]]
[[Property:uuid|f335a229-93c4-4f3f-6fca-9c4c190745c4]]
==Synopsis==
<code lang="text">
#include "eif_hector.h"
EIF_OBJECT eif_protect (EIF_REFERENCE ref);
</code>
==Description==
The <code lang="text">eif_protect</code> function protects the Eiffel reference <code lang="text">ref</code> from the garbage collector. It keeps a reference on it so that the garbage collector does not collect it if it is not referenced from Eiffel any longer.
==Return value==
The <code lang="text">eif_protect</code> function returns an <code lang="text">EIF_OBJECT</code>. This <code lang="text">EIF_OBJECT</code> can be used later on to access <code lang="text">ref</code> with [[eif_access]].
==Conformance==
ISE Eiffel 4.4 and later.
==Compatibility==
<code lang="text">eif_protect</code> is equivalent to <code lang="text">henter</code>, which is deprecated.
{{SeeAlso| <br/>
[[eif_access]] <br/>
[[eif_adopt]] <br/>
[[eif_wean]] }}

View File

@@ -0,0 +1,37 @@
[[Property:title|eif_string]]
[[Property:weight|5]]
[[Property:uuid|d203c941-df82-495a-55f3-791652b0e9ef]]
==Synopsis==
<code lang="text">
#include "eif_plug.h"
EIF_REFERENCE eif_string (char * string);
</code>
==Description==
The <code lang="text">eif_string</code> macro returns an Eiffel string corresponding to the C string <code lang="text">string</code>.
The return value does not reference <code lang="text">string</code>.
==Notes==
This function return an Eiffel reference, which must be protected with [[eif_protect]].
==Conformance==
ISE Eiffel 4.5 and later.
==Compatibility==
<code lang="text">eif_string</code> is equivalent to <code lang="text">RTMS</code>, which is deprecated.
{{SeeAlso| <br/>
[[eif_protect]]<br/>
[[eif_create]] }}

View File

@@ -0,0 +1,45 @@
[[Property:title|eif_type_id]]
[[Property:weight|9]]
[[Property:uuid|248182c3-5e89-4adc-097f-f03cb934eb63]]
==Synopsis==
<code lang="text">
#include "eif_gen_conf.h"
EIF_TYPE_ID eif_type_id (char * type);
</code>
==Description==
The <code lang="text">eif_type_id</code> function returns the type identifier corresponding to <code lang="text">type</code>, which is the name of the type.
==Return value==
The type identifier of <code lang="text">type</code>.
==Notes==
An error cannot be caught by a visible exception.
The type is not necessary visible.
==Conformance==
ISE Eiffel 4.3 and later.
==Compatibility==
<code lang="text">eif_type_id</code> is equivalent to [[eif_type_by_name]].
With ISE Eiffel 4.2 and earlier, use <code lang="text">eif_generic_type</code> for generic types.
{{SeeAlso| <br/>
[[eif_*_function]] <br/>
[[eif_procedure]] <br/>
[[eif_type]] <br/>
[[eif_name]] }}

View File

@@ -0,0 +1,43 @@
[[Property:title|eif_type_by_name]]
[[Property:weight|7]]
[[Property:uuid|51549b56-757c-f91f-6d27-5784a12181ac]]
==Synopsis==
<code lang="text">
#include "eif_gen_conf.h"
EIF_TYPE_ID eif_type_by_name (char * type);
</code>
==Description==
The <code lang="text">eif_type_by_name</code> function returns the type identifier corresponding to <code lang="text">type</code>, which is the name of the type.
==Return value==
The <code lang="text">eif_type_by_name</code> function returns the type.
==Notes==
An error cannot be caught by a visible exception.
The type is not necessary visible.
==Conformance==
ISE Eiffel 4.3 and later.
==Compatibility==
<code lang="text">eif_type_by_name</code> is equivalent to [[eif_type_id]].
{{SeeAlso| <br/>
[[eif_*_function]] <br/>
[[eif_procedure]]<br/>
[[eif_type]] <br/>
[[eif_name]] }}

View File

@@ -0,0 +1,33 @@
[[Property:title|eif_type_by_reference]]
[[Property:weight|8]]
[[Property:uuid|1258584a-0aae-3246-0553-98817deda6e0]]
==Synopsis==
<code lang="text">
#include "eif_cecil.h"
EIF_TYPE_ID eif_type_by_reference (EIF_REFERENCE reference);
</code>
==Description==
The <code lang="text">eif_type_by_reference</code> function returns the type identifier corresponding to <code lang="text">reference</code>.
==Return value==
Type identifier of <code lang="text">reference</code>.
The behavior is unpredictable if <code lang="text">reference</code> is not a valid Eiffel reference.
==Conformance==
ISE Eiffel 4.5 and later.
{{SeeAlso| <br/>
[[eif_type]] <br/>
[[eif_name]] <br/>
[[eif_type_id]] }}

View File

@@ -0,0 +1,35 @@
[[Property:title|eif_type]]
[[Property:weight|6]]
[[Property:uuid|8c200b03-cae1-bbcd-98b0-1767402744be]]
==Synopsis==
<code lang="text">
#include "eif_cecil.h"
EIF_TYPE_ID eif_type (EIF_OBJECT object);
</code>
==Description==
The <code lang="text">eif_type</code> function returns the type identifier corresponding to <code lang="text">object</code>.
==Return value==
Type identifier of <code lang="text">object</code>. The behavior is unpredictable if <code lang="text">object</code> is not a valid Eiffel object.
==Conformance==
ISE Eiffel 4.3 and later.
==Compatibility==
<code lang="text">eif_type(object)</code> is equivalent to <code lang="text">eif_type_by_reference(eif_access(object))</code>.
{{SeeAlso| <br/>
[[eif_type_by_reference]] <br/>
[[eif_type_id]] }}

View File

@@ -0,0 +1,32 @@
[[Property:title|eif_wean]]
[[Property:weight|10]]
[[Property:uuid|d94fdbce-8cbd-7714-ebfc-38e1f0526eaa]]
==Synopsis==
<code lang="text">
#include "eif_hector.h"
EIF_REFERENCE eif_wean (EIF_OBJECT obj);
</code>
==Description==
The <code lang="text">eif_wean</code> function releases the protection of the Eiffel reference, which is protected by the Eiffel object <code lang="text">obj</code>.
==Return value==
The Eiffel reference previously protected by <code lang="text">obj</code>.
==Conformance==
ISE Eiffel 4.1 and later.
{{SeeAlso| <br/>
[[eif_access]] <br/>
[[eif_adopt]] <br/>
[[eif_protect]] }}

View File

@@ -0,0 +1,5 @@
[[Property:title|CECIL Reference]]
[[Property:weight|4]]
[[Property:uuid|20ca6ef1-0d26-a556-955c-96bed93dfdfb]]
References for CECIL features