decompiler
1.0.0
|
An interface to a container of comments. More...
#include <comment.hh>
Public Member Functions | |
CommentDatabase (void) | |
Constructor. | |
virtual | ~CommentDatabase (void) |
Destructor. | |
virtual void | clear (void)=0 |
Clear all comments from this container. | |
virtual void | clearType (const Address &fad, uint4 tp)=0 |
Clear all comments matching (one of) the indicated types. More... | |
virtual void | addComment (uint4 tp, const Address &fad, const Address &ad, const string &txt)=0 |
Add a new comment to the container. More... | |
virtual bool | addCommentNoDuplicate (uint4 tp, const Address &fad, const Address &ad, const string &txt)=0 |
Add a new comment to the container, making sure there is no duplicate. More... | |
virtual void | deleteComment (Comment *com)=0 |
Remove the given Comment object from the container. More... | |
virtual CommentSet::const_iterator | beginComment (const Address &fad) const =0 |
Get an iterator to the beginning of comments for a single function. More... | |
virtual CommentSet::const_iterator | endComment (const Address &fad) const =0 |
Get an iterator to the ending of comments for a single function. More... | |
virtual void | encode (Encoder &encoder) const =0 |
Encode all comments in the container to a stream. More... | |
virtual void | decode (Decoder &decoder)=0 |
Restore all comments from a <commentdb> element. More... | |
An interface to a container of comments.
Comments can be added (and removed) from a database, keying on the function and address the Comment is attached to. The interface can generate a begin and end iterator covering all Comment objects for a single function.
|
pure virtual |
Add a new comment to the container.
tp | is a set of properties to associate with the new comment (may be zero) |
fad | is the address of the function to which the comment belongs |
ad | is the address to which the comment is attached |
txt | is the body of the comment |
Implemented in ghidra::CommentDatabaseInternal, and ghidra::CommentDatabaseGhidra.
|
pure virtual |
Add a new comment to the container, making sure there is no duplicate.
If there is already a comment at the same address with the same body, no new comment is added.
tp | is a set of properties to associate with the new comment (may be zero) |
fad | is the address of the function to which the comment belongs |
ad | is the address to which the comment is attached |
txt | is the body of the comment |
Implemented in ghidra::CommentDatabaseInternal, and ghidra::CommentDatabaseGhidra.
Referenced by ghidra::Funcdata::warning(), and ghidra::Funcdata::warningHeader().
|
pure virtual |
Get an iterator to the beginning of comments for a single function.
fad | is the address of the function |
Implemented in ghidra::CommentDatabaseInternal, and ghidra::CommentDatabaseGhidra.
Referenced by ghidra::CommentSorter::setupFunctionList().
|
pure virtual |
Clear all comments matching (one of) the indicated types.
Clearing is restricted to comments belonging to a specific function and matching at least one of the given properties
fad | is the address of the owning function |
tp | is a set of one or more properties |
Implemented in ghidra::CommentDatabaseInternal, and ghidra::CommentDatabaseGhidra.
|
pure virtual |
Restore all comments from a <commentdb> element.
decoder | is the stream decoder |
Implemented in ghidra::CommentDatabaseInternal, and ghidra::CommentDatabaseGhidra.
|
pure virtual |
Remove the given Comment object from the container.
com | is the given Comment |
Implemented in ghidra::CommentDatabaseInternal, and ghidra::CommentDatabaseGhidra.
|
pure virtual |
Encode all comments in the container to a stream.
Writes a <commentdb> element, with <comment> children for each Comment object.
encoder | is the stream encoder |
Implemented in ghidra::CommentDatabaseInternal, and ghidra::CommentDatabaseGhidra.
|
pure virtual |
Get an iterator to the ending of comments for a single function.
fad | is the address of the function |
Implemented in ghidra::CommentDatabaseInternal, and ghidra::CommentDatabaseGhidra.
Referenced by ghidra::CommentSorter::setupFunctionList().