/[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 44539 - (show annotations)
Wed Aug 4 18:14:58 2004 UTC (15 years, 5 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/none_a.e
File size: 1722 byte(s)
NONE is a named 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, is_full_named_type
13 end
14
15 feature -- Comparison
16
17 is_equivalent (other: like Current): BOOLEAN is
18 -- Is `other' equivalent to the current object ?
19 do
20 Result := True
21 end
22
23 feature -- Properties
24
25 is_none: BOOLEAN is True
26 -- Is the current type a none type ?
27
28 is_full_named_type: BOOLEAN is True
29 -- Current is a full named type.
30
31 feature -- Access
32
33 same_as (other: TYPE_A): BOOLEAN is
34 -- Is the current type the same as `other' ?
35 do
36 Result := other.is_none
37 end
38
39 associated_class: CLASS_C is
40 do
41 -- No associated class
42 end
43
44 feature -- Output
45
46 dump: STRING is "NONE"
47 -- Dumped trace
48
49 ext_append_to (st: STRUCTURED_TEXT; f: E_FEATURE) is
50 do
51 st.add (ti_none_class)
52 end
53
54 feature {COMPILER_EXPORTER}
55
56 create_info: CREATE_TYPE is
57 -- Byte code information for entity type creation
58 do
59 create Result.make (type_i)
60 end
61
62 type_i: NONE_I is
63 -- Void C type
64 once
65 Result := None_c_type
66 end
67
68 conform_to (other: TYPE_A): BOOLEAN is
69 -- Does Current conform to `other'?
70 do
71 -- If `other' is a basic, a BIT or an expanded type, it is not
72 -- conform to NONE.
73 --| When doing the check for `is_basic', we also check that `other'
74 --| can be a BIT type, so we do not need to add the check `other.is_bits'.
75 -- FIXME: This test needs to be done, but since it's causing to much trouble for now
76 -- we just desactivated it and we are back to the previous implementation
77 -- Result := not (other.is_basic or else other.is_expanded)
78 Result := not other.actual_type.is_void
79 end
80
81 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