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

kernel.spec.ise

Class KL_SHELL_COMMAND


Direct ancestors

KI_SHELL_COMMAND, EXECUTION_ENVIRONMENT, KL_SHARED_OPERATING_SYSTEM, KL_IMPORTED_STRING_ROUTINES, KL_IMPORTED_ANY_ROUTINES

Known direct descendants

DP_SHELL_COMMAND

Creation

Features

Invariants

indexing

description

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: 2005/07/13 17:05:09 $

revision

$Revision: 1.16 $

class

KL_SHELL_COMMAND

inherit

KI_SHELL_COMMAND
KL_IMPORTED_STRING_ROUTINES
KL_IMPORTED_ANY_ROUTINES

create

make (a_command: like command)

-- Create a new shell command.

-- (From KI_SHELL_COMMAND)

require
a_command_not_void: a_command /= Void
a_command_not_empty: a_command.count > 0
ensure
command_set: command = a_command

feature -- Access

any_: KL_ANY_ROUTINES

-- Routines that ought to be in class ANY

-- (From KL_IMPORTED_ANY_ROUTINES)

ensure
any_routines_not_void: Result /= Void
string_: KL_STRING_ROUTINES

-- Routines that ought to be in class STRING

-- (From KL_IMPORTED_STRING_ROUTINES)

ensure
string_routines_not_void: Result /= Void
command: STRING

-- Command to be executed from the shell;
-- Note: If command is a UC_STRING or descendant, then
-- the bytes of its associated UTF unicode encoding will
-- be used to invoke the command through the operating
-- system.

-- (From KI_SHELL_COMMAND)

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.

-- (From KI_SHELL_COMMAND)

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?

-- (From KI_SHELL_COMMAND)

is_user_code: BOOLEAN

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

-- (From KI_SHELL_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.).

-- (From KI_SHELL_COMMAND)

invariant

string_command_not_void: string_command /= Void
string_command_is_string: ANY_.same_types (string_command,
)
string_command_not_empty: string_command.count > 0

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