1 #ifndef INCLUDE__Function_hxx
2 #define INCLUDE__Function_hxx
5 #include "BasicBlock.hxx"
7 class InformationManager;
8 class QXmlStreamWriter;
12 uint64_t getStartAddress() const { return start_address; }
14 std::string getName() const { return name; }
15 void setName(const std::string& new_name);
17 InformationManager* getManager() const { return manager; }
19 bool isDynamic() const { return dynamic; }
21 void addBasicBlock(BasicBlock* block) {
22 _blocks.insert(std::make_pair(block->getStartAddress(), block));
25 const std::map<uint64_t, BasicBlock*>& blocks() {
29 void serialize(QXmlStreamWriter& stream);
30 static Function* deserialize(QXmlStreamReader& stream, InformationManager* manager);
33 Function(uint64_t start_address, bool dynamic, InformationManager* manager);
36 uint64_t start_address;
38 InformationManager * manager;
39 std::map<uint64_t, BasicBlock*> _blocks;
41 friend class InformationManager;