/[eiffelstudio]/trunk/Src/Eiffel/API/evaluated_type/none_a.e
ViewVC logotype

Annotation of /trunk/Src/Eiffel/API/evaluated_type/none_a.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 70996 - (hide annotations)
Thu Nov 1 18:18:11 2007 UTC (12 years, 3 months ago) by alexk
File size: 3061 byte(s)
Ensured NONE does not conform to an attached type.
1 dinov 3375 indexing
2 manus 27398 description: "Actual type for NONE."
3 manus 56535 legal: "See notice at end of class."
4     status: "See notice at end of class."
5 manus 9656 date: "$Date$"
6 manus 27398 revision: "$Revision$"
7 dinov 3375
8 manus 9656 class
9     NONE_A
10 grator 18
11     inherit
12 manus 9656 TYPE_A
13 grator 18 redefine
14 manus 44539 is_none, dump, type_i, same_as, is_full_named_type
15 grator 18 end
16    
17 manus 57234 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 manus 9656 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 dinov 3078 feature -- Properties
34 grator 18
35 manus 9656 is_none: BOOLEAN is True
36 grator 18 -- Is the current type a none type ?
37    
38 manus 44539 is_full_named_type: BOOLEAN is True
39     -- Current is a full named type.
40    
41 dinov 3180 feature -- Access
42    
43     same_as (other: TYPE_A): BOOLEAN is
44     -- Is the current type the same as `other' ?
45     do
46 manus 9656 Result := other.is_none
47     end
48 dinov 3180
49 manus 11302 associated_class: CLASS_C is
50     do
51     -- No associated class
52     end
53    
54 dinov 3078 feature -- Output
55    
56 manus 9656 dump: STRING is "NONE"
57 grator 18 -- Dumped trace
58    
59 martins 67227 ext_append_to (st: TEXT_FORMATTER; c: CLASS_C) is
60 grator 296 do
61 manus 30166 st.add (ti_none_class)
62 manus 9656 end
63 grator 296
64 dinov 3180 feature {COMPILER_EXPORTER}
65 dinov 3078
66 manus 9656 create_info: CREATE_TYPE is
67     -- Byte code information for entity type creation
68     do
69 manus 30166 create Result.make (type_i)
70 manus 9656 end
71    
72 grator 18 type_i: NONE_I is
73     -- Void C type
74     once
75 manus 11722 Result := None_c_type
76 manus 9656 end
77 grator 18
78 manus 41740 conform_to (other: TYPE_A): BOOLEAN is
79     -- Does Current conform to `other'?
80 manus 48130 local
81     l_type: TYPE_A
82 grator 18 do
83 alexk 70996 -- If `other' is attached, then NONE does not conform to it.
84 manus 48130 -- But it should not be `VOID_A' since VOID_A is only used as
85     -- return type for procedure
86 alexk 55786 l_type := other.conformance_type
87 alexk 70996 Result := not l_type.is_expanded and not l_type.is_void and then not l_type.is_attached
88 manus 9656 end
89 grator 18
90 manus 56535 indexing
91     copyright: "Copyright (c) 1984-2006, Eiffel Software"
92 manus 58027 license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
93 manus 56535 licensing_options: "http://www.eiffel.com/licensing"
94     copying: "[
95     This file is part of Eiffel Software's Eiffel Development Environment.
96 manus 58027
97 manus 56535 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 manus 58027
103 manus 56535 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 manus 58027
109 manus 56535 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 dinov 3375 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