indexing
     status: "See notice at end of class"
     date: "$Date$"
     revision: "$Revision$"
     access: internal
     product: eiffelstore
     database: all_bases

class interface
     EXT_INTERNAL

feature -- Access

     Bit_type: INTEGER is 8
                 -- (from INTERNAL)

     boolean_field (i: INTEGER; object: ANY): BOOLEAN
                 -- Boolean value of i-th field of object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 boolean_field: field_type (i, object) = boolean_type

     Boolean_type: INTEGER is 3
                 -- (from INTERNAL)

     character_field (i: INTEGER; object: ANY): CHARACTER
                 -- Character value of i-th field of object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 character_field: field_type (i, object) = character_type

     Character_type: INTEGER is 2
                 -- (from INTERNAL)

     class_name (object: ANY): STRING
                 -- Name of the class associated with object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void

     double_field (i: INTEGER; object: ANY): DOUBLE
                 -- Double precision value of i-th field of object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 double_field: field_type (i, object) = double_type

     Double_type: INTEGER is 6
                 -- (from INTERNAL)

     dynamic_type (object: ANY): INTEGER
                 -- Dynamic type of object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void

     expanded_field_type (i: INTEGER; object: ANY): STRING
                 -- Class name associated with the i-th
                 -- expanded field of object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 is_expanded: field_type (i, object) = expanded_type
           ensure -- from INTERNAL
                 result_exists: Result /= void

     Expanded_type: INTEGER is 7
                 -- (from INTERNAL)

     field (i: INTEGER; object: ANY): ANY
                 -- Object attached to the i-th field of object
                 -- (directly or through a reference)
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 not_special: not is_special (object)

     field_name (i: INTEGER; object: ANY): STRING
                 -- Name of i-th field of object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 not_special: not is_special (object)
           ensure -- from INTERNAL
                 result_exists: Result /= void

     field_offset (i: INTEGER; object: ANY): INTEGER
                 -- Offset of i-th field of object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 not_special: not is_special (object)

     field_type (i: INTEGER; object: ANY): INTEGER
                 -- Type of i-th field of object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)

     generic_dynamic_type (object: ANY; i: INTEGER): INTEGER
                 -- Dynamic type of generic parameter of object at
                 -- position i.
                 -- (from INTERNAL)

     Integer_16_type: INTEGER is 10
                 -- (from INTERNAL)

     Integer_32_type: INTEGER is 4
                 -- (from INTERNAL)

     Integer_64_type: INTEGER is 11
                 -- (from INTERNAL)

     Integer_8_type: INTEGER is 9
                 -- (from INTERNAL)

     integer_field (i: INTEGER; object: ANY): INTEGER
                 -- Integer value of i-th field of object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 integer_field: field_type (i, object) = integer_type

     Integer_type: INTEGER is 4
                 -- (from INTERNAL)

     pointer_field (i: INTEGER; object: ANY): POINTER
                 -- Pointer value of i-th field of object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 pointer_field: field_type (i, object) = pointer_type

     Pointer_type: INTEGER is 0
                 -- (from INTERNAL)

     real_field (i: INTEGER; object: ANY): REAL
                 -- Real value of i-th field of object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 real_field: field_type (i, object) = real_type

     Real_type: INTEGER is 5
                 -- (from INTERNAL)

     Reference_type: INTEGER is 1
                 -- (from INTERNAL)

     Wide_character_type: INTEGER is 12
                 -- (from INTERNAL)
     
feature -- Measurement

     bit_size (i: INTEGER; object: ANY): INTEGER
                 -- Size (in bit) of the i-th bit field of object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 is_bit: field_type (i, object) = bit_type
           ensure -- from INTERNAL
                 positive_result: Result > 0

     field_count (object: ANY): INTEGER
                 -- Number of logical fields in object
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void

     physical_size (object: ANY): INTEGER
                 -- Space occupied by object in bytes
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
     
feature -- Status report

     is_special (object: ANY): BOOLEAN
                 -- Is object a special object?
                 -- It only recognized a special object
                 -- initialized within a TO_SPECIAL object.
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
     
feature -- Element change

     set_boolean_field (i: INTEGER; object: ANY; value: BOOLEAN)
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 boolean_field: field_type (i, object) = boolean_type

     set_character_field (i: INTEGER; object: ANY; value: CHARACTER)
                 -- Set character value of i-th field of object to value
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 character_field: field_type (i, object) = character_type

     set_double_field (i: INTEGER; object: ANY; value: DOUBLE)
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 double_field: field_type (i, object) = double_type

     set_integer_field (i: INTEGER; object: ANY; value: INTEGER)
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 integer_field: field_type (i, object) = integer_type

     set_pointer_field (i: INTEGER; object: ANY; value: POINTER)
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 pointer_field: field_type (i, object) = pointer_type

     set_real_field (i: INTEGER; object: ANY; value: REAL)
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 real_field: field_type (i, object) = real_type

     set_reference_field (i: INTEGER; object: ANY; value: ANY)
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void
                 index_large_enough: i >= 1
                 index_small_enough: i <= field_count (object)
                 reference_field: field_type (i, object) = reference_type
     
feature -- Conversion

     charconv (i: INTEGER): CHARACTER
                 -- Character corresponding to ascii code i
                 -- (from BASIC_ROUTINES)
     
feature -- Basic operations

     abs (n: INTEGER): INTEGER
                 -- Absolute value of n
                 -- (from BASIC_ROUTINES)
           ensure -- from BASIC_ROUTINES
                 non_negative_result: Result >= 0

     bottom_int_div (n1, n2: INTEGER): INTEGER
                 -- Greatest lower bound of the integer division of n1 by n2
                 -- (from BASIC_ROUTINES)

     deep_traversal (object: ANY)
                 -- Perform a deep recursive traversal on
                 -- the transitive closure of the object network
                 -- reachable from root object.
           require
                 root_object_non_void: object /= void

     field_clean (i: INTEGER; object: ANY): BOOLEAN
                 -- Clean i-th field of object.
           require
                 object_exists: object /= void

     field_copy (i: INTEGER; object, value: ANY): BOOLEAN
                 -- Copy value in i-th field of object.
           require
                 object_exists: object /= void
                 value_exists: value /= void

     is_marked (obj: ANY): BOOLEAN
                 -- Is obj marked?
           require
                 object_exists: obj /= void

     mark (obj: ANY)
                 -- Mark object obj
           require
                 object_exists: obj /= void

     nb_classes: INTEGER
                 -- Number of dynamic types in current system

     object_finish_action (object: ANY)
                 -- Do nothing.
                 -- (To be redefined in heir.)

     object_init_action (object: ANY)
                 -- Do nothing.
                 -- (To be redefined in heir.)

     reference_object_action (i: INTEGER; object: ANY)
                 -- Do nothing.
                 -- (To be redefined in heir.)

     rsign (r: REAL): INTEGER
                 -- Sign of r:
                 -- -1 if r < 0
                 --  0 if r = 0
                 -- +1 if r > 0
                 -- (from BASIC_ROUTINES)
           ensure -- from BASIC_ROUTINES
                 correct_negative: (r < 0) = (Result = - 1)
                 correct_zero: (r = 0) = (Result = 0)
                 correct_positive: (r > 0) = (Result = + 1)

     sign (n: INTEGER): INTEGER
                 -- Sign of n:
                 -- -1 if n < 0
                 --  0 if n = 0
                 -- +1 if n > 0
                 -- (from BASIC_ROUTINES)
           ensure -- from BASIC_ROUTINES
                 correct_negative: (n < 0) = (Result = - 1)
                 correct_zero: (n = 0) = (Result = 0)
                 correct_positive: (n > 0) = (Result = + 1)

     simple_object_action (type, i: INTEGER; object: ANY)
                 -- Do nothing.
                 -- (To be redefined in heir.)

     store_action (object: ANY)
                 -- Do nothing.
                 -- (To be redefined in heir.)

     switch_mark (obj: ANY)
                 -- Unmark obj if marked or mark it if unmarked.
           require
                 object_exists: obj /= void

     traversal (object: ANY)
                 -- Traverse the entire object structure starting with root obj.
                 -- An object in the Eiffel run-time system includes the following:
                 --    a) Reference objects instance of a class type
                 --    b) Special reference objects allocated to refer to a
                 --              variable size object like STRING and ARRAY
                 --    c) Reference objects created for a generic type instantiated
                 --                      as an expanded type or BITS n
                 -- LIMITATION: Current version excludes objects in the Eiffel
                 -- run-time system where expanded objects are encapsulated within
                 -- other objects
           require
                 object_exists: object /= void

     unmark (obj: ANY)
                 -- Unmark object obj
           require
                 object_exists: obj /= void

     unmark_structure (obj: ANY)
                 -- Unmark structure of objects.
           require
                 object_exists: obj /= void

     up_int_div (n1, n2: INTEGER): INTEGER
                 -- Least upper bound of the integer division
                 -- of n1 by n2
                 -- (from BASIC_ROUTINES)
     
feature -- Conformance

     is_instance_of (object: ANY; type_id: INTEGER): BOOLEAN
                 -- Is object an instance of type type_id?
                 -- (from INTERNAL)
           require -- from INTERNAL
                 object_not_void: object /= void

     type_conforms_to (type1, type2: INTEGER): BOOLEAN
                 -- Does type1 conform to type2?
                 -- (from INTERNAL)
     
feature -- Creation

     dynamic_type_from_string (class_type: STRING): INTEGER
                 -- Dynamic type corresponding to class_type.
                 -- If no dynamic type available, returns -1.
                 -- (from INTERNAL)
           require -- from INTERNAL
                 class_type_not_void: class_type /= void
           ensure -- from INTERNAL
                 valid_result: Result = - 1 or else Result >= 0

     new_instance_of (type_id: INTEGER): ANY
                 -- New instance of dynamic type_id.
                 -- Note: returned object is not initialized and may
                 -- hence violate its invariant.
                 -- (from INTERNAL)
     
feature -- Version

     compiler_version: INTEGER
                 -- (from INTERNAL)
     
invariant

           -- from ANY
     reflexive_equality: standard_is_equal (Current)
     reflexive_conformance: conforms_to (Current)

end -- class EXT_INTERNAL