note description: "A builder to create GAME_WINDOW" author: "Louis Marchand" date: "Fri, 03 Apr 2015 02:41:42 +0000" revision: "2.0" deferred class GAME_WINDOW_BUILDER feature {NONE} -- Initialization default_create -- Initialization of Current do flags := 0 title := "" enable_position_undefined set_dimension (800, 600) end feature -- Access dimension: TUPLE [width: INTEGER_32; height: INTEGER_32] -- The horizontal and vertical dimension of -- the generate_window at creation -- Default: [800, 600] do Result := [width, height] end disable_border -- Make the generate_window without decoration border do flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_borderless) ensure is_disabled: not has_border end disable_fake_fullscreen -- Make the generate_window windowed do flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_fullscreen_desktop.bit_not) ensure is_disabled: not is_fake_fullscreen end disable_fullscreen -- Make the generate_window windowed do flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_fullscreen.bit_not) ensure is_disabled: not is_fullscreen end disable_hidden -- Make the generate_window showed at creation do flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_hidden.bit_not) ensure is_disabled: not is_hidden end disable_input_grabbed -- Make the generate_window not grab all input do flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_input_grabbed.bit_not) ensure is_disabled: not is_input_grabbed end disable_maximized -- Make the generate_window not maximized at creation do flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_maximized.bit_not) ensure is_disabled: not is_maximized end disable_minimized -- Make the generate_window not minimized at creation do flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_minimized.bit_not) ensure is_disabled: not is_minimized end disable_position_centered -- On creation, use position_x and position_y -- values respectively for the horizontal and -- vertical position of the generate_window do disable_position_x_centered disable_position_y_centered ensure is_disabled: not is_position_centered end disable_position_undefined -- On creation, use position_x and position_y -- values respectively for the horizontal and -- vertical position of the generate_window do disable_position_x_undefined disable_position_y_undefined ensure is_disabled: not is_position_undefined end disable_position_x_centered -- On creation, use position_x value for the -- horizontal position of the generate_window do is_position_x_centered := False ensure is_disabled: not is_position_x_centered end disable_position_x_undefined -- On creation, use position_x value for the -- horizontal position of the generate_window do is_position_x_undefined := False ensure is_disabled: not is_position_x_undefined end disable_position_y_centered -- On creation, use position_y value for the -- vertical position of the generate_window do is_position_y_centered := False ensure is_disabled: not is_position_y_centered end disable_position_y_undefined -- On creation, use position_y value for the -- vertical position of the generate_window do is_position_y_undefined := False ensure is_disabled: not is_position_y_undefined end disable_resizable -- Make the generate_window not resizable do flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_resizable.bit_not) ensure is_disabled: not is_resizable end display: detachable GAME_DISPLAY assign set_display -- The GAME_DISPLAY (screen) that the -- generate_window will be drawed -- into at creation. -- Note: only useful if one of is_position_centered, -- is_position_x_centered, is_position_y_centered, -- is_position_undefined, is_position_x_undefined or -- is_position_y_undefined is set -- Default: Void enable_border -- Make the generate_window with decoration border do flags := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_borderless.bit_not) ensure is_enabled: has_border end enable_fake_fullscreen -- Make the generate_window fullscreened -- (but without changing resolution) -- Note: is_fullscreen will be disable do disable_fullscreen flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_fullscreen_desktop) ensure is_enabled: is_fake_fullscreen end enable_fullscreen -- Make the generate_window fullscreened -- Note: is_fake_fullscreen will be disable do disable_fake_fullscreen flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_fullscreen) ensure is_enabled: is_fullscreen is_fake_fullscreen_disabled: not is_fake_fullscreen end enable_hidden -- Make the generate_window hidden at creation do flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_hidden) ensure is_enabled: is_hidden end enable_input_grabbed -- Make the generate_window grab all input do flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_input_grabbed) ensure is_enabled: is_input_grabbed end enable_maximized -- Make the generate_window maximized at creation do flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_maximized) ensure is_enabled: is_maximized end enable_minimized -- Make the generate_window minimized at creation do flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_minimized) ensure is_enabled: is_minimized end enable_position_centered -- On creation, center the horizontal and vertical -- position of the generate_window do enable_position_x_centered enable_position_y_centered ensure is_enabled: is_position_centered is_undefine_not_set: not is_position_undefined end enable_position_undefined -- create generate_window so that the horizontal and -- vertical position does not matter -- Note: If display is not Void, the window will appear on it do enable_position_x_undefined enable_position_y_undefined ensure is_enabled: is_position_undefined is_centered_not_set: not is_position_centered end enable_position_x_centered -- On creation, center the horizontal position of the -- generate_window do disable_position_x_undefined is_position_x_centered := True ensure is_enabled: is_position_x_centered is_undefine_not_set: not is_position_x_undefined end enable_position_x_undefined -- create generate_window so that the horizontal position -- does not matter -- Note: If display is not Void, the window will appear on it do disable_position_x_centered is_position_x_undefined := True ensure is_enabled: is_position_x_undefined is_centered_not_set: not is_position_x_centered end enable_position_y_centered -- On creation, center the vertical position of the -- generate_window do disable_position_y_undefined is_position_y_centered := True ensure is_enabled: is_position_y_centered is_undefine_not_set: not is_position_y_undefined end enable_position_y_undefined -- create generate_window so that the vertical position -- does not matter -- Note: If display is not Void, the window will appear on it do disable_position_y_centered is_position_y_undefined := True ensure is_enabled: is_position_y_undefined is_centered_not_set: not is_position_y_centered end enable_resizable -- Make the generate_window resizable do flags := flags.bit_or ({GAME_SDL_EXTERNAL}.sdl_window_resizable) ensure is_enabled: is_resizable end flags: NATURAL_32 assign set_flags -- The internal GAME_WINDOW create flags -- Note: Normally, you should not have to mess with this, -- Do it only if you know what you are doing. -- Default: 0 Game_library: GAME_LIBRARY_CONTROLLER -- The main controller of the game library -- (from GAME_LIBRARY_SHARED) once ("PROCESS") if attached internal_game_library as la_game_library then Result := la_game_library else create Result end end generate_window: GAME_WINDOW -- The GAME_WINDOW that fit all attributes of Current require game_screen_video_enabled: Game_library.is_video_enable deferred ensure is_created: Result.has_error or Result.exists end generating_type: TYPE [detachable GAME_WINDOW_BUILDER] -- Type of current object -- (type of which it is a direct instance) -- (from ANY) external "built_in" ensure -- from ANY generating_type_not_void: Result /= Void end generator: STRING_8 -- Name of current object's generating class -- (base class of the type of which it is a direct instance) -- (from ANY) external "built_in" ensure -- from ANY generator_not_void: Result /= Void generator_not_empty: not Result.is_empty end has_border: BOOLEAN assign set_has_border -- Is the generate_window will have -- decoration border -- Default: True do Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_borderless) = 0 end height: INTEGER_32 assign set_height -- The horizontal dimension of the generate_window -- at creation -- Default: 600 is_fake_fullscreen: BOOLEAN assign set_is_fake_fullscreen -- Is the generate_window will be fullscreened -- (but without changing resolution) -- Default: False do Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_fullscreen_desktop) = {GAME_SDL_EXTERNAL}.sdl_window_fullscreen_desktop end is_fullscreen: BOOLEAN assign set_is_fullscreen -- Is the generate_window will be fullscreened -- Default: False do Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_fullscreen) /= 0 end is_hidden: BOOLEAN assign set_is_hidden -- Is the generate_window will be -- hidden at creation -- Default: False do Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_hidden) /= 0 end is_input_grabbed: BOOLEAN assign set_is_input_grabbed -- Is the generate_window will grab -- all input -- Default: False do Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_input_grabbed) /= 0 end is_maximized: BOOLEAN assign set_is_maximized -- Is the generate_window will be -- maximized at creation -- Default: False do Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_maximized) /= 0 end is_minimized: BOOLEAN assign set_is_minimized -- Is the generate_window will be -- minimized at creation -- Default: False do Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_minimized) /= 0 end is_position_centered: BOOLEAN assign set_is_position_centered -- Is the generate_window will be horizontally -- and vertically centered in the display -- Default: False do Result := is_position_x_centered and is_position_y_centered end is_position_undefined: BOOLEAN assign set_is_position_undefined -- Is the horizontal and vertical position of generate_window -- does not matters -- Note: If display is not Void, the window will appear on it -- Default: True do Result := is_position_x_undefined and is_position_y_undefined end is_position_x_centered: BOOLEAN assign set_is_position_x_centered -- Is the generate_window will be horizontally -- centered in the display -- Default: False is_position_x_undefined: BOOLEAN assign set_is_position_x_undefined -- Is the horizontal position of generate_window -- does not matters -- Note: If display is not Void, the window will appear on it -- Default: True is_position_y_centered: BOOLEAN assign set_is_position_y_centered -- Is the generate_window will be vertically -- centered in the display -- Default: False is_position_y_undefined: BOOLEAN assign set_is_position_y_undefined -- Is the vertical position of generate_window -- does not matters -- Note: If display is not Void, the window will appear on it -- Default: True is_resizable: BOOLEAN assign set_is_resizable -- Is the generate_window will be resizable -- Default: False do Result := flags.bit_and ({GAME_SDL_EXTERNAL}.sdl_window_resizable) /= 0 end position: TUPLE [x: INTEGER_32; y: INTEGER_32] -- The position of the generate_window at -- creation -- Default: [0,0] (unused -> undefined by default) do Result := [position_x, position_y] end position_x: INTEGER_32 assign set_position_x -- The vertical position that the generate_window -- will be create at. -- Note: If position_x_centered is set, this value -- is not used. -- Default: 0 (unused -> undefined by default) position_y: INTEGER_32 assign set_position_y -- The horizontal position that the generate_window -- will be create at. -- Note: If position_y_centered is set, this value -- is not used. -- Default: 0 (unused -> undefined by default) set_dimension (a_width, a_height: INTEGER_32) -- assign to dimension the value of a_width and a_height require width_valid: a_width > 0 height_valid: a_height > 0 do set_width (a_width) set_height (a_height) ensure is_set: dimension.width = a_width and dimension.height = a_height end set_display (a_display: detachable GAME_DISPLAY) -- assign to display the value of a_display do display := a_display ensure is_set: display ~ a_display end set_flags (a_flags: NATURAL_32) -- Assing to flags the value of a_flags -- Note: Normally, you should not have to mess with this, -- Do it only if you know what you are doing. do flags := a_flags ensure is_set: flags = a_flags end set_has_border (a_value: BOOLEAN) -- Assign to has_border the value of a_value do if a_value then enable_border else disable_border end ensure is_assign: has_border ~ a_value end set_height (a_height: INTEGER_32) -- Assign to height the value of a_height require height_valid: a_height > 0 do height := a_height ensure is_set: height = a_height end set_is_fake_fullscreen (a_value: BOOLEAN) -- Assign to is_fake_fullscreen the value of a_value do if a_value then enable_fake_fullscreen else disable_fake_fullscreen end ensure is_assign: is_fake_fullscreen ~ a_value end set_is_fullscreen (a_value: BOOLEAN) -- Assign to is_fullscreen the value of a_value do if a_value then enable_fullscreen else disable_fullscreen end ensure is_assign: is_fullscreen ~ a_value end set_is_hidden (a_value: BOOLEAN) -- Assign to is_hidden the value of a_value do if a_value then enable_hidden else disable_hidden end ensure is_assign: is_hidden ~ a_value end set_is_input_grabbed (a_value: BOOLEAN) -- Assign to is_input_grabbed the value of a_value do if a_value then enable_input_grabbed else disable_input_grabbed end ensure is_assign: is_input_grabbed ~ a_value end set_is_maximized (a_value: BOOLEAN) -- Assign to is_maximized the value of a_value do if a_value then enable_maximized else disable_maximized end ensure is_assign: is_maximized ~ a_value end set_is_minimized (a_value: BOOLEAN) -- Assign to is_minimized the value of a_value do if a_value then enable_minimized else disable_minimized end ensure is_assign: is_minimized ~ a_value end set_is_position_centered (a_value: BOOLEAN) -- Assign to is_position_centered the value of a_value do if a_value then enable_position_centered else disable_position_centered end ensure is_assign: is_position_centered ~ a_value end set_is_position_undefined (a_value: BOOLEAN) -- Assign to is_position_undefined the value of a_value do if a_value then enable_position_undefined else disable_position_undefined end ensure is_assign: is_position_undefined ~ a_value end set_is_position_x_centered (a_value: BOOLEAN) -- Assign to is_position_x_centered the value of a_value do if a_value then enable_position_x_centered else disable_position_x_centered end ensure is_assign: is_position_x_centered ~ a_value end set_is_position_x_undefined (a_value: BOOLEAN) -- Assign to is_position_x_undefined the value of a_value do if a_value then enable_position_x_undefined else disable_position_x_undefined end ensure is_assign: is_position_x_undefined ~ a_value end set_is_position_y_centered (a_value: BOOLEAN) -- Assign to is_position_y_centered the value of a_value do if a_value then enable_position_y_centered else disable_position_y_centered end ensure is_assign: is_position_y_centered ~ a_value end set_is_position_y_undefined (a_value: BOOLEAN) -- Assign to is_position_y_undefined the value of a_value do if a_value then enable_position_y_undefined else disable_position_y_undefined end ensure is_assign: is_position_y_undefined ~ a_value end set_is_resizable (a_value: BOOLEAN) -- Assign to is_resizable the value of a_value do if a_value then enable_resizable else disable_resizable end ensure is_assign: is_resizable ~ a_value end set_position (a_x, a_y: INTEGER_32) -- Assign to position the values of a_x and a_y -- Note: disable is_position_x_centered, -- is_position_y_centered and is_position_centered do set_position_x (a_x) set_position_y (a_y) ensure is_set: position.x = a_x and position.y = a_y is_not_centered: not is_position_x_centered and not is_position_y_centered is_not_undefine: not is_position_x_undefined and not is_position_y_undefined end set_position_x (a_position_x: INTEGER_32) -- Assign to position_x the value of a_position_x -- note: disable is_position_x_centered and -- is_position_centered do disable_position_x_centered disable_position_x_undefined position_x := a_position_x ensure is_set: position_x = a_position_x not_centered: not is_position_x_centered not_undefined: not is_position_x_undefined end set_position_y (a_position_y: INTEGER_32) -- Assign to position_y the value of a_position_y -- note: disable is_position_y_centered and -- is_position_centered do disable_position_y_centered disable_position_y_undefined position_y := a_position_y ensure is_set: position_y = a_position_y not_centered: not is_position_y_centered not_undefined: not is_position_y_undefined end set_title (a_title: READABLE_STRING_GENERAL) -- Assign to title the value of a_title do title := a_title ensure is_set: title ~ a_title end set_width (a_width: INTEGER_32) -- Assign to width the value of a_width require width_valid: a_width > 0 do width := a_width ensure is_set: width = a_width end title: READABLE_STRING_GENERAL assign set_title -- The caption used to represent the generate_window -- Default: Empty string unset_display -- Remove the previously set display do set_display (Void) ensure is_unset: not attached display end width: INTEGER_32 assign set_width -- The vertical dimension of the generate_window -- at creation -- Default: 800 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) do if a = Void then Result := b = Void else Result := b /= Void and then a.is_deep_equal (b) end 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) end 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) do if a = Void then Result := b = Void else Result := b /= Void and then a.is_equal (b) end 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)) end frozen is_deep_equal alias "≡≡≡" (other: GAME_WINDOW_BUILDER): BOOLEAN -- Are Current and other attached to isomorphic object structures? -- (from ANY) require -- from ANY other_not_void: other /= Void external "built_in" 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) end is_equal (other: GAME_WINDOW_BUILDER): BOOLEAN -- Is other attached to an object considered -- equal to current object? -- (from ANY) require -- from ANY other_not_void: other /= Void external "built_in" ensure -- from ANY symmetric: Result implies other ~ Current consistent: standard_is_equal (other) implies Result end 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) do if a = Void then Result := b = Void else Result := b /= Void and then a.standard_is_equal (b) end 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)) end frozen standard_is_equal alias "≜" (other: GAME_WINDOW_BUILDER): 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 external "built_in" ensure -- from ANY same_type: Result implies same_type (other) symmetric: Result implies other.standard_is_equal (Current) end 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 external "built_in" end 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 external "built_in" ensure -- from ANY definition: Result = (conforms_to (other) and other.conforms_to (Current)) end feature -- Duplication frozen clone (other: detachable ANY): like other obsolete "Use `twin' instead. [2017-05-31]" -- Void if other is void; otherwise new object -- equal to other -- -- For non-void other, clone calls copy; -- to change copying/cloning semantics, redefine copy. -- (from ANY) do if other /= Void then Result := other.twin end ensure -- from ANY instance_free: class equal: Result ~ other end copy (other: GAME_WINDOW_BUILDER) -- 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) external "built_in" ensure -- from ANY is_equal: Current ~ other end frozen deep_clone (other: detachable ANY): like other obsolete "Use `deep_twin' instead. [2017-05-31]" -- Void if other is void: otherwise, new object structure -- recursively duplicated from the one attached to other -- (from ANY) do if other /= Void then Result := other.deep_twin end ensure -- from ANY instance_free: class deep_equal: deep_equal (other, Result) end frozen deep_copy (other: GAME_WINDOW_BUILDER) -- Effect equivalent to that of: -- copy (other . deep_twin) -- (from ANY) require -- from ANY other_not_void: other /= Void do copy (other.deep_twin) ensure -- from ANY deep_equal: deep_equal (Current, other) end frozen deep_twin: GAME_WINDOW_BUILDER -- New object structure recursively duplicated from Current. -- (from ANY) external "built_in" ensure -- from ANY deep_twin_not_void: Result /= Void deep_equal: deep_equal (Current, Result) end frozen standard_clone (other: detachable ANY): like other obsolete "Use `standard_twin' instead. [2017-05-31]" -- Void if other is void; otherwise new object -- field-by-field identical to other. -- Always uses default copying semantics. -- (from ANY) do if other /= Void then Result := other.standard_twin end ensure -- from ANY instance_free: class equal: standard_equal (Result, other) end frozen standard_copy (other: GAME_WINDOW_BUILDER) -- 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) external "built_in" ensure -- from ANY is_standard_equal: standard_is_equal (other) end frozen standard_twin: GAME_WINDOW_BUILDER -- New object field-by-field identical to other. -- Always uses default copying semantics. -- (from ANY) external "built_in" ensure -- from ANY standard_twin_not_void: Result /= Void equal: standard_equal (Result, Current) end frozen twin: GAME_WINDOW_BUILDER -- New object equal to Current -- twin calls copy; to change copying/twinning semantics, redefine copy. -- (from ANY) external "built_in" ensure -- from ANY twin_not_void: Result /= Void is_equal: Result ~ Current end feature -- Basic operations frozen as_attached: attached GAME_WINDOW_BUILDER obsolete "Remove calls to this feature. [2017-05-31]" -- Attached version of Current. -- (Can be used during transitional period to convert -- non-void-safe classes to void-safe ones.) -- (from ANY) do Result := Current end frozen default: detachable GAME_WINDOW_BUILDER -- Default value of object's type -- (from ANY) do end frozen default_pointer: POINTER -- Default value of type POINTER -- (Avoid the need to write p.default for -- some p of type POINTER.) -- (from ANY) do ensure -- from ANY instance_free: class end default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) do end frozen do_nothing -- Execute a null action. -- (from ANY) do ensure -- from ANY instance_free: class end feature {NONE} -- Implementation internal_game_library: detachable GAME_LIBRARY_CONTROLLER -- Assign to this attribute prior to use Game_library to inject a specific GAME_LIBRARY_CONTROLLER singleton. -- (from GAME_LIBRARY_SHARED) feature -- Output Io: STD_FILES -- Handle to standard file setup -- (from ANY) once create Result; Result.set_output_default ensure -- from ANY instance_free: class io_not_void: Result /= Void end out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) do Result := tagged_out ensure -- from ANY out_not_void: Result /= Void end print (o: detachable ANY) -- Write terse external representation of o -- on standard output. -- (from ANY) local s: READABLE_STRING_8 do if attached o then s := o.out if attached {READABLE_STRING_32} s as s32 then Io.put_string_32 (s32) elseif attached {READABLE_STRING_8} s as s8 then Io.put_string (s8) else Io.put_string_32 (s.as_string_32) end end ensure -- from ANY instance_free: class end frozen tagged_out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) external "built_in" ensure -- from ANY tagged_out_not_void: Result /= Void end feature -- Platform Operating_environment: OPERATING_ENVIRONMENT -- Objects available from the operating system -- (from ANY) once create Result ensure -- from ANY instance_free: class operating_environment_not_void: Result /= Void end feature {NONE} -- Retrieval frozen internal_correct_mismatch -- Called from runtime to perform a proper dynamic dispatch on correct_mismatch -- from MISMATCH_CORRECTOR. -- (from ANY) local l_msg: STRING_32 l_exc: EXCEPTIONS do if attached {MISMATCH_CORRECTOR} Current as l_corrector then l_corrector.correct_mismatch else create l_msg.make_from_string ("Mismatch: ".as_string_32) create l_exc; l_msg.append (generating_type.name_32); l_exc.raise_retrieval_exception (l_msg) end end invariant position_is_valid: position.x = position_x and position.y = position_y position_centered_valid: is_position_centered implies (is_position_x_centered and is_position_y_centered) position_undefine_valid: is_position_undefined implies (is_position_x_undefined and is_position_y_undefined) position_centered_undefined_valid: is_position_centered implies not is_position_undefined position_x_centered_undefined_valid: is_position_x_centered implies not is_position_x_undefined position_y_centered_undefined_valid: is_position_y_centered implies not is_position_y_undefined dimension_is_valid: dimension.width = width and dimension.height = height -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) end -- class GAME_WINDOW_BUILDER
Generated by ISE EiffelStudio