/[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 57234 - (show annotations)
Thu Mar 2 01:57:13 2006 UTC (13 years, 10 months ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/none_a.e
File size: 3022 byte(s)
Wrote a TYPE_A visitor.

1 indexing
2 description: "Actual type for NONE."
3 legal: "See notice at end of class."
4 status: "See notice at end of class."
5 date: "$Date$"
6 revision: "$Revision$"
7
8 class
9 NONE_A
10
11 inherit
12 TYPE_A
13 redefine
14 is_none, dump, type_i, same_as, is_full_named_type
15 end
16
17 feature -- Visitor
18
19 process (v: TYPE_A_VISITOR) is
20 -- Process current element.
21 do
22 v.process_none_a (Current)
23 end
24
25 feature -- Comparison
26
27 is_equivalent (other: like Current): BOOLEAN is
28 -- Is `other' equivalent to the current object ?
29 do
30 Result := True
31 end
32
33 feature -- Properties
34
35 is_none: BOOLEAN is True
36 -- Is the current type a none type ?
37
38 is_full_named_type: BOOLEAN is True
39 -- Current is a full named type.
40
41 feature -- Access
42
43 same_as (other: TYPE_A): BOOLEAN is
44 -- Is the current type the same as `other' ?
45 do
46 Result := other.is_none
47 end
48
49 associated_class: CLASS_C is
50 do
51 -- No associated class
52 end
53
54 feature -- Output
55
56 dump: STRING is "NONE"
57 -- Dumped trace
58
59 ext_append_to (st: STRUCTURED_TEXT; f: E_FEATURE) is
60 do
61 st.add (ti_none_class)
62 end
63
64 feature {COMPILER_EXPORTER}
65
66 create_info: CREATE_TYPE is
67 -- Byte code information for entity type creation
68 do
69 create Result.make (type_i)
70 end
71
72 type_i: NONE_I is
73 -- Void C type
74 once
75 Result := None_c_type
76 end
77
78 conform_to (other: TYPE_A): BOOLEAN is
79 -- Does Current conform to `other'?
80 local
81 l_type: TYPE_A
82 do
83 -- If `other' is expanded, then it does not conform to NONE.
84 -- But it should not be `VOID_A' since VOID_A is only used as
85 -- return type for procedure
86 l_type := other.conformance_type
87 Result := not l_type.is_expanded and not l_type.is_void
88 end
89
90 indexing
91 copyright: "Copyright (c) 1984-2006, Eiffel Software"
92 license: "GPL version 2 see http://www.eiffel.com/licensing/gpl.txt)"
93 licensing_options: "http://www.eiffel.com/licensing"
94 copying: "[
95 This file is part of Eiffel Software's Eiffel Development Environment.
96
97 Eiffel Software's Eiffel Development Environment is free
98 software; you can redistribute it and/or modify it under
99 the terms of the GNU General Public License as published
100 by the Free Software Foundation, version 2 of the License
101 (available at the URL listed under "license" above).
102
103 Eiffel Software's Eiffel Development Environment is
104 distributed in the hope that it will be useful, but
105 WITHOUT ANY WARRANTY; without even the implied warranty
106 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
107 See the GNU General Public License for more details.
108
109 You should have received a copy of the GNU General Public
110 License along with Eiffel Software's Eiffel Development
111 Environment; if not, write to the Free Software Foundation,
112 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
113 ]"
114 source: "[
115 Eiffel Software
116 356 Storke Road, Goleta, CA 93117 USA
117 Telephone 805-685-1006, Fax 805-685-6869
118 Website http://www.eiffel.com
119 Customer support http://support.eiffel.com
120 ]"
121
122 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