PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/src/tools/wrappers-generator/c_union.e

http://github.com/tybor/Liberty
Specman e | 65 lines | 35 code | 15 blank | 15 comment | 2 complexity | 43d1c760a8e78570f008b0d8682901d2 MD5 | raw file
 1class C_UNION
 2
 3inherit
 4    IDENTIFIED_NODE undefine set_name end
 5   CONTEXTED_NODE undefine set_name end
 6
 7       -- hence also a STORABLE_NODE, a NAMED_NODE
 8      -- and a WRAPPER_CLASS
 9  COMPOSED_NODE
10
11   FILED_NODE undefine set_name end
12
13      -- TODO: since it's both named and filed it could also be a MOVABLE_NODE
14
15insert NAME_CONVERTER
16
17create {GCCXML_TREE}
18   make
19
20feature {ANY}
21   store
22      do
23         create {LINKED_LIST[C_FIELD]} fields.make
24         types.fast_put(Current, id)
25         if is_named then
26            symbols.put(Current, c_string_name)
27         else 
28             log("Anonimous union at line #(1)%N" # &line_row)
29         end
30
31         composed_types.fast_put(Current, id)
32      end
33
34   is_fundamental: BOOLEAN False
35
36   is_void: BOOLEAN False
37
38   has_wrapper: BOOLEAN False
39
40   c_type: STRING "union"
41
42   wrapper_type: STRING
43      do
44          debug
45              print(once "C_UNION.wrapper_type requires creation%
46              % of external/expanded types; currently returning an empty string")
47          end
48      not_yet_implemented
49  end
50
51   suffix: STRING "_UNION"
52         -- invariant name.is_equal(once U"Union")
53
54end -- class C_UNION
55-- Copyright (C) 2008-2017: Paolo Redaelli
56-- wrappers-generator  is free software: you can redistribute it and/or modify it
57-- under the terms of the GNU General Public License as publhed by the Free
58-- Software Foundation, either version 2 of the License, or (at your option)
59-- any later version.
60-- wrappers-generator is distributed in the hope that it will be useful, but
61-- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
62-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
63-- more details.
64-- You should have received a copy of the GNU General Public License along with
65-- th program.  If not, see <http://www.gnu.org/licenses/>.