+ def get_enums_and_functions(self, filename, aclass):
+ file_path = os.path.dirname(filename)
+ enum_filename = os.path.join(file_path, aclass.name[2:] + "_8h.xml")
+ if os.path.exists(enum_filename):
+ root = minidom.parse(enum_filename).documentElement
+ for method in root.getElementsByTagName("memberdef"):
+ if method.getAttribute("kind") == "enum":
+ self.parse_enum(aclass, method, root)
+
+ def parse_enum(self, new_class, enum, root):
+ enum_name = ""
+ enum_values = []
+
+ for node in enum.childNodes:
+ if node.nodeName == "name":
+ enum_name = getTextValue(node)
+ elif node.nodeName == "enumvalue":
+ enum_values.append(getTextValue(node.getElementsByTagName("name")[0]))
+
+ new_class.enums[enum_name] = enum_values
+