Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:
indexing description: "Implementation of TUPLE" status: "See notice at end of class" date: "$Date: 2001-11-16 20:32:23 +0000 (Fri, 16 Nov 2001) $" revision: "$Revision: 51435 $" class TUPLE create make feature -- Initialization array_make (min_index, max_index: INTEGER) is -- Allocate array; set index interval to -- min_index .. max_index; set all values to default. -- (Make array empty if min_index = max_index + 1). -- (from ARRAY) require -- from ARRAY valid_bounds: min_index <= max_index + 1 do lower := min_index upper := max_index if min_index <= max_index then make_area (max_index - min_index + 1) else make_area (0) end ensure -- from ARRAY lower_set: lower = min_index upper_set: upper = max_index items_set: all_default end make_from_array (a: ARRAY [ANY]) is -- Initialize from the items of a. -- (Useful in proper descendants of class ARRAY, -- to initialize an array-like object from a manifest array.) -- (from ARRAY) require -- from ARRAY array_exists: a /= void do area := a.area lower := a.lower upper := a.upper end feature {NONE} -- Initialization make_area (n: INTEGER) is -- Creates a special object for n entries. -- (from TO_SPECIAL) require -- from TO_SPECIAL non_negative_argument: n >= 0 do create area.make (n) ensure -- from TO_SPECIAL area_allocated: area /= void and then area.count = n end feature -- Access area: SPECIAL [ANY] -- Special data zone -- (from TO_SPECIAL) boolean_item (index: INTEGER): BOOLEAN is -- Boolean item at index. require valid_index: valid_index (index) is_boolean: is_boolean_item (index) local ref: BOOLEAN_REF do ref ?= item (index) if ref /= void then Result := ref.item end end character_item (index: INTEGER): CHARACTER is -- Character item at index. require valid_index: valid_index (index) is_character: is_character_item (index) local ref: CHARACTER_REF do ref ?= item (index) if ref /= void then Result := ref.item end end double_item (index: INTEGER): DOUBLE is -- Double item at index. require valid_index: valid_index (index) is_numeric: is_numeric_item (index) local iref: INTEGER_REF rref: REAL_REF dref: DOUBLE_REF do dref ?= item (index) if dref /= void then Result := dref.item else rref ?= item (index) if rref /= void then Result := rref.item else iref ?= item (index) if iref /= void then Result := iref.item end end end end entry (i: INTEGER): ANY is -- Entry at index i, if in index interval -- (from ARRAY) require -- from ARRAY valid_key: valid_index (i) do Result := item (i) end has (v: ANY): BOOLEAN is -- Does v appear in array? -- (Reference or object equality, -- based on object_comparison.) -- (from ARRAY) local i: INTEGER upper_bound: INTEGER do upper_bound := upper if object_comparison then if v = void then i := upper_bound + 1 else from i := lower until i > upper_bound or else (item (i) /= void and then item (i).is_equal (v)) loop i := i + 1 end end else from i := lower until i > upper_bound or else (item (i) = v) loop i := i + 1 end end Result := not (i > upper_bound) ensure -- from CONTAINER not_found_in_empty: Result implies not is_empty end integer_item (index: INTEGER): INTEGER is -- Integer item at index. require valid_index: valid_index (index) is_integer: is_integer_item (index) local ref: INTEGER_REF do ref ?= item (index) if ref /= void then Result := ref.item end end item (i: INTEGER): ANY is -- Entry at index i, if in index interval -- Was declared in ARRAY as synonym of @. -- (from ARRAY) require -- from TABLE valid_key: valid_index (k) do Result := area.item (i - lower) end pointer_item (index: INTEGER): POINTER is -- Pointer item at index. require valid_index: valid_index (index) is_pointer: is_pointer_item (index) local ref: POINTER_REF do ref ?= item (index) if ref /= void then Result := ref.item end end real_item (index: INTEGER): REAL is -- real item at index. require valid_index: valid_index (index) is_real_or_integer: is_real_item (index) or else is_integer_item (index) local iref: INTEGER_REF rref: REAL_REF dref: DOUBLE_REF do rref ?= item (index) if rref /= void then Result := rref.item else iref ?= item (index) if iref /= void then Result := iref.item else dref ?= item (index) if dref /= void then Result := dref.truncated_to_real end end end end infix "@" (i: INTEGER): ANY is -- Entry at index i, if in index interval -- Was declared in ARRAY as synonym of item. -- (from ARRAY) require -- from TABLE valid_key: valid_index (k) do Result := area.item (i - lower) end feature -- Measurement additional_space: INTEGER is -- Proposed number of additional items -- (from RESIZABLE) do Result := (capacity * growth_percentage // 100).max (minimal_increase) ensure -- from RESIZABLE at_least_one: Result >= 1 end capacity: INTEGER is -- Number of available indices -- Was declared in ARRAY as synonym of count. -- (from ARRAY) do Result := upper - lower + 1 ensure then -- from ARRAY consistent_with_bounds: Result = upper - lower + 1 end count: INTEGER is -- Number of available indices -- Was declared in ARRAY as synonym of capacity. -- (from ARRAY) do Result := upper - lower + 1 ensure then -- from ARRAY consistent_with_bounds: Result = upper - lower + 1 end Growth_percentage: INTEGER is 50 -- Percentage by which structure will grow automatically -- (from RESIZABLE) index_set: INTEGER_INTERVAL is -- Range of acceptable indexes -- (from ARRAY) do create Result.make (lower, upper) ensure -- from INDEXABLE not_void: Result /= void ensure then -- from ARRAY same_count: Result.count = count same_bounds: ((Result.lower = lower) and (Result.upper = upper)) end lower: INTEGER -- Minimum index -- (from ARRAY) Minimal_increase: INTEGER is 5 -- Minimal number of additional items -- (from RESIZABLE) occurrences (v: ANY): INTEGER is -- Number of times v appears in structure -- (from ARRAY) local i: INTEGER do if object_comparison then if v /= void then from i := lower until i > upper loop if item (i) /= void and then v.is_equal (item (i)) then Result := Result + 1 end i := i + 1 end end else from i := lower until i > upper loop if item (i) = v then Result := Result + 1 end i := i + 1 end end ensure -- from BAG non_negative_occurrences: Result >= 0 end upper: INTEGER -- Maximum index -- (from ARRAY) feature -- Comparison is_equal (other: like Current): BOOLEAN is -- Is array made of the same items as other? -- (from ARRAY) require -- from ANY other_not_void: other /= void local i: INTEGER do if lower = other.lower and then upper = other.upper and then object_comparison = other.object_comparison then if object_comparison then from Result := True i := lower until not Result or i > upper loop Result := equal (item (i), other.item (i)) i := i + 1 end else Result := area.same_items (other.area, upper - lower) end end ensure -- from ANY symmetric: Result implies other.is_equal (Current) consistent: standard_is_equal (other) implies Result end feature -- Status report all_cleared: BOOLEAN is obsolete "Use `all_default' instead" -- Are all items set to default values? -- (from ARRAY) do Result := all_default end all_default: BOOLEAN is -- Are all items set to default values? -- (from ARRAY) do Result := area.all_default (upper - lower) ensure -- from ARRAY definition: Result = (count = 0 or else ((item (upper) = void or else item (upper) = item (upper).default) and subarray (lower, upper - 1).all_default)) end changeable_comparison_criterion: BOOLEAN is -- May object_comparison be changed? -- (Answer: yes by default.) -- (from CONTAINER) do Result := True end empty: BOOLEAN is obsolete "ELKS 2000: Use `is_empty' instead" -- Is there no element? -- (from CONTAINER) do Result := is_empty end extendible: BOOLEAN is -- May items be added? -- (Answer: no, although array may be resized.) -- (from ARRAY) do Result := False end full: BOOLEAN is -- Is structure filled to capacity? (Answer: yes) -- (from ARRAY) do Result := True end is_empty: BOOLEAN is -- Is structure empty? -- (from FINITE) do Result := (count = 0) end is_inserted (v: ANY): BOOLEAN is -- Has v been inserted by the most recent insertion? -- (By default, the value returned is equivalent to calling -- `has (v)'. However, descendants might be able to provide more -- efficient implementations.) -- (from COLLECTION) do Result := has (v) end object_comparison: BOOLEAN -- Must search operations use equal rather than = -- for comparing references? (Default: no, use =.) -- (from CONTAINER) prunable: BOOLEAN is -- May items be removed? (Answer: no.) -- (from ARRAY) do Result := False end resizable: BOOLEAN is -- May capacity be changed? (Answer: yes.) -- (from RESIZABLE) do Result := True end same_items (other: like Current): BOOLEAN is -- Do other and Current have same items? -- (from ARRAY) require -- from ARRAY other_not_void: other /= void do if count = other.count then Result := area.same_items (other.area, upper - lower) end ensure -- from ARRAY definition: Result = ((count = other.count) and then (count = 0 or else (item (upper) = other.item (other.upper) and subarray (lower, upper - 1).same_items (other.subarray (other.lower, other.upper - 1))))) end valid_index (i: INTEGER): BOOLEAN is -- Is i within the bounds of the array? -- (from ARRAY) do Result := (lower <= i) and then (i <= upper) ensure then -- from INDEXABLE only_if_in_index_set: Result implies ((i >= index_set.lower) and (i <= index_set.upper)) end valid_index_set: BOOLEAN is -- (from ARRAY) do Result := index_set.count = count end feature -- Status setting compare_objects is -- Ensure that future search operations will use equal -- rather than = for comparing references. -- (from CONTAINER) require -- from CONTAINER changeable_comparison_criterion do object_comparison := True ensure -- from CONTAINER object_comparison end compare_references is -- Ensure that future search operations will use = -- rather than equal for comparing references. -- (from CONTAINER) require -- from CONTAINER changeable_comparison_criterion do object_comparison := False ensure -- from CONTAINER reference_comparison: not object_comparison end feature -- Element change enter (v: like item; i: INTEGER) is -- Replace i-th entry, if in index interval, by v. -- (from ARRAY) require -- from ARRAY valid_key: valid_index (i) do area.put (v, i - lower) end fill (other: CONTAINER [ANY]) is -- Fill with as many items of other as possible. -- The representations of other and current structure -- need not be the same. -- (from COLLECTION) require -- from COLLECTION other_not_void: other /= void extendible local lin_rep: LINEAR [ANY] do lin_rep := other.linear_representation from lin_rep.start until not extendible or else lin_rep.off loop extend (lin_rep.item) lin_rep.forth end end force (v: like item; i: INTEGER) is -- Assign item v to i-th entry. -- Always applicable: resize the array if i falls out of -- currently defined bounds; preserve existing items. -- (from ARRAY) do if i < lower then auto_resize (i, upper) elseif i > upper then auto_resize (lower, i) end put (v, i) ensure -- from ARRAY inserted: item (i) = v higher_count: count >= old count end put (v: like item; i: INTEGER) is -- Replace i-th entry, if in index interval, by v. -- (from ARRAY) require -- from TABLE valid_key: valid_index (k) do area.put (v, i - lower) ensure then -- from INDEXABLE insertion_done: item (k) = v end subcopy (other: like Current; start_pos, end_pos, index_pos: INTEGER) is -- Copy items of other within bounds start_pos and end_pos -- to current array starting at index index_pos. -- (from ARRAY) require -- from ARRAY other_not_void: other /= void valid_start_pos: other.valid_index (start_pos) valid_end_pos: other.valid_index (end_pos) valid_bounds: (start_pos <= end_pos) or (start_pos = end_pos + 1) valid_index_pos: valid_index (index_pos) enough_space: (upper - index_pos) >= (end_pos - start_pos) local other_area: like area other_lower: INTEGER start0, end0, index0: INTEGER do other_area := other.area other_lower := other.lower start0 := start_pos - other_lower end0 := end_pos - other_lower index0 := index_pos - lower spsubcopy ($other_area, $area, start0, end0, index0) end feature {ARRAY} -- Element change set_area (other: like area) is -- Make other the new area -- (from TO_SPECIAL) do area := other end feature -- Removal clear_all is -- Reset all items to default values. -- (from ARRAY) do area.clear_all ensure -- from ARRAY stable_lower: lower = old lower stable_upper: upper = old upper default_items: all_default end discard_items is -- Reset all items to default values with reallocation. -- (from ARRAY) do make_area (capacity) ensure -- from ARRAY default_items: all_default end prune_all (v: ANY) is -- Remove all occurrences of v. -- (Reference or object equality, -- based on object_comparison.) -- (from COLLECTION) require -- from COLLECTION prunable do from until not has (v) loop prune (v) end ensure -- from COLLECTION no_more_occurrences: not has (v) end wipe_out is obsolete "Not applicable since not `prunable'. Use `discard_items' instead." -- Make array empty. -- (from ARRAY) require -- from COLLECTION prunable do discard_items ensure -- from COLLECTION wiped_out: is_empty end feature -- Resizing automatic_grow is -- Change the capacity to accommodate at least -- Growth_percentage more items. -- (from RESIZABLE) do grow (capacity + additional_space) ensure -- from RESIZABLE increased_capacity: capacity >= old capacity + old capacity * growth_percentage // 100 end grow (i: INTEGER) is -- Change the capacity to at least i. -- (from ARRAY) do if i > capacity then resize (lower, upper + i - capacity) end ensure -- from RESIZABLE new_capacity: capacity >= i end resize (min_index, max_index: INTEGER) is -- Rearrange array so that it can accommodate -- indices down to min_index and up to max_index. -- Do not lose any previously entered item. -- (from ARRAY) require -- from ARRAY good_indices: min_index <= max_index local old_size, new_size, old_count: INTEGER new_lower, new_upper: INTEGER do if empty_area then new_lower := min_index new_upper := max_index else new_lower := min_index.min (lower) new_upper := max_index.max (upper) end new_size := new_upper - new_lower + 1 if not empty_area then old_size := area.count old_count := upper - lower + 1 end if empty_area then make_area (new_size) elseif new_size > old_size or new_lower < lower then area := arycpy ($area, new_size, lower - new_lower, old_count) end lower := new_lower upper := new_upper ensure -- from ARRAY no_low_lost: lower = min_index or else lower = old lower no_high_lost: upper = max_index or else upper = old upper end feature -- Conversion arrayed: ARRAY [ANY] is -- Items of Current as array local i, cnt: INTEGER do from i := 1 cnt := count create Result.make (1, cnt) until i > cnt loop Result.put (item (i), i) i := i + 1 end ensure exists: Result /= void same_count: Result.count = count end boolean_arrayed: ARRAY [BOOLEAN] is -- Items of Current as array require is_uniform_boolean: is_uniform_boolean local i, cnt: INTEGER do from i := 1 cnt := count create Result.make (1, cnt) until i > cnt loop Result.put (boolean_item (i), i) i := i + 1 end ensure exists: Result /= void same_count: Result.count = count end character_arrayed: ARRAY [CHARACTER] is -- Items of Current as array require is_uniform_character: is_uniform_character local i, cnt: INTEGER do from i := 1 cnt := count create Result.make (1, cnt) until i > cnt loop Result.put (character_item (i), i) i := i + 1 end ensure exists: Result /= void same_count: Result.count = count end double_arrayed: ARRAY [DOUBLE] is -- Items of Current as array require convertible: convertible_to_double local i, cnt: INTEGER do from i := 1 cnt := count create Result.make (1, cnt) until i > cnt loop Result.put (double_item (i), i) i := i + 1 end ensure exists: Result /= void same_count: Result.count = count end integer_arrayed: ARRAY [INTEGER] is -- Items of Current as array require is_uniform_integer: is_uniform_integer local i, cnt: INTEGER do from i := 1 cnt := count create Result.make (1, cnt) until i > cnt loop Result.put (integer_item (i), i) i := i + 1 end ensure exists: Result /= void same_count: Result.count = count end linear_representation: LINEAR [ANY] is -- Representation as a linear structure -- (from ARRAY) local temp: ARRAYED_LIST [ANY] i: INTEGER do create temp.make (capacity) from i := lower until i > upper loop temp.extend (item (i)) i := i + 1 end Result := temp end pointer_arrayed: ARRAY [POINTER] is -- Items of Current as array require is_uniform_pointer: is_uniform_pointer local i, cnt: INTEGER do from i := 1 cnt := count create Result.make (1, cnt) until i > cnt loop Result.put (pointer_item (i), i) i := i + 1 end ensure exists: Result /= void same_count: Result.count = count end real_arrayed: ARRAY [REAL] is -- Items of Current as array require convertible: convertible_to_real local i, cnt: INTEGER do from i := 1 cnt := count create Result.make (1, cnt) until i > cnt loop Result.put (real_item (i), i) i := i + 1 end ensure exists: Result /= void same_count: Result.count = count end string_arrayed: ARRAY [STRING] is -- Items of Current as array -- NOTE: Items with a type not cconforming to --       type STRING are set to Void. local i, cnt: INTEGER s: STRING do from i := 1 cnt := count create Result.make (1, cnt) until i > cnt loop s ?= item (i) Result.put (s, i) i := i + 1 end ensure exists: Result /= void same_count: Result.count = count end to_c: ANY is -- Address of actual sequence of values, -- for passing to external (non-Eiffel) routines. -- (from ARRAY) do Result := area end feature -- Duplication copy (other: like Current) is -- Reinitialize by copying all the items of other. -- (This is also used by clone.) -- (from ARRAY) require -- from ANY other_not_void: other /= void type_identity: same_type (other) do if other /= Current then standard_copy (other) set_area (standard_clone (other.area)) end ensure -- from ANY is_equal: is_equal (other) ensure then -- from ARRAY equal_areas: area.is_equal (other.area) end subarray (start_pos, end_pos: INTEGER): like Current is -- Array made of items of current array within -- bounds start_pos and end_pos. -- (from ARRAY) require -- from ARRAY valid_start_pos: valid_index (start_pos) valid_end_pos: valid_index (end_pos) valid_bounds: (start_pos <= end_pos) or (start_pos = end_pos + 1) do create Result.array_make (start_pos, end_pos) Result.subcopy (Current, start_pos, end_pos, start_pos) ensure -- from ARRAY lower: Result.lower = start_pos upper: Result.upper = end_pos end feature {NONE} -- Inapplicable bag_put (v: ANY) is -- (from TABLE) require -- from COLLECTION extendible: extendible do ensure -- from COLLECTION item_inserted: is_inserted (v) end extend (v: ANY) is -- Add v to structure. -- (Precondition is False.) -- (from ARRAY) require -- from COLLECTION extendible: extendible do ensure -- from COLLECTION item_inserted: is_inserted (v) ensure then -- from BAG one_more_occurrence: occurrences (v) = old (occurrences (v)) + 1 end prune (v: ANY) is -- Remove first occurrence of v if any. -- (Precondition is False.) -- (from ARRAY) require -- from COLLECTION prunable: prunable do end feature {NONE} -- Implementation auto_resize (min_index, max_index: INTEGER) is -- Rearrange array so that it can accommodate -- indices down to min_index and up to max_index. -- Do not lose any previously entered item. -- If area must be extended, ensure that space for at least -- additional_space item is added. -- (from ARRAY) require -- from ARRAY valid_indices: min_index <= max_index local old_size, new_size: INTEGER new_lower, new_upper: INTEGER do if empty_area then new_lower := min_index new_upper := max_index else new_lower := min_index.min (lower) new_upper := max_index.max (upper) end new_size := new_upper - new_lower + 1 if not empty_area then old_size := area.count if new_size > old_size and new_size - old_size < additional_space then new_size := old_size + additional_space end end if empty_area then make_area (new_size) elseif new_size > old_size or new_lower < lower then area := arycpy ($area, new_size, lower - new_lower, capacity) end lower := new_lower upper := new_upper end eif_gen_count (obj: POINTER): INTEGER is -- Number of generic parameters of obj. external "C | %"eif_gen_conf.h%"" end eif_gen_is_uniform (obj: POINTER; code: CHARACTER): BOOLEAN is -- Are all items in obj of type code? external "C | %"eif_gen_conf.h%"" end eif_gen_typecode (obj: POINTER; pos: INTEGER): CHARACTER is -- Code for generic parameter pos in obj. external "C | %"eif_gen_conf.h%"" end empty_area: BOOLEAN is -- Is area empty? -- (from ARRAY) do Result := (area.count = 0) end spsubcopy (source, target: POINTER; s, e, i: INTEGER) is -- Copy elements of source within bounds s -- and e to target starting at index i. -- (from ARRAY) external "C | %"eif_copy.h%"" end feature {ARRAY} -- Implementation arycpy (old_area: POINTER; newsize, s, n: INTEGER): like area is -- New area of size newsize containing n items -- from oldarea. -- Old items are at position s in new area. -- (from ARRAY) external "C | %"eif_misc.h%"" end feature {ROUTINE} arg_item_code (index: INTEGER): CHARACTER is -- Type code of item at index. Used for -- argument processing in ROUTINE require valid_index: valid_index (index) do Result := eif_gen_typecode ($Current, index) end feature -- Creation make is do array_make (1, eif_gen_count ($Current)) end feature -- Type conversion queries convertible_to_double: BOOLEAN is -- Is current convertible to an array of doubles? local i, cnt: INTEGER tcode: CHARACTER do Result := True from i := 1 cnt := count until i > cnt or else not Result loop tcode := eif_gen_typecode ($Current, i) Result := (tcode = 'i') or else (tcode = 'f') or else (tcode = 'd') i := i + 1 end ensure yes_if_empty: (count = 0) implies Result end convertible_to_real: BOOLEAN is -- Is current convertible to an array of reals? local i, cnt: INTEGER tcode: CHARACTER do Result := True from i := 1 cnt := count until i > cnt or else not Result loop tcode := eif_gen_typecode ($Current, i) Result := (tcode = 'i') or else (tcode = 'f') i := i + 1 end ensure yes_if_empty: (count = 0) implies Result end feature -- Type queries is_boolean_item (index: INTEGER): BOOLEAN is -- Is item at index a BOOLEAN? require valid_index: valid_index (index) do Result := (eif_gen_typecode ($Current, index) = 'b') end is_character_item (index: INTEGER): BOOLEAN is -- Is item at index a CHARACTER? require valid_index: valid_index (index) do Result := (eif_gen_typecode ($Current, index) = 'c') end is_double_item (index: INTEGER): BOOLEAN is -- Is item at index a DOUBLE? require valid_index: valid_index (index) do Result := (eif_gen_typecode ($Current, index) = 'd') end is_integer_item (index: INTEGER): BOOLEAN is -- Is item at index an INTEGER? require valid_index: valid_index (index) do Result := (eif_gen_typecode ($Current, index) = 'i') end is_numeric_item (index: INTEGER): BOOLEAN is -- Is item at index a number? require valid_index: valid_index (index) local tcode: CHARACTER do tcode := eif_gen_typecode ($Current, index) Result := (tcode = 'i') or else (tcode = 'f') or else (tcode = 'd') end is_pointer_item (index: INTEGER): BOOLEAN is -- Is item at index a POINTER? require valid_index: valid_index (index) do Result := (eif_gen_typecode ($Current, index) = 'p') end is_real_item (index: INTEGER): BOOLEAN is -- Is item at index a REAL? require valid_index: valid_index (index) do Result := (eif_gen_typecode ($Current, index) = 'f') end is_reference_item (index: INTEGER): BOOLEAN is -- Is item at index a REFERENCE? require valid_index: valid_index (index) do Result := (eif_gen_typecode ($Current, index) = 'r') end is_uniform: BOOLEAN is -- Are all items of the same basic type or all of reference type? do if count > 0 then Result := eif_gen_is_uniform ($Current, '?') else Result := True end ensure yes_if_empty: (count = 0) implies Result end is_uniform_boolean: BOOLEAN is -- Are all items of type BOOLEAN? do if count > 0 then Result := eif_gen_is_uniform ($Current, 'b') else Result := True end ensure yes_if_empty: (count = 0) implies Result end is_uniform_character: BOOLEAN is -- Are all items of type CHARACTER? do if count > 0 then Result := eif_gen_is_uniform ($Current, 'c') else Result := True end ensure yes_if_empty: (count = 0) implies Result end is_uniform_double: BOOLEAN is -- Are all items of type DOUBLE? do if count > 0 then Result := eif_gen_is_uniform ($Current, 'd') else Result := True end ensure yes_if_empty: (count = 0) implies Result end is_uniform_integer: BOOLEAN is -- Are all items of type INTEGER? do if count > 0 then Result := eif_gen_is_uniform ($Current, 'i') else Result := True end ensure yes_if_empty: (count = 0) implies Result end is_uniform_pointer: BOOLEAN is -- Are all items of type POINTER? do if count > 0 then Result := eif_gen_is_uniform ($Current, 'p') else Result := True end ensure yes_if_empty: (count = 0) implies Result end is_uniform_real: BOOLEAN is -- Are all items of type REAL? do if count > 0 then Result := eif_gen_is_uniform ($Current, 'f') else Result := True end ensure yes_if_empty: (count = 0) implies Result end is_uniform_reference: BOOLEAN is -- Are all items of reference type? do if count > 0 then Result := eif_gen_is_uniform ($Current, 'r') else Result := True end ensure yes_if_empty: (count = 0) implies Result end invariant -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) -- from ARRAY area_exists: area /= void consistent_size: capacity = upper - lower + 1 non_negative_count: count >= 0 index_set_has_same_count: valid_index_set index_set_has_same_bounds: ((index_set.lower = lower) and (index_set.upper = lower + count - 1)) -- from RESIZABLE increase_by_at_least_one: minimal_increase >= 1 -- from BOUNDED valid_count: count <= capacity full_definition: full = (count = capacity) -- from FINITE empty_definition: is_empty = (count = 0) non_negative_count: count >= 0 -- from INDEXABLE index_set_not_void: index_set /= void indexing library: "[ EiffelBase: Library of reusable components for Eiffel. ]" status: "[ Copyright 1986-2001 Interactive Software Engineering (ISE). For ISE customers the original versions are an ISE product covered by the ISE Eiffel license and support agreements. ]" license: "[ EiffelBase may now be used by anyone as FREE SOFTWARE to develop any product, public-domain or commercial, without payment to ISE, under the terms of the ISE Free Eiffel Library License (IFELL) at http://eiffel.com/products/base/license.html. ]" source: "[ Interactive Software Engineering Inc. ISE Building 360 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Electronic mail <info@eiffel.com> Customer support http://support.eiffel.com ]" info: "[ For latest info see award-winning pages: http://eiffel.com ]" end -- class TUPLE
Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:

-- Generated by ISE Eiffel --
For more details: www.eiffel.com