note description: "Store all information about a mismatch in a type." legal: "See notice at end of class." status: "See notice at end of class." date: "$Date: 2020-05-19 14:29:33 +0000 (Tue, 19 May 2020) $" revision: "$Revision: 104259 $" class interface SED_TYPE_MISMATCH create make (a_type_id: INTEGER_32) -- Mismatch for dynamic type a_type_id in retrieving system. require type_id_non_negative: a_type_id >= 0 ensure type_id_set: type_id = a_type_id feature -- Access attribute_info: TUPLE [old_name: STRING_8; new_name: STRING_8; old_attribute_type: INTEGER_32; new_attribute_type: INTEGER_32; old_position: INTEGER_32; new_position: INTEGER_32; is_changed: BOOLEAN; is_removed: BOOLEAN; is_attachment_check_required: BOOLEAN] -- For typing purposes. require callable: False generating_type: TYPE [detachable SED_TYPE_MISMATCH] -- Type of current object -- (type of which it is a direct instance) -- (from ANY) ensure -- from ANY generating_type_not_void: Result /= Void generator: STRING_8 -- Name of current object's generating class -- (base class of the type of which it is a direct instance) -- (from ANY) ensure -- from ANY generator_not_void: Result /= Void generator_not_empty: not Result.is_empty mismatches_by_name: HASH_TABLE [like attribute_info, STRING_8] -- Store information about mismatch based on the attribute name. mismatches_by_stored_position: HASH_TABLE [like attribute_info, INTEGER_32] -- Store information about mismatch based on the store position. new_count: INTEGER_32 -- Number of attributes in original system and retrieving system. new_version: detachable IMMUTABLE_STRING_8 -- Version in stored system and retrieving system. old_count: INTEGER_32 -- Number of attributes in original system and retrieving system. old_version: detachable IMMUTABLE_STRING_8 -- Version in stored system and retrieving system. type_id: INTEGER_32 -- Type ID for type having the mismatch feature -- Comparison frozen deep_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void -- or attached to isomorphic object structures? -- (from ANY) ensure -- from ANY instance_free: class shallow_implies_deep: standard_equal (a, b) implies Result both_or_none_void: (a = Void) implies (Result = (b = Void)) same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b)) symmetric: Result implies deep_equal (b, a) frozen equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached -- to objects considered equal? -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.is_equal (b)) frozen is_deep_equal alias "≡≡≡" (other: SED_TYPE_MISMATCH): BOOLEAN -- Are Current and other attached to isomorphic object structures? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY shallow_implies_deep: standard_is_equal (other) implies Result same_type: Result implies same_type (other) symmetric: Result implies other.is_deep_equal (Current) is_equal (other: SED_TYPE_MISMATCH): BOOLEAN -- Is other attached to an object considered -- equal to current object? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY symmetric: Result implies other ~ Current consistent: standard_is_equal (other) implies Result frozen standard_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached to -- field-by-field identical objects of the same type? -- Always uses default object comparison criterion. -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.standard_is_equal (b)) frozen standard_is_equal alias "≜" (other: SED_TYPE_MISMATCH): BOOLEAN -- Is other attached to an object of the same type -- as current object, and field-by-field identical to it? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY same_type: Result implies same_type (other) symmetric: Result implies other.standard_is_equal (Current) feature -- Status report conforms_to (other: ANY): BOOLEAN -- Does type of current object conform to type -- of other (as per Eiffel: The Language, chapter 13)? -- (from ANY) require -- from ANY other_not_void: other /= Void has_new_attached_attribute: BOOLEAN -- Do we have new attached attributes that did not exist in the stored system? has_new_attribute: BOOLEAN -- Do we have new attributes that did not exist in the stored system? has_version_mismatch: BOOLEAN -- Do we have a mismatch in versioning? same_type (other: ANY): BOOLEAN -- Is type of current object identical to type of other? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY definition: Result = (conforms_to (other) and other.conforms_to (Current)) feature -- Element change add_attribute_count_mismatch (a_old_count, a_new_count: INTEGER_32) -- Mismatch where there is a_old_count attributes in the original system -- and a_new_count attributes in the retrieving system. require old_count_non_negative: a_old_count >= 0 new_count_non_negative: a_new_count >= 0 ensure old_count_set: old_count = a_old_count new_count_set: new_count = a_new_count add_attribute_mismatch (a_old_attr_type, a_new_attr_type: INTEGER_32; a_old_name, a_new_name: STRING_8; a_old_pos, a_new_pos: INTEGER_32) -- Mismatch for a_old_name where the new name is a_new_name, the new type -- a_new_attr_type is different from a_old_attr_type stored at position -- a_old_pos in the stored system for a a_new_pos in the retrieving system. require a_old_attr_type_non_negative: a_old_attr_type >= 0 a_new_attr_type_non_negative: a_new_attr_type >= 0 a_old_name_attached: a_old_name /= Void a_new_name_attached: a_new_name /= Void a_old_pos_positive: a_old_pos > 0 a_new_pos_positive: a_new_pos > 0 add_new_attribute_mismatch (a_added_attribute_count: INTEGER_32) -- Mismatch when new attributes have been added require a_added_attribute_count_positive: a_added_attribute_count > 0 add_removed_attribute (a_old_attr_type: INTEGER_32; a_old_name, a_new_name: STRING_8; a_old_pos: INTEGER_32) -- Attribute a_name of type a_old_attr_type at position a_old_pos in -- the stored system is now missing from Current. require a_old_attr_type_non_negative: a_old_attr_type >= 0 a_old_name_attached: a_old_name /= Void a_new_name_attached: a_new_name /= Void a_old_pos_positive: a_old_pos > 0 add_version_mismatch (a_old_version, a_new_version: detachable IMMUTABLE_STRING_8) -- Mismatch where the original system as a version a_old_version which differs -- from the version a_new_version in the retrieving system. require different_version: a_old_version /~ a_new_version ensure old_version_set: old_version = a_old_version new_version_set: new_version = a_new_version version_mismatched: has_version_mismatch add_void_safe_mismatch (a_old_attr_type, a_new_attr_type: INTEGER_32; a_old_name, a_new_name: STRING_8; a_old_pos, a_new_pos: INTEGER_32) -- Mismatch for a_old_name where the new name is a_new_name, the new type -- a_new_attr_type is attached and a_old_attr_type is detachable stored at position -- a_old_pos in the stored system for a a_new_pos in the retrieving system. require a_old_attr_type_non_negative: a_old_attr_type >= 0 a_new_attr_type_non_negative: a_new_attr_type >= 0 a_old_name_attached: a_old_name /= Void a_new_name_attached: a_new_name /= Void a_old_pos_positive: a_old_pos > 0 a_new_pos_positive: a_new_pos > 0 feature -- Duplication copy (other: SED_TYPE_MISMATCH) -- Update current object using fields of object attached -- to other, so as to yield equal objects. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_equal: Current ~ other frozen deep_copy (other: SED_TYPE_MISMATCH) -- Effect equivalent to that of: -- copy (other . deep_twin) -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY deep_equal: deep_equal (Current, other) frozen deep_twin: SED_TYPE_MISMATCH -- New object structure recursively duplicated from Current. -- (from ANY) ensure -- from ANY deep_twin_not_void: Result /= Void deep_equal: deep_equal (Current, Result) frozen standard_copy (other: SED_TYPE_MISMATCH) -- Copy every field of other onto corresponding field -- of current object. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_standard_equal: standard_is_equal (other) frozen standard_twin: SED_TYPE_MISMATCH -- New object field-by-field identical to other. -- Always uses default copying semantics. -- (from ANY) ensure -- from ANY standard_twin_not_void: Result /= Void equal: standard_equal (Result, Current) frozen twin: SED_TYPE_MISMATCH -- New object equal to Current -- twin calls copy; to change copying/twinning semantics, redefine copy. -- (from ANY) ensure -- from ANY twin_not_void: Result /= Void is_equal: Result ~ Current feature -- Basic operations frozen default: detachable SED_TYPE_MISMATCH -- Default value of object's type -- (from ANY) frozen default_pointer: POINTER -- Default value of type POINTER -- (Avoid the need to write p.default for -- some p of type POINTER.) -- (from ANY) ensure -- from ANY instance_free: class default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) frozen do_nothing -- Execute a null action. -- (from ANY) ensure -- from ANY instance_free: class feature -- Output Io: STD_FILES -- Handle to standard file setup -- (from ANY) ensure -- from ANY instance_free: class io_not_void: Result /= Void out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY out_not_void: Result /= Void print (o: detachable ANY) -- Write terse external representation of o -- on standard output. -- (from ANY) ensure -- from ANY instance_free: class frozen tagged_out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY tagged_out_not_void: Result /= Void feature -- Platform Operating_environment: OPERATING_ENVIRONMENT -- Objects available from the operating system -- (from ANY) ensure -- from ANY instance_free: class operating_environment_not_void: Result /= Void invariant type_id_non_negative: type_id >= 0 counts_non_negative: old_count >= 0 and new_count >= 0 -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) note library: "EiffelBase: Library of reusable components for Eiffel." copyright: "Copyright (c) 1984-2020, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class SED_TYPE_MISMATCH
Generated by ISE EiffelStudio