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

kernel.spec.ise

Class KL_EXECUTION_ENVIRONMENT


Direct ancestors

KL_VALUES, KL_IMPORTED_STRING_ROUTINES, KL_IMPORTED_ANY_ROUTINES

Features

Invariants

indexing

description

Execution environment facilities

usage

This class should not be used directly through %
%inheritance and client/supplier relationship. %
%Inherit from KL_SHARED_EXECUTION_ENVIRONMENT instead.

pattern

Singleton

library

Gobo Eiffel Kernel Library

copyright

Copyright (c) 1999-2004, Eric Bezault and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2005/02/07 16:23:52 $

revision

$Revision: 1.10 $

class

KL_EXECUTION_ENVIRONMENT

inherit

KL_VALUES
KL_IMPORTED_STRING_ROUTINES
KL_IMPORTED_ANY_ROUTINES

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
variable_value (a_variable: STRING): STRING

-- Value of environment variable a_variable,
-- Void if a_variable has not been set;
-- Note: If a_variable is a UC_STRING or descendant, then
-- the bytes of its associated UTF unicode encoding will
-- be used to query its value to the environment.

-- (From KL_VALUES)

require
k_not_void: k /= Void

feature -- Conversion

interpreted_string (a_string: STRING): STRING

-- String where the environment variables have been
-- replaced by their values. The environment variables
-- are considered to be either ${[^}]*} or $[a-zA-Z0-9_]+
-- and the dollar sign is escaped using $$. Non defined
-- environment variables are replaced by empty strings.
-- The result is not defined when a_string does not
-- conform to the conventions above.
-- Return a new string each time.

require
a_string_not_void: a_string /= Void
ensure
interpreted_string_not_void: Result /= Void

feature -- Setting

set_variable_value (a_variable, a_value: STRING)

-- Set environment variable a_variable to a_value.
-- (This setting may fail on certain platforms.)
-- Note: If a_variable or a_value are UC_STRING or
-- descendant, then the bytes of their associated UTF
-- unicode encoding will be passed to the environment.

require
a_variable_not_void: a_variable /= Void
a_variable_not_empty: a_variable.count > 0
a_value_not_void: a_value /= Void

invariant


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

end