/[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 26913 - (hide annotations)
Sun Aug 12 23:50:20 2001 UTC (18 years, 5 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/like_type_a.e
File size: 2767 byte(s)
Merged branch `dev46_manu' to the trunc.

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 manus 26913 rout_id: INTEGER
33 manus 9658
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 manus 26913 class_id: INTEGER
41 manus 9658 -- 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 manus 11302 Result := actual_type.is_basic
48 manus 9658 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 manus 11302 Result := actual_type /= Void and then
61     actual_type.has_associated_class
62 manus 9658 end
63    
64 manus 11302 associated_class: CLASS_C is
65 manus 9658 -- Associated class
66     do
67 manus 11302 Result := actual_type.associated_class
68 manus 9658 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 manus 26913 instantiation_in (type: TYPE_A written_id: INTEGER): like Current is
85 manus 9658 -- 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 manus 12165 Result := actual_type.internal_conform_to (other.actual_type, in_generics)
103 manus 9658 end
104    
105     type_i: TYPE_I is
106     -- Reduced type of `actual_type'
107 manus 10886 local
108     cl_type : CL_TYPE_I
109 manus 9658 do
110     Result := actual_type.type_i
111 manus 10886 cl_type ?= Result
112    
113     if cl_type /= Void then
114     -- Remember that it's an anchored type
115     cl_type.set_cr_info (create_info)
116     end
117 manus 9658 end
118    
119     meta_type: TYPE_I is
120     -- C type for `actual_type'
121     do
122     Result := actual_type.meta_type
123     end
124    
125     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