Added make_from_execution procedure to ease implementing various use cases.

This commit is contained in:
2015-06-16 15:02:17 +02:00
parent 7bea163f46
commit c0d5b7c968
2 changed files with 19 additions and 2 deletions

View File

@@ -18,6 +18,13 @@ feature {NONE} -- Initialization
response := res
end
frozen make_from_execution (a_execution: WGI_EXECUTION)
-- Create current execution from `a_execution'.
do
request := a_execution.request
response := a_execution.response
end
feature {WGI_EXECUTION} -- Access
request: WGI_REQUEST

View File

@@ -10,7 +10,8 @@ inherit
WGI_EXECUTION
rename
request as wgi_request,
response as wgi_response
response as wgi_response,
make_from_execution as make_from_wgi_execution
redefine
make,
execute,
@@ -23,7 +24,7 @@ inherit
feature {NONE} -- Initialization
make (req: WGI_REQUEST; res: WGI_RESPONSE)
frozen make (req: WGI_REQUEST; res: WGI_RESPONSE)
-- Create Current execution with request `req' and response `res'.
do
Precursor (req, res)
@@ -32,6 +33,15 @@ feature {NONE} -- Initialization
initialize
end
frozen make_from_execution (a_execution: WSF_EXECUTION)
-- Create current execution from `a_execution'.
do
make_from_wgi_execution (a_execution)
request := a_execution.request
response := a_execution.response
initialize
end
initialize
-- Initialize Current object.
--| To be redefined if needed.