class TYPED_INTERNALS [E_]

Features exported to INTERNALS

WARNING: This interface is tentative and may change to a large extent from SmartEiffel 2.2 to SmartEiffel 2.3.

TYPED_INTERNALS serves as a gateway between the typed ideal world of Eiffel objects and the untyped physical world of raw memory, files on disks, streams on networks...

TYPED_INTERNALS[E_] describes the physical structure of class E_. For instance, TYPED_INTERNALS[STRING] describes the physical structure of class STRING.

Optionally, an object of type E_ can be attached to that a TYPED_INTERNALS[E_]. The TYPED_INTERNALS[E_] object can then be used to inspect and change the values of the attributes of the attached object. For instance, a STRING could be attached to a TYPED_INTERNALS[STRING]. The TYPED_INTERNALS[STRING] could then be used to get or set this STRING's attributes.

Direct parents

conformant parents

INTERNALS

Known children

conformant children

NATIVE_ARRAY_INTERNALS

Summary

creation features

exported features

Getting information about the described object's type

Getting information about the described object's type

Details

type_generator: STRING

Name of the base class of the type described by Current. For instance, if Current is a TYPED_INTERNALS[ARRAY[INTEGER]], type_generator is "ARRAY".

type_generating_type: STRING

Name of the type described by Current. For instance, if Current is a TYPED_INTERNALS[ARRAY[INTEGER]], type_generating_type is "ARRAY[INTEGER]".

type_is_expanded: BOOLEAN

Is the type described by Current expanded?

type_attribute_is_expanded (i: INTEGER): BOOLEAN

Is the type of the ith attribute expanded?

require

    type_can_be_assigned_to_attribute (other: INTERNALS, i: INTEGER): BOOLEAN

    Can the object attached to other be assigned to the ith attribute?

    require

      ensure

      • other = Void implies Result = not type_attribute_is_expanded(i)

      is_equal (other: TYPED_INTERNALS [E_]): BOOLEAN

      Is other attached to an object considered equal to current object ?

      require

      • other /= Void

      ensure

      • commutative: generating_type = other.generating_type implies Result = other.is_equal(Current)

      type_is_native_array: BOOLEAN

      Is the type described by Current a NATIVE_ARRAY?

      ensure

      • Result = type_generator.is_equal(once "NATIVE_ARRAY")