/[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 30166 - (hide annotations)
Fri Jan 11 01:20:32 2002 UTC (18 years ago) by manus
Original Path: trunk/Src/bench/Eiffel/API/evaluated_type/none_a.e
File size: 1671 byte(s)
Cosmetics and adapted to new creation procedure `make' from CREATE_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 9656 is_none, dump, type_i, same_as,
13 manus 26913 internal_conform_to
14 grator 18 end
15    
16 manus 9656 feature -- Comparison
17    
18     is_equivalent (other: like Current): BOOLEAN is
19     -- Is `other' equivalent to the current object ?
20     do
21     Result := True
22     end
23    
24 dinov 3078 feature -- Properties
25 grator 18
26 manus 9656 is_none: BOOLEAN is True
27 grator 18 -- Is the current type a none type ?
28    
29 dinov 3180 feature -- Access
30    
31     same_as (other: TYPE_A): BOOLEAN is
32     -- Is the current type the same as `other' ?
33     do
34 manus 9656 Result := other.is_none
35     end
36 dinov 3180
37 manus 11302 associated_class: CLASS_C is
38     do
39     -- No associated class
40     end
41    
42 dinov 3078 feature -- Output
43    
44 manus 9656 dump: STRING is "NONE"
45 grator 18 -- Dumped trace
46    
47 manus 26913 ext_append_to (st: STRUCTURED_TEXT; f: E_FEATURE) is
48 grator 296 do
49 manus 30166 st.add (ti_none_class)
50 manus 9656 end
51 grator 296
52 dinov 3180 feature {COMPILER_EXPORTER}
53 dinov 3078
54 manus 9656 create_info: CREATE_TYPE is
55     -- Byte code information for entity type creation
56     do
57 manus 30166 create Result.make (type_i)
58 manus 9656 end
59    
60 grator 18 type_i: NONE_I is
61     -- Void C type
62     once
63 manus 11722 Result := None_c_type
64 manus 9656 end
65 grator 18
66 manus 9656 internal_conform_to (other: TYPE_A in_generics: BOOLEAN): BOOLEAN is
67 grator 18 -- Does `other' conform to Current ?
68     do
69 manus 11263 -- If `other' is a basic, a BIT or an expanded type, it is not
70     -- conform to NONE.
71     --| When doing the check for `is_basic', we also check that `other'
72     --| can be a BIT type, so we do not need to add the check `other.is_bits'.
73 manus 11811 -- FIXME: This test needs to be done, but since it's causing to much trouble for now
74     -- we just desactivated it and we are back to the previous implementation
75     -- Result := not (other.is_basic or else other.is_expanded)
76 manus 26913 Result := not other.is_void
77 manus 9656 end
78 grator 18
79 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