-for enum in ns.enumerations():
- if enum.name in mapping:
- classname = mapping[enum.name]
- classes[classname] = enum
+
+classes = OrderedDict()
+
+for compound in index.findall('compound'):
+ if compound.attrib['kind'] != 'file':
+ continue
+ filename = os.path.join(
+ os.path.dirname(index_file),
+ '%s.xml' % compound.attrib['refid'])
+ doc = ElementTree.parse(filename)
+ for section in doc.find('compounddef').findall('sectiondef'):
+ if section.attrib["kind"] != 'enum':
+ continue
+ for member in section.findall('memberdef'):
+ if member.attrib["kind"] != 'enum':
+ continue
+ name = member.find('name').text
+ if name in mapping:
+ classes[member] = mapping[name]