/[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 32079 - (show annotations)
Wed May 15 02:41:16 2002 UTC (17 years, 8 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/real_a.e
File size: 1135 byte(s)
Made sure that `type_i' from BASIC_A and descendants always returns a new
instance of its associated TYPE_I object. This is necessary as we might
set the `cr_info' attribute and if we use the once from SHARED_TYPE_I
then all basic type share this `cr_info' and can result in incorrect
code generation (at least for .NET where it is now used)

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, weight,
14 internal_conform_to
15 end
16
17 feature -- Property
18
19 is_real: BOOLEAN is True
20 -- Is the current type a real type ?
21
22 associated_class: CLASS_C is
23 -- Class REAL
24 once
25 Result := System.real_class.compiled_class
26 end
27
28 feature {COMPILER_EXPORTER}
29
30 internal_conform_to (other: TYPE_A; in_generics: BOOLEAN): BOOLEAN is
31 -- Does `other' conform to Current ?
32 do
33 if in_generics then
34 Result := other.is_real
35 else
36 Result := {BASIC_A} precursor (other, False)
37 or else
38 other.actual_type.is_double
39 end
40 end
41
42 is_numeric: BOOLEAN is True
43 -- Is the current type a numeric type ?
44
45 weight: INTEGER is 8
46 -- Weight of Current.
47 -- Used to evaluate type of an expression with balancing rule.
48
49 type_i: FLOAT_I is
50 -- C type
51 do
52 create Result
53 end
54
55 same_as (other: TYPE_A): BOOLEAN is
56 -- Is the current type the same as `other' ?
57 do
58 Result := other.is_real
59 end
60
61 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