PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/tybor/Liberty
Specman e | 41 lines | 23 code | 5 blank | 13 comment | 1 complexity | 50a8536d66fa23f8199f213b65577d5a MD5 | raw file
 1class GENERIC_NODE
 2   -- A generic XML node generated by gccxml, i.e. not handled as a specific type.
 3
 4inherit
 5   XML_COMPOSITE_NODE
 6
 7insert
 8   SHARED_SETTINGS
 9      --DESCRIPTIONS
10
11feature {ANY}
12   for_each (a_procedure: PROCEDURE[TUPLE[GCCXML_NODE]])
13      local
14         i: INTEGER; node: GCCXML_NODE
15      do
16         from
17            i := 1
18         until
19            i > children_count
20         loop
21            node ?= child(i)
22            if node /= Void then
23               a_procedure.call([node])
24            end
25
26            i := i + 1
27         end
28      end
29
30end -- class GENERIC_NODE
31-- Copyright (C) 2008-2017: ,2009,2010 Paolo Redaelli
32-- wrappers-generator  is free software: you can redistribute it and/or modify it
33-- under the terms of the GNU General Public License as publhed by the Free
34-- Software Foundation, either version 2 of the License, or (at your option)
35-- any later version.
36-- wrappers-generator is distributed in the hope that it will be useful, but
37-- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
38-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
39-- more details.
40-- You should have received a copy of the GNU General Public License along with
41-- th program.  If not, see <http://www.gnu.org/licenses/>.