retdec
export_table.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_FILEFORMAT_TYPES_EXPORT_TABLE_EXPORT_TABLE_H
8 #define RETDEC_FILEFORMAT_TYPES_EXPORT_TABLE_EXPORT_TABLE_H
9 
10 #include <vector>
11 
13 
14 namespace retdec {
15 namespace fileformat {
16 
21 {
22  private:
23  using exportsIterator = std::vector<Export>::const_iterator;
24  std::vector<Export> exports;
25  std::string expHashCrc32;
26  std::string expHashMd5;
27  std::string expHashSha256;
28  public:
31  std::size_t getNumberOfExports() const;
32  const std::string& getExphashCrc32() const;
33  const std::string& getExphashMd5() const;
34  const std::string& getExphashSha256() const;
35  const Export* getExport(std::size_t exportIndex) const;
36  const Export* getExport(const std::string &name) const;
37  const Export* getExportOnAddress(unsigned long long address) const;
39 
42  exportsIterator begin() const;
43  exportsIterator end() const;
45 
48  void computeHashes();
49  void clear();
50  void addExport(Export &newExport);
51  bool hasExports() const;
52  bool hasExport(const std::string &name) const;
53  bool hasExport(unsigned long long address) const;
54  bool empty() const;
55  void dump(std::string &dumpTable) const;
57 };
58 
59 } // namespace fileformat
60 } // namespace retdec
61 
62 #endif
Definition: export_table.h:21
exportsIterator end() const
Definition: export_table.cpp:112
void clear()
Definition: export_table.cpp:174
const Export * getExportOnAddress(unsigned long long address) const
Definition: export_table.cpp:86
std::vector< Export >::const_iterator exportsIterator
Definition: export_table.h:23
bool hasExports() const
Definition: export_table.cpp:192
const std::string & getExphashSha256() const
Definition: export_table.cpp:48
void computeHashes()
Definition: export_table.cpp:120
bool hasExport(const std::string &name) const
Definition: export_table.cpp:202
std::string expHashMd5
exphash MD5
Definition: export_table.h:26
std::size_t getNumberOfExports() const
Definition: export_table.cpp:21
const std::string & getExphashCrc32() const
Definition: export_table.cpp:30
const Export * getExport(std::size_t exportIndex) const
Definition: export_table.cpp:58
void addExport(Export &newExport)
Definition: export_table.cpp:183
exportsIterator begin() const
Definition: export_table.cpp:103
bool empty() const
Definition: export_table.cpp:221
std::string expHashSha256
exphash SHA256
Definition: export_table.h:27
const std::string & getExphashMd5() const
Definition: export_table.cpp:39
std::string expHashCrc32
exphash CRC32
Definition: export_table.h:25
std::vector< Export > exports
stored exports
Definition: export_table.h:24
void dump(std::string &dumpTable) const
Definition: export_table.cpp:230
Definition: export.h:19
Class for one export.
Definition: archive_wrapper.h:19