Automatic generation produced by ISE Eiffel
note description: "[ Launch processes and redirect output: - Use `spawn` to launch a process asynchronously. Note: you cannot retrieve the ouput from a process that was spawned - Use `launch` to launch a process synchronously and process its output if needed. ]" legal: "See notice at end of class." status: "See notice at end of class." date: "$Date: 2020-05-19 06:48:58 -0800 (Tue, 19 May 2020) $" revision: "$Revision: 104272 $" class interface WEL_PROCESS_LAUNCHER create default_create -- Process instances of classes with no creation clause. -- (Default: do nothing.) -- (from ANY) feature -- Access create_default_error_mode: INTEGER_32 -- New process does not inherit error mode of calling process but use default error mode. -- (from WEL_PROCESS_CREATION_CONSTANTS) create_new_console: INTEGER_32 -- New process has a new console, instead of inheriting parent's console. -- (from WEL_PROCESS_CREATION_CONSTANTS) create_new_process_group: INTEGER_32 -- New process is root process of a new process group. -- (from WEL_PROCESS_CREATION_CONSTANTS) Create_no_window: INTEGER_32 = 134217728 -- New process is console application run without console window. -- Valid only when starting console application. -- Windows Me/98/95: Not supported. -- (from WEL_PROCESS_CREATION_CONSTANTS) create_suspended: INTEGER_32 -- The primary thread of the new process is created in a suspended state, and does not run until the ResumeThread function is called. -- (from WEL_PROCESS_CREATION_CONSTANTS) create_unicode_environment: INTEGER_32 -- Environment variables passed to new process uses Unicode characters instead of ANSI characters. -- (from WEL_PROCESS_CREATION_CONSTANTS) detached_process: INTEGER_32 -- For console processes, new process does not have access to parent's console. -- (from WEL_PROCESS_CREATION_CONSTANTS) environment_variables: detachable HASH_TABLE [READABLE_STRING_GENERAL, READABLE_STRING_GENERAL] -- Table of environment variables to be passed to new process. -- Key is variable name and value is the value of the variable. -- If this table is Void or empty, environment variables of the -- parent process will be passed to the new process. generating_type: TYPE [detachable WEL_PROCESS_LAUNCHER] -- 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 hidden: BOOLEAN -- Should process be hidden? is_valid_creation_constant (a_constant: INTEGER_32): BOOLEAN -- Is a_constant a valid process creation constant? -- (from WEL_PROCESS_CREATION_CONSTANTS) is_valid_startup_flag (a_flag: INTEGER_32): BOOLEAN -- Is a_flag a valid startup flag? -- (from WEL_STARTUP_CONSTANTS) is_valid_startup_flags (a_flags: INTEGER_32): BOOLEAN -- Is a_flags a valid startup flags combination? -- (from WEL_STARTUP_CONSTANTS) last_launch_successful: BOOLEAN -- Was last call to `launch` successful (i.e. was process started)? last_process_result: INTEGER_32 -- Last launched process return value process_handle: detachable WEL_HANDLE -- Handle of the launched process. process_id: NATURAL_32 -- Process ID when it is started. startf_force_off_feedback: INTEGER_32 -- Feedback cursor forced off -- (from WEL_STARTUP_CONSTANTS) startf_force_on_feedback: INTEGER_32 -- Cursor set to feedback until window intialization is done -- (from WEL_STARTUP_CONSTANTS) startf_use_count_chars: INTEGER_32 -- Attributes x_character_count and y_character_count from WEL_STARTUP_INFO are meaningful -- (from WEL_STARTUP_CONSTANTS) startf_use_fill_attributes: INTEGER_32 -- Attribute fill_attributes from WEL_STARTUP_INFO is meaningful -- (from WEL_STARTUP_CONSTANTS) startf_use_position: INTEGER_32 -- Attributes x_offset and y_offset from WEL_STARTUP_INFO are meaningful -- (from WEL_STARTUP_CONSTANTS) startf_use_show_window: INTEGER_32 -- Attribute show_command from WEL_STARTUP_INFO is meaningful -- (from WEL_STARTUP_CONSTANTS) startf_use_size: INTEGER_32 -- Attributes width and height from WEL_STARTUP_INFO are meaningful -- (from WEL_STARTUP_CONSTANTS) startf_use_std_handles: INTEGER_32 -- Attributes std_input, std_output and std_error from WEL_STARTUP_INFO are meaningful -- (from WEL_STARTUP_CONSTANTS) Sw_hide: INTEGER_32 = 0 -- Declared in Windows as SW_HIDE -- (from WEL_SW_CONSTANTS) Sw_minimize: INTEGER_32 = 6 -- Declared in Windows as SW_MINIMIZE -- (from WEL_SW_CONSTANTS) Sw_otherunzoom: INTEGER_32 = 4 -- Declared in Windows as SW_OTHERUNZOOM -- (from WEL_SW_CONSTANTS) Sw_otherzoom: INTEGER_32 = 2 -- Declared in Windows as SW_OTHERZOOM -- (from WEL_SW_CONSTANTS) Sw_parentclosing: INTEGER_32 = 1 -- Declared in Windows as SW_PARENTCLOSING -- (from WEL_SW_CONSTANTS) Sw_parentopening: INTEGER_32 = 3 -- Declared in Windows as SW_PARENTOPENING -- (from WEL_SW_CONSTANTS) Sw_restore: INTEGER_32 = 9 -- Declared in Windows as SW_RESTORE -- (from WEL_SW_CONSTANTS) Sw_show: INTEGER_32 = 5 -- Declared in Windows as SW_SHOW -- (from WEL_SW_CONSTANTS) Sw_showmaximized: INTEGER_32 = 3 -- Declared in Windows as SW_SHOWMAXIMIZED -- (from WEL_SW_CONSTANTS) Sw_showminimized: INTEGER_32 = 2 -- Declared in Windows as SW_SHOWMINIMIZED -- (from WEL_SW_CONSTANTS) Sw_showminnoactive: INTEGER_32 = 7 -- Declared in Windows as SW_SHOWMINNOACTIVE -- (from WEL_SW_CONSTANTS) Sw_showna: INTEGER_32 = 8 -- Declared in Windows as SW_SHOWNA -- (from WEL_SW_CONSTANTS) Sw_shownoactivate: INTEGER_32 = 4 -- Declared in Windows as SW_SHOWNOACTIVATE -- (from WEL_SW_CONSTANTS) Sw_shownormal: INTEGER_32 = 1 -- Declared in Windows as SW_SHOWNORMAL -- (from WEL_SW_CONSTANTS) thread_handle: detachable WEL_HANDLE -- Handle of the launched process main thread. 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: WEL_PROCESS_LAUNCHER): 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: WEL_PROCESS_LAUNCHER): 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: WEL_PROCESS_LAUNCHER): 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 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 -- Duplication copy (other: WEL_PROCESS_LAUNCHER) -- 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: WEL_PROCESS_LAUNCHER) -- 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: WEL_PROCESS_LAUNCHER -- 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: WEL_PROCESS_LAUNCHER) -- 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: WEL_PROCESS_LAUNCHER -- 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: WEL_PROCESS_LAUNCHER -- 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 WEL_PROCESS_LAUNCHER -- 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 -- Basic Operations launch (a_command_line: READABLE_STRING_GENERAL; a_working_directory: detachable READABLE_STRING_GENERAL; a_output_handler: detachable ROUTINE [STRING_8]) -- Launch process described in a_command_line from a_working_directory. -- Wait for end of process and send output to a_output_handler if not void. require non_void_command_line: a_command_line /= Void valid_command_line: not a_command_line.is_empty launch_and_refresh (a_command_line: READABLE_STRING_GENERAL; a_working_directory: detachable READABLE_STRING_GENERAL; a_refresh_handler: detachable ROUTINE) -- Launch process described in a_command_line from a_working_directory. -- Calls a_refresh_handler regularly while waiting for end of process. require non_void_command_line: a_command_line /= Void valid_command_line: not a_command_line.is_empty spawn (a_command_line: READABLE_STRING_GENERAL; a_working_directory: detachable READABLE_STRING_GENERAL) -- Spawn asynchronously process described in a_command_line from a_working_directory. require non_void_command_line: a_command_line /= Void valid_command_line: not a_command_line.is_empty spawn_with_console (a_command_line: READABLE_STRING_GENERAL; a_working_directory: detachable READABLE_STRING_GENERAL) -- Spawn asynchronously process described in a_command_line from a_working_directory. require non_void_command_line: a_command_line /= Void valid_command_line: not a_command_line.is_empty terminate_process -- Terminate current process. feature -- Element settings run_hidden -- Should process be run hidden? ensure hidden: hidden set_block_size (a_size: INTEGER_32) -- Set `block_size` with a_size. require valid_size: a_size > 0 ensure size_set: block_size = a_size set_environment_variables (a_env_vars: like environment_variables) -- Set `environment_variables` with a_env_vars. ensure environment_variables_set: environment_variables = a_env_vars 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 -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) 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 WEL_PROCESS_LAUNCHER -- Generated by Eiffel Studio --
For more details: eiffel.org