/[eiffelstudio]/branches/CAT_mono/Src/Eiffel/API/evaluated_type/like_type_a.e
ViewVC logotype

Annotation of /branches/CAT_mono/Src/Eiffel/API/evaluated_type/like_type_a.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11128 - (hide annotations)
Mon Aug 24 02:25:56 1998 UTC (21 years, 5 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File size: 2940 byte(s)
We removed E_CLASS from the system, we should now use CLASS_C instead.

1 manus 9658 indexing
2     description: "Representation of an anchored type"
3     date: "$Date$"
4     revision: "$Revision$"
5    
6     deferred class
7     LIKE_TYPE_A
8    
9     inherit
10     TYPE_A
11     undefine
12     same_as, solved_type, instantiation_in
13     redefine
14     actual_type, has_like, is_like,
15     is_basic, instantiated_in, meta_type,
16     has_associated_class
17     end
18    
19     SHARED_LIKE_CONTROLER
20    
21     feature -- Properties
22    
23     actual_type: TYPE_A
24     -- Actual type of the anchored type in a given class
25    
26     is_like: BOOLEAN is True
27     -- Is the type anchored one ?
28    
29     has_like: BOOLEAN is True
30     -- Does the type have anchored type in its definition ?
31    
32     rout_id: ROUTINE_ID
33    
34     set_rout_id (rid: like rout_id) is
35     -- Set `set_rout_id' to `rid'.
36     do
37     rout_id := rid
38     end
39    
40     class_id: CLASS_ID
41     -- Class ID of the class where the anchor is referenced
42    
43    
44     is_basic: BOOLEAN is
45     -- Is the current actual type a basic one ?
46     do
47     Result := evaluated_type.is_basic
48     end
49    
50     feature -- Access
51    
52     same_as (other: TYPE_A): BOOLEAN is
53     -- Is the current type the same as `other' ?
54     deferred
55     end
56    
57     has_associated_class: BOOLEAN is
58     -- Does Current have an associated class?
59     do
60     Result := evaluated_type /= Void and then
61     evaluated_type.has_associated_class
62     end
63    
64 manus 11128 associated_eclass: CLASS_C is
65 manus 9658 -- Associated class
66     do
67     Result := evaluated_type.associated_eclass
68     end
69    
70     feature -- Primitives
71    
72     set_actual_type (a: TYPE_A) is
73     -- Assign `a' to `actual_type'.
74     do
75     actual_type := a
76     end
77    
78     solved_type (feat_table: FEATURE_TABLE f: FEATURE_I): like Current is
79     -- Calculated type in function of the feature `f' which has
80     -- the type Current and the feautre table `feat_table
81     deferred
82     end
83    
84     instantiation_in (type: TYPE_A written_id: CLASS_ID): like Current is
85     -- Instantiation of Current in the context of `class_type',
86     -- assuming that Current is written in class of id `written_id'.
87     deferred
88     end
89    
90     instantiated_in (class_type: CL_TYPE_A): like Current is
91     -- Instantiation of Current in the context of `class_type'
92     -- assuming that Current is written in the associated class
93     -- of `class_type'.
94     do
95     Result := clone (Current)
96     Result.set_actual_type (actual_type.instantiated_in (class_type))
97     end
98    
99     internal_conform_to (other: TYPE_A in_generics: BOOLEAN): BOOLEAN is
100     -- Does `other' conform to `actual_type' ?
101     do
102     Result := actual_type.internal_conform_to (other, in_generics)
103     end
104    
105     associated_class: CLASS_C is
106     -- Associated class
107     require else
108     actual_type_not_void: actual_type /= Void
109     do
110     Result := actual_type.associated_class
111     end
112    
113     type_i: TYPE_I is
114     -- Reduced type of `actual_type'
115 manus 10886 local
116     cl_type : CL_TYPE_I
117 manus 9658 do
118     Result := actual_type.type_i
119 manus 10886 cl_type ?= Result
120    
121     if cl_type /= Void then
122     -- Remember that it's an anchored type
123     cl_type.set_cr_info (create_info)
124     end
125 manus 9658 end
126    
127     meta_type: TYPE_I is
128     -- C type for `actual_type'
129     do
130     Result := actual_type.meta_type
131     end
132    
133     end -- class LIKE_TYPE_A

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23