X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fcore%2FFunction.hxx;h=75b38c2cd34877fe0349b80eae21b5dc57976fbb;hp=3c8f799543c8d3acb5901951a64cf9bb96246e74;hb=9f53c415cf1554e2d9cc040d3d646ec22fe281f6;hpb=32e87746db981882b95aceddde79ef12034a3405 diff --git a/src/core/Function.hxx b/src/core/Function.hxx index 3c8f799..75b38c2 100644 --- a/src/core/Function.hxx +++ b/src/core/Function.hxx @@ -4,32 +4,43 @@ #include #include "BasicBlock.hxx" +class InformationManager; +class QXmlStreamWriter; + class Function { public: - Function(const std::string& name, uint64_t start_address) - : name(name) - , start_address(start_address) { - } - uint64_t getStartAddress() const { return start_address; } - std::string getName() const { - return name; + std::string getName() const + { return name; } + void setName(const std::string& new_name); + + InformationManager* getManager() const { + return manager; } void addBasicBlock(BasicBlock* block) { _blocks.insert(std::make_pair(block->getStartAddress(), block)); } - std::map& blocks() { + const std::map& blocks() { return _blocks; } + + void serialize(QXmlStreamWriter& stream); + static Function* deserialize(QXmlStreamReader& stream, InformationManager* manager); + private: + Function(uint64_t start_address, InformationManager* manager); + std::string name; uint64_t start_address; + InformationManager * manager; std::map _blocks; + + friend class InformationManager; }; #endif