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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 44539 - (hide 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 dinov 3375 indexing
2 manus 27398 description: "Actual type for NONE."
3 manus 9656 date: "$Date$"
4 manus 27398 revision: "$Revision$"
5 dinov 3375
6 manus 9656 class
7     NONE_A
8 grator 18
9     inherit
10 manus 9656 TYPE_A
11 grator 18 redefine
12 manus 44539 is_none, dump, type_i, same_as, is_full_named_type
13 grator 18 end
14    
15 manus 9656 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 dinov 3078 feature -- Properties
24 grator 18
25 manus 9656 is_none: BOOLEAN is True
26 grator 18 -- Is the current type a none type ?
27    
28 manus 44539 is_full_named_type: BOOLEAN is True
29     -- Current is a full named type.
30    
31 dinov 3180 feature -- Access
32    
33     same_as (other: TYPE_A): BOOLEAN is
34     -- Is the current type the same as `other' ?
35     do
36 manus 9656 Result := other.is_none
37     end
38 dinov 3180
39 manus 11302 associated_class: CLASS_C is
40     do
41     -- No associated class
42     end
43    
44 dinov 3078 feature -- Output
45    
46 manus 9656 dump: STRING is "NONE"
47 grator 18 -- Dumped trace
48    
49 manus 26913 ext_append_to (st: STRUCTURED_TEXT; f: E_FEATURE) is
50 grator 296 do
51 manus 30166 st.add (ti_none_class)
52 manus 9656 end
53 grator 296
54 dinov 3180 feature {COMPILER_EXPORTER}
55 dinov 3078
56 manus 9656 create_info: CREATE_TYPE is
57     -- Byte code information for entity type creation
58     do
59 manus 30166 create Result.make (type_i)
60 manus 9656 end
61    
62 grator 18 type_i: NONE_I is
63     -- Void C type
64     once
65 manus 11722 Result := None_c_type
66 manus 9656 end
67 grator 18
68 manus 41740 conform_to (other: TYPE_A): BOOLEAN is
69     -- Does Current conform to `other'?
70 grator 18 do
71 manus 11263 -- 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 manus 11811 -- 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 manus 41740 Result := not other.actual_type.is_void
79 manus 9656 end
80 grator 18
81 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