Applied new ROUTER design to the whole EWF project.

This commit is contained in:
Jocelyn Fiat
2012-09-25 23:18:17 +02:00
parent 0503e63209
commit 28186efbe7
61 changed files with 960 additions and 1129 deletions

View File

@@ -62,11 +62,7 @@ feature {NONE} -- Initialization
make_from_iterable (v: ITERABLE [READABLE_STRING_8])
do
make (1)
across
v as vc
loop
add_method_using_constant (vc.item)
end
add_methods (v)
end
make_from_string (v: READABLE_STRING_8)
@@ -115,6 +111,19 @@ feature -- Status change
is_locked := True
end
feature -- Basic operations
add alias "+" (a_other: WSF_ROUTER_METHODS): WSF_ROUTER_METHODS
-- Merge Current and a_other into Result
require
a_other_not_void: a_other /= Void
do
create Result.make_from_iterable (Current)
Result.add_methods (a_other)
ensure
end
feature -- Element change
enable_get
@@ -328,7 +337,21 @@ feature -- Access
Result := methods.to_array
end
feature {NONE} -- Implementation
feature {WSF_ROUTER_METHODS} -- Implementation
add_methods (lst: ITERABLE [READABLE_STRING_8])
-- Enable methods from `lst'
do
if not is_locked then
across
lst as c
loop
add_method_using_constant (c.item)
end
end
end
feature {NONE} -- Implementation
add_method_using_constant (v: READABLE_STRING_8)
-- Add method `v' using method_* constant
@@ -358,15 +381,6 @@ feature {NONE} -- Implementation
method_set: has (v.as_upper)
end
add_method (v: READABLE_STRING_8)
require
is_upper_case: v.same_string (v.as_upper)
do
if not is_locked then
methods.extend (v)
end
end
prune_method (v: READABLE_STRING_8)
require
is_upper_case: v.same_string (v.as_upper)