#include "Function.hxx"
#include "core/events/RenameFunctionEvent.hxx"
#include "InformationManager.hxx"
-
-#include <iostream>
+#include "gui/qt.hxx"
Function::Function(uint64_t start_address, InformationManager* manager)
: start_address(start_address)
manager->dispatch(&event);
}
+void Function::serialize(QXmlStreamWriter& stream) {
+ stream.writeStartElement("function");
+ stream.writeAttribute("name", getName().c_str());
+ stream.writeAttribute("entry", QString::number(getStartAddress(), 16));
+
+ for (auto& blockentry : blocks()) {
+ blockentry.second->serialize(stream);
+ }
+
+ stream.writeEndElement(); // "function"
+}