mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 07:12:25 +01:00
Update wikipage eif_attribute. (Signed-off-by:jocelyn).
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1514 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,62 +1,62 @@
|
|||||||
[[Property:title|eif_attribute]]
|
[[Property:title|eif_attribute]]
|
||||||
[[Property:weight|-12]]
|
[[Property:weight|-12]]
|
||||||
[[Property:uuid|c843f272-8ac2-c30e-e71f-bd6c567e9de3]]
|
[[Property:uuid|c843f272-8ac2-c30e-e71f-bd6c567e9de3]]
|
||||||
==Synopsis==
|
==Synopsis==
|
||||||
<code lang="text">
|
<code lang="text">
|
||||||
#include "eif_cecil.h"
|
#include "eif_cecil.h"
|
||||||
|
|
||||||
EIFFEL_TYPE eif_attribute (EIF_REFERENCE object, char * name, EIFFEL_TYPE, int * status);
|
EIFFEL_TYPE eif_attribute (EIF_REFERENCE object, char * name, EIFFEL_TYPE, int * status);
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
==Description==
|
==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">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_INTEGER</code>
|
||||||
# <code lang="text">EIF_CHARACTER</code>
|
# <code lang="text">EIF_CHARACTER</code>
|
||||||
# <code lang="text">EIF_BOOLEAN</code>
|
# <code lang="text">EIF_BOOLEAN</code>
|
||||||
# <code lang="text">EIF_DOUBLE</code>
|
# <code lang="text">EIF_DOUBLE</code>
|
||||||
# <code lang="text">EIF_REAL</code>
|
# <code lang="text">EIF_REAL</code>
|
||||||
# <code lang="text">EIF_REFERENCE</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:
|
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_NO_ATTRIBUTE</code>
|
||||||
# <code lang="text">EIF_CECIL_OK</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>).
|
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==
|
==Return value==
|
||||||
|
|
||||||
Successful: the Eiffel attribute.
|
Successful: the Eiffel attribute.
|
||||||
|
|
||||||
Failing: (<code lang="text">EIFFEL_TYPE</code>) 0
|
Failing: (<code lang="text">EIFFEL_TYPE</code>) 0
|
||||||
|
|
||||||
==Notes==
|
==Notes==
|
||||||
|
|
||||||
If the return value is an <code lang="text">EIF_REFERENCE</code>, you must protect it with [[eif_protect]].
|
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==
|
==Conformance==
|
||||||
|
|
||||||
ISE Eiffel 4.5 and later.
|
ISE Eiffel 4.5 and later.
|
||||||
|
|
||||||
==Compatibility==
|
==Compatibility==
|
||||||
<code lang="text">
|
<code lang="text">
|
||||||
eif_attribute (object, name, type, NULL)
|
eif_attribute (object, name, type, NULL)
|
||||||
</code>
|
</code>
|
||||||
is equivalent to:
|
is equivalent to:
|
||||||
<code lang="text">
|
<code lang="text">
|
||||||
eif_field (object, name, type)
|
eif_field (object, name, type)
|
||||||
</code>
|
</code>
|
||||||
which is deprecated.
|
which is deprecated.
|
||||||
|
|
||||||
|
|
||||||
{{SeeAlso| <br/>
|
{{SeeAlso| <br/>
|
||||||
[[eif_protect]]<br/>
|
[[eif_protect]]<br/>
|
||||||
[[attribute_exists]]<br/>
|
[[attribute_exists]]<br/>
|
||||||
[[eif_procedure]]<br/>
|
[[eif_procedure]]<br/>
|
||||||
[[eif_reference_function]] }}
|
[[eif_*_function]] }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user