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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 30166 - (show annotations)
Fri Jan 11 01:20:32 2002 UTC (18 years ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/none_a.e
File size: 1671 byte(s)
Cosmetics and adapted to new creation procedure `make' from CREATE_TYPE.

1 indexing
2 description: "Actual type for NONE."
3 date: "$Date$"
4 revision: "$Revision$"
5
6 class
7 NONE_A
8
9 inherit
10 TYPE_A
11 redefine
12 is_none, dump, type_i, same_as,
13 internal_conform_to
14 end
15
16 feature -- Comparison
17
18 is_equivalent (other: like Current): BOOLEAN is
19 -- Is `other' equivalent to the current object ?
20 do
21 Result := True
22 end
23
24 feature -- Properties
25
26 is_none: BOOLEAN is True
27 -- Is the current type a none type ?
28
29 feature -- Access
30
31 same_as (other: TYPE_A): BOOLEAN is
32 -- Is the current type the same as `other' ?
33 do
34 Result := other.is_none
35 end
36
37 associated_class: CLASS_C is
38 do
39 -- No associated class
40 end
41
42 feature -- Output
43
44 dump: STRING is "NONE"
45 -- Dumped trace
46
47 ext_append_to (st: STRUCTURED_TEXT; f: E_FEATURE) is
48 do
49 st.add (ti_none_class)
50 end
51
52 feature {COMPILER_EXPORTER}
53
54 create_info: CREATE_TYPE is
55 -- Byte code information for entity type creation
56 do
57 create Result.make (type_i)
58 end
59
60 type_i: NONE_I is
61 -- Void C type
62 once
63 Result := None_c_type
64 end
65
66 internal_conform_to (other: TYPE_A in_generics: BOOLEAN): BOOLEAN is
67 -- Does `other' conform to Current ?
68 do
69 -- If `other' is a basic, a BIT or an expanded type, it is not
70 -- conform to NONE.
71 --| When doing the check for `is_basic', we also check that `other'
72 --| can be a BIT type, so we do not need to add the check `other.is_bits'.
73 -- FIXME: This test needs to be done, but since it's causing to much trouble for now
74 -- we just desactivated it and we are back to the previous implementation
75 -- Result := not (other.is_basic or else other.is_expanded)
76 Result := not other.is_void
77 end
78
79 end -- class NONE_A

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23