#include "core/BasicBlock.hxx"
#include "core/Comment.hxx"
#include "core/events/NewFunctionEvent.hxx"
+#include "core/events/ChangeCommentEvent.hxx"
#include "gui/qt.hxx"
#include <quazip/quazip.h>
return blocks.end();
}
+/* *********************************
+ * Accessors for the Comments map
+ */
+std::pair<
+ std::multimap<uint64_t, Comment*>::const_iterator,
+ std::multimap<uint64_t, Comment*>::const_iterator>
+InformationManager::getComments(uint64_t address) {
+ return comments.equal_range(address);
+}
+
+std::multimap<uint64_t, Comment*>::const_iterator InformationManager::beginComments() {
+ return comments.begin();
+}
+std::multimap<uint64_t, Comment*>::const_iterator InformationManager::endComments() {
+ return comments.end();
+}
/* *********************************
* Accessors for the Interpreter map
}
Comment* InformationManager::newLocalComment(uint64_t address, Function* f) {
- Comment* comment = new Comment(address, this);
+ Comment* comment = new Comment(address, f, this);
comments.insert(std::make_pair(address, comment));
return comment;
}
void InformationManager::finishBasicBlock(BasicBlock*) {
}
-void InformationManager::finnishComment(Comment* c) {
+void InformationManager::finishComment(Comment* c) {
+ LOG4CXX_DEBUG(logger, "Finishing comment " << c->getAddress());
+ ChangeCommentEvent event(c->getAddress(), c->getLocation(), c);
+ dispatch(&event);
}
void InformationManager::deleteFunction(Function* f) {