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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9656 - (show annotations)
Sun Mar 15 02:19:40 1998 UTC (21 years, 10 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/real_a.e
File size: 1438 byte(s)
Cosmetics
Changed some inheritance scheme concerning types
Add the depedency between genrics in GEN_TYPE_A

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