X-Git-Url: https://git.siccegge.de//index.cgi?a=blobdiff_plain;f=src%2Fcore%2FFunction.hxx;h=d567c28c4828b4763378fd0cbed5b5adb3a42795;hb=f7cd60ef2104cf8f74ea06f58906acda4aef3e29;hp=39d3f51b47cc39aab43c453f0cf3edc4b598b55f;hpb=bb5959013f2daeff2c0639e868d6406500dc17fb;p=frida%2Ffrida.git diff --git a/src/core/Function.hxx b/src/core/Function.hxx index 39d3f51..d567c28 100644 --- a/src/core/Function.hxx +++ b/src/core/Function.hxx @@ -5,23 +5,17 @@ #include "BasicBlock.hxx" class InformationManager; +class QXmlStreamWriter; class Function { public: - Function(const std::string& name, uint64_t start_address, - InformationManager* manager) - : name(name) - , start_address(start_address) - ,manager(manager) {} - uint64_t getStartAddress() const { return start_address; } std::string getName() const { return name; } - void setName(const std::string& new_name) - { name = new_name; } + void setName(const std::string& new_name); InformationManager* getManager() const { return manager; @@ -31,14 +25,20 @@ public: _blocks.insert(std::make_pair(block->getStartAddress(), block)); } - std::map& blocks() { + const std::map& blocks() { return _blocks; } + + void serialize(QXmlStreamWriter& stream); private: + Function(uint64_t start_address, InformationManager* manager); + std::string name; uint64_t start_address; InformationManager * manager; std::map _blocks; + + friend class InformationManager; }; #endif