Add doc repo as submodule
[frida/frida.git] / src / core / Comment.hxx
1 #ifndef INCLUDE__Comment_hxx
2 #define INCLUDE__Comment_hxx
3
4 #include <string>
5
6 class Function;
7 class InformationManager;
8
9 class QXmlStreamWriter;
10 class QXmlStreamReader;
11
12 class Comment {
13 public:
14 bool isLocal() const {return location == NULL;}
15
16 void setText(const std::string& text);
17 std::string getText() const {return text;}
18 uint64_t getAddress();
19 Function* getLocation();
20
21 void serialize(QXmlStreamWriter& stream);
22 static Comment* deserialize(QXmlStreamReader& stream, InformationManager* manager, Function* function = NULL);
23
24 private:
25 Comment(uint64_t address, InformationManager* manager);
26 Comment(uint64_t address, Function* location, InformationManager* manager);
27
28 uint64_t address;
29 Function* location;
30 InformationManager* manager;
31 std::string text;
32
33 friend class InformationManager;
34 };
35
36 #endif /* INCLUDE__Comment_hxx */