/[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 41740 - (show annotations)
Fri Mar 5 19:07:40 2004 UTC (15 years, 10 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/none_a.e
File size: 1628 byte(s)
Renamed `internal_conform_to' into `conform_to' since `internal_conform_to'
  has now been removed from parent.
Fixed `conform_to' to use `not other.actual_type.is_void'

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 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 feature -- Access
29
30 same_as (other: TYPE_A): BOOLEAN is
31 -- Is the current type the same as `other' ?
32 do
33 Result := other.is_none
34 end
35
36 associated_class: CLASS_C is
37 do
38 -- No associated class
39 end
40
41 feature -- Output
42
43 dump: STRING is "NONE"
44 -- Dumped trace
45
46 ext_append_to (st: STRUCTURED_TEXT; f: E_FEATURE) is
47 do
48 st.add (ti_none_class)
49 end
50
51 feature {COMPILER_EXPORTER}
52
53 create_info: CREATE_TYPE is
54 -- Byte code information for entity type creation
55 do
56 create Result.make (type_i)
57 end
58
59 type_i: NONE_I is
60 -- Void C type
61 once
62 Result := None_c_type
63 end
64
65 conform_to (other: TYPE_A): BOOLEAN is
66 -- Does Current conform to `other'?
67 do
68 -- If `other' is a basic, a BIT or an expanded type, it is not
69 -- conform to NONE.
70 --| When doing the check for `is_basic', we also check that `other'
71 --| can be a BIT type, so we do not need to add the check `other.is_bits'.
72 -- FIXME: This test needs to be done, but since it's causing to much trouble for now
73 -- we just desactivated it and we are back to the previous implementation
74 -- Result := not (other.is_basic or else other.is_expanded)
75 Result := not other.actual_type.is_void
76 end
77
78 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