]> git.siccegge.de Git - frida/frida.git/blob - src/core/Comment.cxx
Implement InformationManager / Comment and ChangeCommentEvent
[frida/frida.git] / src / core / Comment.cxx
1 #include "Comment.hxx"
2 #include "Function.hxx"
3 #include "InformationManager.hxx"
4 #include "events/ChangeCommentEvent.hxx"
5
6 Comment::Comment(uint64_t address, InformationManager* manager)
7 : address(address)
8 , location(NULL)
9 , manager(manager) {}
10
11 Comment::Comment(uint64_t address, Function* location, InformationManager* manager)
12 : address(address)
13 , location(location)
14 , manager(manager) {}
15
16 void Comment::setText(const std::string& text) {
17 ChangeCommentEvent event(address, location, this);
18 this->text = text;
19 manager->dispatch(&event);
20 }
21
22 uint64_t Comment::getAddress() {
23 return address;
24 }
25
26 Function* Comment::getLocation() {
27 return location;
28 }