IDA Domain
name.hpp
Go to the documentation of this file.
1 #ifndef IDA_DOMAIN_NAME_HPP
2 #define IDA_DOMAIN_NAME_HPP
3 
5 #include <string>
6 #include <vector>
7 
8 #ifndef SWIG
10 {
11 #endif
12  class Database;
13 
15  class IDA_API Names
16  {
18  const Database &m_database;
19 
21  Names() = delete;
22 
23  public:
26  {
28  const Database &m_database;
29 
31  int m_current_index = 0;
32 
34  Iterator() = delete;
35 
36  public:
39  Iterator(const Database &database) : m_database(database)
40  {
41  }
42 
45  std::pair<ea_t, std::string> get_first();
46 
49  std::pair<ea_t, std::string> get_next();
50  };
51 
52  public:
55  Names(const Database &database) : m_database(database)
56  {
57  }
58 
62  std::pair<bool, std::string> get_at(const ea_t ea) const;
63 
66  int get_count() const;
67 
71  std::pair<ea_t, std::string> get_at_index(int index) const;
72 
75  Iterator get_all() const
76  {
77  return Iterator(m_database);
78  }
79  };
80 #ifndef SWIG
81 }
82 #endif
83 
84 #endif // IDA_DOMAIN_NAME_HPP
Provides access and control over the loaded IDA database.
Definition: database.hpp:25
Iterator for named elements (e.g., labels, symbols) in the IDA database.
Definition: name.hpp:26
std::pair< ea_t, std::string > get_next()
Retrieves the next named element in the database.
Iterator(const Database &database)
Constructs a names iterator for the given database.
Definition: name.hpp:39
std::pair< ea_t, std::string > get_first()
Retrieves the first named element in the database.
Provides access to symbol and label management in the IDA database.
Definition: name.hpp:16
std::pair< ea_t, std::string > get_at_index(int index) const
Retrieves the named element at the specified index.
int get_count() const
Retrieves the total number of named elements in the database.
Names(const Database &database)
Constructs a names handler for the given database.
Definition: name.hpp:55
Iterator get_all() const
Returns an iterator over all named elements in the database.
Definition: name.hpp:75
std::pair< bool, std::string > get_at(const ea_t ea) const
Retrieves the name at the specified address.
#define IDA_API
Definition: common_defines.hpp:11
#define ABI_VERSION_NS
Definition: version.hpp:17