focus on GW_APPLICATION

This commit is contained in:
Jocelyn Fiat
2011-07-08 11:27:06 +02:00
parent f1d8d18811
commit 4fb42df5fb
4 changed files with 26 additions and 3 deletions

View File

@@ -10,11 +10,22 @@ deferred class
feature -- Execution feature -- Execution
process (env: GW_ENVIRONMENT; a_input: GW_INPUT_STREAM; a_output: GW_OUTPUT_STREAM)
do
execute (new_request_context (env, a_input, a_output))
end
execute (ctx: GW_REQUEST_CONTEXT) execute (ctx: GW_REQUEST_CONTEXT)
-- Execute the request -- Execute the request
deferred deferred
end end
feature -- Factory
new_request_context (env: GW_ENVIRONMENT; a_input: GW_INPUT_STREAM; a_output: GW_OUTPUT_STREAM): GW_REQUEST_CONTEXT
deferred
end
note note
copyright: "2011-2011, Eiffel Software and others" copyright: "2011-2011, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"

View File

@@ -14,6 +14,8 @@ feature -- Access
last_string: STRING_8 last_string: STRING_8
-- Last read string from stream -- Last read string from stream
deferred
end
feature -- Basic operation feature -- Basic operation

View File

@@ -13,11 +13,17 @@ deferred class
feature -- Basic operation feature -- Basic operation
put_string (s: STRING_8) put_string (s: STRING_8)
-- Write `s' into the output stream
require require
s_not_empty: s /= Void and then not s.is_empty s_not_empty: s /= Void and then not s.is_empty
deferred deferred
end end
flush
-- Flush the output stream
deferred
end
note note
copyright: "2011-2011, Eiffel Software and others" copyright: "2011-2011, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"

View File

@@ -29,14 +29,18 @@ feature -- Access
deferred deferred
end end
variable_or_default (a_name: STRING; a_default: G): G variable_or_default (a_name: STRING; a_default: G; use_default_when_empty: BOOLEAN): G
-- Value for variable `a_name' -- Value for variable `a_name'
-- If not found, return `a_default' -- If not found, return `a_default'
require require
a_name_not_empty: a_name /= Void and then not a_name.is_empty a_name_not_empty: a_name /= Void and then not a_name.is_empty
do do
if attached variable (a_name) as s then if attached variable (a_name) as s then
if use_default_when_empty and then s.is_empty then
Result := a_default
else
Result := s Result := s
end
else else
Result := a_default Result := a_default
end end