note description: "Implementation of TUPLE" library: "Free implementation of ELKS library" status: "See notice at end of class." legal: "See notice at end of class." date: "$Date: 2020-05-19 14:32:38 +0000 (Tue, 19 May 2020) $" revision: "$Revision: 104260 $" class interface TUPLE create default_create feature -- Access item alias "[]" (index: INTEGER_32): detachable separate ANY assign put -- Entry of key index. -- Was declared in TUPLE as synonym of at. at alias "@" (index: INTEGER_32): detachable separate ANY assign put -- Entry of key index. -- Was declared in TUPLE as synonym of item. reference_item (index: INTEGER_32): detachable separate ANY -- Reference item at index. require valid_index: valid_index (index) is_reference: is_reference_item (index) boolean_item (index: INTEGER_32): BOOLEAN -- Boolean item at index. require valid_index: valid_index (index) is_boolean: is_boolean_item (index) character_8_item (index: INTEGER_32): CHARACTER_8 -- Character item at index. require valid_index: valid_index (index) is_character_8: is_character_8_item (index) character_item (index: INTEGER_32): CHARACTER_8 -- Character item at index. require valid_index: valid_index (index) is_character_8: is_character_8_item (index) character_32_item (index: INTEGER_32): CHARACTER_32 -- Character item at index. require valid_index: valid_index (index) is_character_32: is_character_32_item (index) wide_character_item (index: INTEGER_32): CHARACTER_32 -- Character item at index. require valid_index: valid_index (index) is_character_32: is_character_32_item (index) real_64_item (index: INTEGER_32): REAL_64 -- Double item at index. require valid_index: valid_index (index) is_numeric: is_real_64_item (index) double_item (index: INTEGER_32): REAL_64 -- Double item at index. require valid_index: valid_index (index) is_numeric: is_double_item (index) natural_8_item (index: INTEGER_32): NATURAL_8 -- NATURAL_8 item at index. require valid_index: valid_index (index) is_integer: is_natural_8_item (index) natural_16_item (index: INTEGER_32): NATURAL_16 -- NATURAL_16 item at index. require valid_index: valid_index (index) is_integer: is_natural_16_item (index) natural_32_item (index: INTEGER_32): NATURAL_32 -- NATURAL_32 item at index. require valid_index: valid_index (index) is_integer: is_natural_32_item (index) natural_64_item (index: INTEGER_32): NATURAL_64 -- NATURAL_64 item at index. require valid_index: valid_index (index) is_integer: is_natural_64_item (index) integer_8_item (index: INTEGER_32): INTEGER_8 -- INTEGER_8 item at index. require valid_index: valid_index (index) is_integer: is_integer_8_item (index) integer_16_item (index: INTEGER_32): INTEGER_16 -- INTEGER_16 item at index. require valid_index: valid_index (index) is_integer: is_integer_16_item (index) integer_32_item (index: INTEGER_32): INTEGER_32 -- INTEGER_32 item at index. require valid_index: valid_index (index) is_integer: is_integer_32_item (index) integer_item (index: INTEGER_32): INTEGER_32 -- INTEGER_32 item at index. require valid_index: valid_index (index) is_integer: is_integer_32_item (index) integer_64_item (index: INTEGER_32): INTEGER_64 -- INTEGER_64 item at index. require valid_index: valid_index (index) is_integer: is_integer_64_item (index) pointer_item (index: INTEGER_32): POINTER -- Pointer item at index. require valid_index: valid_index (index) is_pointer: is_pointer_item (index) real_32_item (index: INTEGER_32): REAL_32 -- real item at index. require valid_index: valid_index (index) is_real_or_integer: is_real_32_item (index) real_item (index: INTEGER_32): REAL_32 -- real item at index. require valid_index: valid_index (index) is_real_or_integer: is_real_item (index) feature -- Comparison object_comparison: BOOLEAN -- Must search operations use equal rather than = -- for comparing references? (Default: no, use =.) is_equal (other: like Current): BOOLEAN -- Is other attached to an object considered -- equal to current object? feature -- Status setting compare_objects -- Ensure that future search operations will use equal -- rather than = for comparing references. ensure object_comparison: object_comparison compare_references -- Ensure that future search operations will use = -- rather than equal for comparing references. ensure reference_comparison: not object_comparison feature -- Status report hash_code: INTEGER_32 -- Hash code value valid_index (k: INTEGER_32): BOOLEAN -- Is k a valid key? valid_type_for_index (v: detachable separate ANY; index: INTEGER_32): BOOLEAN -- Is object v a valid target for element at position index? require valid_index: valid_index (index) count: INTEGER_32 -- Number of element in Current. Lower: INTEGER_32 = 1 -- Lower bound of TUPLE. upper: INTEGER_32 -- Upper bound of TUPLE. -- Use count instead. ensure definition: Result = count is_empty: BOOLEAN -- Is Current empty? feature -- Element change put (v: detachable separate ANY; index: INTEGER_32) -- Insert v at position index. require valid_index: valid_index (index) valid_type_for_index: valid_type_for_index (v, index) put_reference (v: detachable separate ANY; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type_for_index: valid_type_for_index (v, index) valid_type: is_reference_item (index) put_boolean (v: BOOLEAN; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_boolean_item (index) put_character_8 (v: CHARACTER_8; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_character_8_item (index) put_character (v: CHARACTER_8; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_character_8_item (index) put_character_32 (v: CHARACTER_32; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_character_32_item (index) put_wide_character (v: CHARACTER_32; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_character_32_item (index) put_real_64 (v: REAL_64; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_double_item (index) put_double (v: REAL_64; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_double_item (index) put_real_32 (v: REAL_32; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_real_item (index) put_real (v: REAL_32; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_real_item (index) put_pointer (v: POINTER; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_pointer_item (index) put_natural_8 (v: NATURAL_8; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_natural_8_item (index) put_natural_16 (v: NATURAL_16; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_natural_16_item (index) put_natural_32 (v: NATURAL_32; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_natural_32_item (index) put_natural_64 (v: NATURAL_64; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_natural_64_item (index) put_integer_32 (v: INTEGER_32; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_integer_32_item (index) put_integer (v: INTEGER_32; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_integer_32_item (index) put_integer_8 (v: INTEGER_8; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_integer_8_item (index) put_integer_16 (v: INTEGER_16; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_integer_16_item (index) put_integer_64 (v: INTEGER_64; index: INTEGER_32) -- Put v at position index in Current. require valid_index: valid_index (index) valid_type: is_integer_64_item (index) feature -- Type queries is_boolean_item (index: INTEGER_32): BOOLEAN -- Is item at index a BOOLEAN? require valid_index: valid_index (index) is_character_8_item (index: INTEGER_32): BOOLEAN -- Is item at index a CHARACTER_8? -- Was declared in TUPLE as synonym of is_character_item. require valid_index: valid_index (index) is_character_item (index: INTEGER_32): BOOLEAN -- Is item at index a CHARACTER_8? -- Was declared in TUPLE as synonym of is_character_8_item. require valid_index: valid_index (index) is_character_32_item (index: INTEGER_32): BOOLEAN -- Is item at index a CHARACTER_32? -- Was declared in TUPLE as synonym of is_wide_character_item. require valid_index: valid_index (index) is_wide_character_item (index: INTEGER_32): BOOLEAN -- Is item at index a CHARACTER_32? -- Was declared in TUPLE as synonym of is_character_32_item. require valid_index: valid_index (index) is_natural_8_item (index: INTEGER_32): BOOLEAN -- Is item at index an NATURAL_8? require valid_index: valid_index (index) is_natural_16_item (index: INTEGER_32): BOOLEAN -- Is item at index an NATURAL_16? require valid_index: valid_index (index) is_natural_32_item (index: INTEGER_32): BOOLEAN -- Is item at index an NATURAL_32? require valid_index: valid_index (index) is_natural_64_item (index: INTEGER_32): BOOLEAN -- Is item at index an NATURAL_64? require valid_index: valid_index (index) is_integer_8_item (index: INTEGER_32): BOOLEAN -- Is item at index an INTEGER_8? require valid_index: valid_index (index) is_integer_16_item (index: INTEGER_32): BOOLEAN -- Is item at index an INTEGER_16? require valid_index: valid_index (index) is_integer_item (index: INTEGER_32): BOOLEAN -- Is item at index an INTEGER_32? -- Was declared in TUPLE as synonym of is_integer_32_item. require valid_index: valid_index (index) is_integer_32_item (index: INTEGER_32): BOOLEAN -- Is item at index an INTEGER_32? -- Was declared in TUPLE as synonym of is_integer_item. require valid_index: valid_index (index) is_integer_64_item (index: INTEGER_32): BOOLEAN -- Is item at index an INTEGER_64? require valid_index: valid_index (index) is_pointer_item (index: INTEGER_32): BOOLEAN -- Is item at index a POINTER? require valid_index: valid_index (index) is_real_32_item (index: INTEGER_32): BOOLEAN -- Is item at index a REAL_32? require valid_index: valid_index (index) is_real_item (index: INTEGER_32): BOOLEAN -- Is item at index a REAL_32? require valid_index: valid_index (index) is_real_64_item (index: INTEGER_32): BOOLEAN -- Is item at index a REAL_64? require valid_index: valid_index (index) is_double_item (index: INTEGER_32): BOOLEAN -- Is item at index a REAL_64? require valid_index: valid_index (index) is_reference_item (index: INTEGER_32): BOOLEAN -- Is item at index a REFERENCE? require valid_index: valid_index (index) is_uniform: BOOLEAN -- Are all items of the same basic type or all of reference type? ensure yes_if_empty: (count = 0) implies Result is_uniform_boolean: BOOLEAN -- Are all items of type BOOLEAN? ensure yes_if_empty: (count = 0) implies Result is_uniform_character_8: BOOLEAN -- Are all items of type CHARACTER_8? -- Was declared in TUPLE as synonym of is_uniform_character. ensure yes_if_empty: (count = 0) implies Result is_uniform_character: BOOLEAN -- Are all items of type CHARACTER_8? -- Was declared in TUPLE as synonym of is_uniform_character_8. ensure yes_if_empty: (count = 0) implies Result is_uniform_character_32: BOOLEAN -- Are all items of type CHARACTER_32? -- Was declared in TUPLE as synonym of is_uniform_wide_character. ensure yes_if_empty: (count = 0) implies Result is_uniform_wide_character: BOOLEAN -- Are all items of type CHARACTER_32? -- Was declared in TUPLE as synonym of is_uniform_character_32. ensure yes_if_empty: (count = 0) implies Result is_uniform_natural_8: BOOLEAN -- Are all items of type NATURAL_8? ensure yes_if_empty: (count = 0) implies Result is_uniform_natural_16: BOOLEAN -- Are all items of type NATURAL_16? ensure yes_if_empty: (count = 0) implies Result is_uniform_natural_32: BOOLEAN -- Are all items of type NATURAL_32? ensure yes_if_empty: (count = 0) implies Result is_uniform_natural_64: BOOLEAN -- Are all items of type NATURAL_64? ensure yes_if_empty: (count = 0) implies Result is_uniform_integer_8: BOOLEAN -- Are all items of type INTEGER_8? ensure yes_if_empty: (count = 0) implies Result is_uniform_integer_16: BOOLEAN -- Are all items of type INTEGER_16? ensure yes_if_empty: (count = 0) implies Result is_uniform_integer: BOOLEAN -- Are all items of type INTEGER? -- Was declared in TUPLE as synonym of is_uniform_integer_32. ensure yes_if_empty: (count = 0) implies Result is_uniform_integer_32: BOOLEAN -- Are all items of type INTEGER? -- Was declared in TUPLE as synonym of is_uniform_integer. ensure yes_if_empty: (count = 0) implies Result is_uniform_integer_64: BOOLEAN -- Are all items of type INTEGER_64? ensure yes_if_empty: (count = 0) implies Result is_uniform_pointer: BOOLEAN -- Are all items of type POINTER? ensure yes_if_empty: (count = 0) implies Result is_uniform_real_32: BOOLEAN -- Are all items of type REAL_32? ensure yes_if_empty: (count = 0) implies Result is_uniform_real: BOOLEAN -- Are all items of type REAL_32? ensure yes_if_empty: (count = 0) implies Result is_uniform_real_64: BOOLEAN -- Are all items of type REAL_64? ensure yes_if_empty: (count = 0) implies Result is_uniform_double: BOOLEAN -- Are all items of type REAL_64? ensure yes_if_empty: (count = 0) implies Result is_uniform_reference: BOOLEAN -- Are all items of reference type? ensure yes_if_empty: (count = 0) implies Result feature -- Concatenation plus alias "+" (a_other: TUPLE): detachable like Current -- Concatenation of Current with a_other. ensure has_expected_count: Result /= Void implies Result.count = count + a_other.count has_expected_items: Result /= Void implies ((∀ ic_1: 1 |..| count ¦ Result [ic_1] = item (ic_1)) and (∀ ic_2: 1 |..| a_other.count ¦ Result [count + ic_2] = a_other [ic_2])) feature -- Retrieval correct_mismatch -- Attempt to correct object mismatch using Mismatch_information. feature -- Access: lower level item_code (index: INTEGER_32): NATURAL_8 -- Type code of item at index. Used for -- argument processing in ROUTINE require valid_index: valid_index (index) Reference_code: NATURAL_8 = 0 Boolean_code: NATURAL_8 = 1 Character_8_code: NATURAL_8 = 2 -- Was declared in TUPLE as synonym of Character_code. Character_code: NATURAL_8 = 2 -- Was declared in TUPLE as synonym of Character_8_code. Real_64_code: NATURAL_8 = 3 Real_32_code: NATURAL_8 = 4 Pointer_code: NATURAL_8 = 5 Integer_8_code: NATURAL_8 = 6 Integer_16_code: NATURAL_8 = 7 Integer_32_code: NATURAL_8 = 8 Integer_64_code: NATURAL_8 = 9 Natural_8_code: NATURAL_8 = 10 Natural_16_code: NATURAL_8 = 11 Natural_32_code: NATURAL_8 = 12 Natural_64_code: NATURAL_8 = 13 Character_32_code: NATURAL_8 = 14 -- Was declared in TUPLE as synonym of Wide_character_code. Wide_character_code: NATURAL_8 = 14 -- Was declared in TUPLE as synonym of Character_32_code. Any_code: NATURAL_8 = 255 -- Code used to identify type in TUPLE. note 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 TUPLE
Generated by ISE EiffelStudio