retdec
Private Types | Private Attributes | List of all members
retdec::fileformat::ExportTable Class Reference

#include <export_table.h>

Collaboration diagram for retdec::fileformat::ExportTable:
Collaboration graph
[legend]

Public Member Functions

Getters
std::size_t getNumberOfExports () const
 
const std::string & getExphashCrc32 () const
 
const std::string & getExphashMd5 () const
 
const std::string & getExphashSha256 () const
 
const ExportgetExport (std::size_t exportIndex) const
 
const ExportgetExport (const std::string &name) const
 
const ExportgetExportOnAddress (unsigned long long address) const
 
Iterators
exportsIterator begin () const
 
exportsIterator end () const
 
Other methods
void computeHashes ()
 
void clear ()
 
void addExport (Export &newExport)
 
bool hasExports () const
 
bool hasExport (const std::string &name) const
 
bool hasExport (unsigned long long address) const
 
bool empty () const
 
void dump (std::string &dumpTable) const
 

Private Types

using exportsIterator = std::vector< Export >::const_iterator
 

Private Attributes

std::vector< Exportexports
 stored exports More...
 
std::string expHashCrc32
 exphash CRC32 More...
 
std::string expHashMd5
 exphash MD5 More...
 
std::string expHashSha256
 exphash SHA256 More...
 

Detailed Description

Table of exports

Member Typedef Documentation

◆ exportsIterator

using retdec::fileformat::ExportTable::exportsIterator = std::vector<Export>::const_iterator
private

Member Function Documentation

◆ addExport()

void retdec::fileformat::ExportTable::addExport ( Export newExport)

Add export

Parameters
newExportExport which will be added

◆ begin()

ExportTable::exportsIterator retdec::fileformat::ExportTable::begin ( ) const

Get begin iterator

Returns
Begin iterator

◆ clear()

void retdec::fileformat::ExportTable::clear ( )

Delete all records from table

◆ computeHashes()

void retdec::fileformat::ExportTable::computeHashes ( )

Compute export hashes - CRC32, MD5, SHA256.

◆ dump()

void retdec::fileformat::ExportTable::dump ( std::string &  dumpTable) const

Dump information about all exports in table

Parameters
dumpTableInto this parameter is stored dump of export table in an LLVM style

◆ empty()

bool retdec::fileformat::ExportTable::empty ( ) const

Check if export table is empty

Returns
true if no exports are stored in table, false otherwise

◆ end()

ExportTable::exportsIterator retdec::fileformat::ExportTable::end ( ) const

Get end iterator

Returns
End iterator

◆ getExphashCrc32()

const std::string & retdec::fileformat::ExportTable::getExphashCrc32 ( ) const

Get exphash as CRC32

Returns
Exphash as CRC32

◆ getExphashMd5()

const std::string & retdec::fileformat::ExportTable::getExphashMd5 ( ) const

Get exphash as MD5

Returns
Exphash as MD5

◆ getExphashSha256()

const std::string & retdec::fileformat::ExportTable::getExphashSha256 ( ) const

Get exphash as SHA256

Returns
Exphash as SHA256

◆ getExport() [1/2]

const Export * retdec::fileformat::ExportTable::getExport ( const std::string &  name) const

Get export by name

Parameters
nameName of the export to get
Returns
Pointer to export with the specified name or nullptr if such export not found

◆ getExport() [2/2]

const Export * retdec::fileformat::ExportTable::getExport ( std::size_t  exportIndex) const

Get selected export

Parameters
exportIndexIndex of selected export (indexed from 0)
Returns
Pointer to selected export or nullptr if export index is invalid

◆ getExportOnAddress()

const Export * retdec::fileformat::ExportTable::getExportOnAddress ( unsigned long long  address) const

Get export by address

Parameters
addressAddress of the export to get
Returns
Pointer to export with specified address or nullptr if such export not found

◆ getNumberOfExports()

std::size_t retdec::fileformat::ExportTable::getNumberOfExports ( ) const

Get number of stored exports

Returns
Number of stored exports

◆ hasExport() [1/2]

bool retdec::fileformat::ExportTable::hasExport ( const std::string &  name) const

Check if export with name name exists

Parameters
nameName of export
Returns
true if has export with name name, false otherwise

◆ hasExport() [2/2]

bool retdec::fileformat::ExportTable::hasExport ( unsigned long long  address) const

Check if export on address exists

Parameters
addressAdress of export
Returns
true if has export on address, false otherwise

◆ hasExports()

bool retdec::fileformat::ExportTable::hasExports ( ) const

Find out if there are any exports

Returns
true if there are some exports, false otherwise

Member Data Documentation

◆ expHashCrc32

std::string retdec::fileformat::ExportTable::expHashCrc32
private

exphash CRC32

◆ expHashMd5

std::string retdec::fileformat::ExportTable::expHashMd5
private

exphash MD5

◆ expHashSha256

std::string retdec::fileformat::ExportTable::expHashSha256
private

exphash SHA256

◆ exports

std::vector<Export> retdec::fileformat::ExportTable::exports
private

stored exports


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