/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

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