1 |
|
2 |
--| Copyright (c) 1993-2006 University of Southern California and contributors. |
3 |
--| All rights reserved. |
4 |
--| Your use of this work is governed under the terms of the GNU General |
5 |
--| Public License version 2. |
6 |
|
7 |
deferred class PROTO [S -> SUBJECT, T] |
8 |
|
9 |
feature |
10 |
|
11 |
set_func (aspf: FUNCTION [S, TUPLE[S], T]) is |
12 |
do |
13 |
create func |
14 |
print (func.generating_Type) |
15 |
print ("%N") |
16 |
print (aspf.generating_type) |
17 |
print ("%N") |
18 |
func ?= aspf |
19 |
ensure |
20 |
-- Note that 'aspf' is of the same type as 'func', therefore: |
21 |
proper_function_provided: aspf /= Void implies func /= Void |
22 |
end |
23 |
|
24 |
feature -- Access |
25 |
|
26 |
func: FUNCTION [S, TUPLE[S], T] |
27 |
|
28 |
end -- class PROTO |