/[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 41740 - (hide 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 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 41740 is_none, dump, type_i, same_as
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 dinov 3180 feature -- Access
29    
30     same_as (other: TYPE_A): BOOLEAN is
31     -- Is the current type the same as `other' ?
32     do
33 manus 9656 Result := other.is_none
34     end
35 dinov 3180
36 manus 11302 associated_class: CLASS_C is
37     do
38     -- No associated class
39     end
40    
41 dinov 3078 feature -- Output
42    
43 manus 9656 dump: STRING is "NONE"
44 grator 18 -- Dumped trace
45    
46 manus 26913 ext_append_to (st: STRUCTURED_TEXT; f: E_FEATURE) is
47 grator 296 do
48 manus 30166 st.add (ti_none_class)
49 manus 9656 end
50 grator 296
51 dinov 3180 feature {COMPILER_EXPORTER}
52 dinov 3078
53 manus 9656 create_info: CREATE_TYPE is
54     -- Byte code information for entity type creation
55     do
56 manus 30166 create Result.make (type_i)
57 manus 9656 end
58    
59 grator 18 type_i: NONE_I is
60     -- Void C type
61     once
62 manus 11722 Result := None_c_type
63 manus 9656 end
64 grator 18
65 manus 41740 conform_to (other: TYPE_A): BOOLEAN is
66     -- Does Current conform to `other'?
67 grator 18 do
68 manus 11263 -- 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 manus 11811 -- 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 manus 41740 Result := not other.actual_type.is_void
76 manus 9656 end
77 grator 18
78 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