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 {
16 std::string getName() const
18 void setName(const std::string& new_name);
20 InformationManager* getManager() const {
24 void addBasicBlock(BasicBlock* block) {
25 _blocks.insert(std::make_pair(block->getStartAddress(), block));
28 const std::map<uint64_t, BasicBlock*>& blocks() {
32 void serialize(QXmlStreamWriter& stream);
33 static Function* deserialize(QXmlStreamReader& stream, InformationManager* manager);
36 Function(uint64_t start_address, InformationManager* manager);
39 uint64_t start_address;
40 InformationManager * manager;
41 std::map<uint64_t, BasicBlock*> _blocks;
43 friend class InformationManager;