IDA Domain
string.hpp
Go to the documentation of this file.
1 #ifndef IDA_DOMAIN_STRING_HPP
2 #define IDA_DOMAIN_STRING_HPP
3 
5 #include <strlist.hpp>
6 #include <string>
7 #include <vector>
8 
9 #ifndef SWIG
11 {
12 #endif
13  class Database;
14 
17  {
19  const Database &m_database;
20 
22  Strings() = delete;
23 
24  public:
27  {
29  const Database &m_database;
30 
32  int m_current_index = 0;
33 
35  Iterator() = delete;
36 
37  public:
40  Iterator(const Database &database) : m_database(database)
41  {
42  }
43 
46  std::pair<ea_t, std::string> get_first();
47 
50  std::pair<ea_t, std::string> get_next();
51  };
52 
53  public:
56  Strings(const Database &database) : m_database(database)
57  {
58  }
59 
62  int get_count() const;
63 
67  std::pair<ea_t, std::string> get_at_index(int index) const;
68 
72  std::pair<bool, std::string> get_at(const ea_t ea) const;
73 
76  Iterator get_all() const
77  {
78  return Iterator(m_database);
79  }
80  };
81 #ifndef SWIG
82 }
83 #endif
84 
85 #endif // IDA_DOMAIN_STRING_HPP
Provides access and control over the loaded IDA database.
Definition: database.hpp:25
Iterator for strings extracted from the IDA database.
Definition: string.hpp:27
std::pair< ea_t, std::string > get_first()
Retrieves the first string in the database.
Iterator(const Database &database)
Constructs a string iterator for the given database.
Definition: string.hpp:40
std::pair< ea_t, std::string > get_next()
Retrieves the next string in the database.
Provides access to string-related operations in the IDA database.
Definition: string.hpp:17
std::pair< ea_t, std::string > get_at_index(int index) const
Retrieves the string at the specified index.
Iterator get_all() const
Retrieves an iterator over all extracted strings in the database.
Definition: string.hpp:76
Strings(const Database &database)
Constructs a strings handler for the given database.
Definition: string.hpp:56
int get_count() const
Retrieves the total number of extracted strings.
std::pair< bool, std::string > get_at(const ea_t ea) const
Retrieves the string located at the specified address.
#define IDA_API
Definition: common_defines.hpp:11
#define ABI_VERSION_NS
Definition: version.hpp:17