/[eiffelstudio]/branches/eth/eve/Src/Eiffel/API/evaluated_type/real_a.e
ViewVC logotype

Annotation of /branches/eth/eve/Src/Eiffel/API/evaluated_type/real_a.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3375 - (hide annotations)
Mon Dec 4 11:38:01 1995 UTC (24 years, 1 month ago) by dinov
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/real_a.e
File size: 1692 byte(s)
cosmetics (indexing, feature clauses, comments)

1 dinov 3375 indexing
2 grator 18
3 dinov 3375 description:
4     "Actual type for real type.";
5     date: "$Date$";
6     revision: "$Revision $"
7    
8 grator 18 class REAL_A
9    
10     inherit
11    
12     BASIC_A
13     rename
14     internal_conform_to as old_conform_to
15     redefine
16 dinov 3078 is_real, associated_class, same_as, is_numeric, heaviest,
17     associated_eclass
18 grator 18 end;
19     BASIC_A
20     redefine
21 grator 296 is_real, associated_class, same_as, is_numeric, heaviest,
22 dinov 3078 internal_conform_to, associated_eclass
23 grator 18 select
24     internal_conform_to
25     end
26    
27 dinov 3078 feature -- Property
28    
29     is_real: BOOLEAN is
30     -- Is the current type a real type ?
31     do
32     Result := True;
33     end;
34    
35 dinov 3181 feature -- Access
36    
37 dinov 3078 associated_eclass: E_CLASS is
38     -- Associated eiffel class
39     once
40 dinov 3181 Result := System.real_class.compiled_eclass;
41 dinov 3078 end;
42    
43 dinov 3181 feature {COMPILER_EXPORTER}
44 grator 18
45     internal_conform_to (other: TYPE_A; in_generics: BOOLEAN): BOOLEAN is
46     -- Does `other' conform to Current ?
47     do
48     if in_generics then
49     Result := other.is_real;
50     else
51     Result := old_conform_to (other, False)
52     or else
53     other.actual_type.is_double
54     end;
55     end;
56    
57     is_numeric: BOOLEAN is
58     -- Is the current type a numeric type ?
59     do
60     Result := True;
61     end;
62    
63     heaviest (type: TYPE_A): TYPE_A is
64     -- Heaviest numeric type for balancing rule
65     do
66     if type.is_double then
67     Result := type
68     else
69     Result := Current
70     end;
71     end;
72    
73     type_i: FLOAT_I is
74     -- C type
75     once
76     Result := Float_c_type;
77     end;
78    
79     associated_class: CLASS_C is
80     -- Class REAL
81 grator 274 require else
82     real_class_compiled: System.real_class.compiled
83 grator 18 once
84     Result := System.real_class.compiled_class;
85     end;
86    
87     same_as (other: TYPE_A): BOOLEAN is
88     -- Is the current type the same as `other' ?
89     do
90     Result := other.is_real;
91     end;
92    
93 dinov 3375 end -- class REAL_A

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23