IDA Domain
Comments Class Reference

Provides access to user-defined comments in the IDA database. More...

#include <comment.hpp>

Classes

class  Iterator
 Iterator for user-defined comments in the IDA database. More...
 

Public Member Functions

 Comments (const Database &database)
 Constructs a comment manager for the given database. More...
 
std::pair< bool, std::string > get (const ea_t ea) const
 Retrieves the comment at the specified address. More...
 
bool set (const ea_t ea, const std::string &comment) const
 Sets a comment at the specified address. More...
 
Iterator get_all (bool include_repeatable) const
 Creates an iterator for all comments in the database. More...
 

Detailed Description

Provides access to user-defined comments in the IDA database.

Constructor & Destructor Documentation

◆ Comments()

Comments::Comments ( const Database database)
inline

Constructs a comment manager for the given database.

Parameters
databaseReference to the active IDA database.

Member Function Documentation

◆ get()

std::pair<bool, std::string> Comments::get ( const ea_t  ea) const

Retrieves the comment at the specified address.

Parameters
eaThe effective address.
Returns
A pair (success, comment string). If no comment exists, success is false.

◆ get_all()

Iterator Comments::get_all ( bool  include_repeatable) const
inline

Creates an iterator for all comments in the database.

Parameters
include_repeatableWhether to include repeatable comments during iteration.
Returns
A CommentsIterator instance.

◆ set()

bool Comments::set ( const ea_t  ea,
const std::string &  comment 
) const

Sets a comment at the specified address.

Parameters
eaThe effective address.
commentThe comment text to assign.
Returns
True if the comment was successfully set, false otherwise.

The documentation for this class was generated from the following file: