Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

kernel.misc

Class KI_SHELL_COMMAND


Known direct descendants

KL_SHELL_COMMAND

Features

Invariants

indexing

description

Interface for shell commands

library

Gobo Eiffel Kernel Library

copyright

Copyright (c) 2001-2002, Eric Bezault and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2004/12/22 22:49:51 $

revision

$Revision: 1.7 $

deferred class

KI_SHELL_COMMAND

feature -- Access

command: STRING

-- Command to be executed from the shell

feature -- Status report

exit_code: INTEGER

-- Exit status code of the last execution of command;
-- Its meaning depends on the value of is_user_code
-- and is_system_code.

is_system_code: BOOLEAN

-- Has exit_code been set by the system because of
-- an abnormal termination of command or because
-- it could not be launched correctly?

is_user_code: BOOLEAN

-- Has exit_code been set at the end of
-- a normal execution of command?

ensure
definition: Result = not is_system_code

feature -- Execution

execute

-- Ask operating system to execute command. Wait until
-- termination. Make exit status available in exit_code,
-- is_user_code and is_system_code.
-- (Note that under Windows 95/98 the exit status code
-- returned is always 0 when is_user_code is true.)

invariant

command_not_void: command /= Void
command_not_empty: command.count > 0

-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end