eif_attribute

Synopsis

#include "eif_cecil.h" EIFFEL_TYPE eif_attribute (EIF_REFERENCE object, char * name, EIFFEL_TYPE, int * status);

Description

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:

  1. EIF_INTEGER
  2. EIF_CHARACTER
  3. EIF_BOOLEAN
  4. EIF_DOUBLE
  5. EIF_REAL
  6. EIF_REFERENCE

If status is NULL then no status is set. Otherwise the status of the call is put into *status. Its value is one of the following:

  1. EIF_NO_ATTRIBUTE
  2. EIF_CECIL_OK

If the visible exception is enabled, then a visible exception is raised upon failure (EIF_NO_ATTRIBUTE, EIF_CECIL_ERROR).

Return value

Successful: the Eiffel attribute.

Failing: (EIFFEL_TYPE) 0

Notes

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.

Conformance

ISE Eiffel 4.5 and later.

Compatibility

eif_attribute (object, name, type, NULL)is equivalent to:eif_field (object, name, type)which is deprecated.

See Also:
eif_protect
attribute_exists
eif_procedure
eif_*_function

cached: 11/20/2024 6:07:33.000 PM