retdec
Private Attributes | List of all members
retdec::fileinfo::ResourceTable Class Reference

#include <resource_table.h>

Collaboration diagram for retdec::fileinfo::ResourceTable:
Collaboration graph
[legend]

Public Member Functions

Getters
std::size_t getNumberOfResources () const
 
std::size_t getNumberOfLanguages () const
 
std::size_t getNumberOfStrings () const
 
std::string getResourceCrc32 (std::size_t index) const
 
std::string getResourceMd5 (std::size_t index) const
 
std::string getResourceSha256 (std::size_t index) const
 
std::string getResourceIconhashCrc32 () const
 
std::string getResourceIconhashMd5 () const
 
std::string getResourceIconhashSha256 () const
 
std::string getResourceIconPerceptualAvgHash () const
 
std::string getResourceIconPerceptualDCTpHash () const
 
const retdec::fileformat::ResourcegetResource (std::size_t position) const
 
std::string getResourceName (std::size_t index) const
 
std::string getResourceType (std::size_t index) const
 
std::string getResourceLanguage (std::size_t index) const
 
std::string getLanguageLcid (std::size_t index) const
 
std::string getLanguageCodePage (std::size_t index) const
 
std::string getStringName (std::size_t index) const
 
std::string getStringValue (std::size_t index) const
 
std::string getResourceNameIdStr (std::size_t index, std::ios_base &(*format)(std::ios_base &)) const
 
std::string getResourceTypeIdStr (std::size_t index, std::ios_base &(*format)(std::ios_base &)) const
 
std::string getResourceLanguageIdStr (std::size_t index, std::ios_base &(*format)(std::ios_base &)) const
 
std::string getResourceSublanguageIdStr (std::size_t index, std::ios_base &(*format)(std::ios_base &)) const
 
std::string getResourceOffsetStr (std::size_t index, std::ios_base &(*format)(std::ios_base &)) const
 
std::string getResourceSizeStr (std::size_t index, std::ios_base &(*format)(std::ios_base &)) const
 
Setters
void setTable (const retdec::fileformat::ResourceTable *resourceTable)
 
Other methods
bool hasRecords () const
 

Private Attributes

const retdec::fileformat::ResourceTabletable = nullptr
 

Detailed Description

Class for resource table

Value std::numeric_limits<std::size_t>::max() mean unspecified value or error for numeric types. Methods with index parameters does not perform control of indexes.

Member Function Documentation

◆ getLanguageCodePage()

std::string retdec::fileinfo::ResourceTable::getLanguageCodePage ( std::size_t  index) const

Get code page of supported language

Parameters
indexIndex of selected code page (indexed from 0)
Returns
Code page of supported language

◆ getLanguageLcid()

std::string retdec::fileinfo::ResourceTable::getLanguageLcid ( std::size_t  index) const

Get LCID of supported language

Parameters
indexIndex of selected supported language (indexed from 0)
Returns
LCID of supported language

◆ getNumberOfLanguages()

std::size_t retdec::fileinfo::ResourceTable::getNumberOfLanguages ( ) const

Get number of supported languages

Returns
Number of supported languages

◆ getNumberOfResources()

std::size_t retdec::fileinfo::ResourceTable::getNumberOfResources ( ) const

Get number of resources in table

Returns
Number of resources in table

◆ getNumberOfStrings()

std::size_t retdec::fileinfo::ResourceTable::getNumberOfStrings ( ) const

Get number of strings

Returns
Number of strings

◆ getResource()

const retdec::fileformat::Resource * retdec::fileinfo::ResourceTable::getResource ( std::size_t  position) const

Get resource

Parameters
positionIndex of selected resource from table (indexed from 0)
Returns
Resource

◆ getResourceCrc32()

std::string retdec::fileinfo::ResourceTable::getResourceCrc32 ( std::size_t  index) const

Get CRC32 of selected resource

Parameters
indexIndex of selected resource (indexed from 0)
Returns
CRC32 of selected resource

◆ getResourceIconhashCrc32()

std::string retdec::fileinfo::ResourceTable::getResourceIconhashCrc32 ( ) const

Get iconhash as CRC32

Returns
Iconhash as CRC32

◆ getResourceIconhashMd5()

std::string retdec::fileinfo::ResourceTable::getResourceIconhashMd5 ( ) const

Get iconhash as MD5

Returns
Iconhash as MD5

◆ getResourceIconhashSha256()

std::string retdec::fileinfo::ResourceTable::getResourceIconhashSha256 ( ) const

Get iconhash as SHA256

Returns
Iconhash as SHA256

◆ getResourceIconPerceptualAvgHash()

std::string retdec::fileinfo::ResourceTable::getResourceIconPerceptualAvgHash ( ) const

Get icon perceptual hash as AvgHash

Returns
Icon perceptual hash as AvgHash

◆ getResourceIconPerceptualDCTpHash()

std::string retdec::fileinfo::ResourceTable::getResourceIconPerceptualDCTpHash ( ) const

◆ getResourceLanguage()

std::string retdec::fileinfo::ResourceTable::getResourceLanguage ( std::size_t  index) const

Get language of selected resource

Parameters
indexIndex of selected resource (indexed from 0)
Returns
Language of selected resource

◆ getResourceLanguageIdStr()

std::string retdec::fileinfo::ResourceTable::getResourceLanguageIdStr ( std::size_t  index,
std::ios_base &(*)(std::ios_base &)  format 
) const

Get language ID of selected resource

Parameters
indexIndex of selected resource (indexed from 0)
formatFormat of resulting string (e.g. std::dec, std::hex)
Returns
Language ID of selected resource

◆ getResourceMd5()

std::string retdec::fileinfo::ResourceTable::getResourceMd5 ( std::size_t  index) const

Get MD5 of selected resource

Parameters
indexIndex of selected resource (indexed from 0)
Returns
MD5 of selected resource

◆ getResourceName()

std::string retdec::fileinfo::ResourceTable::getResourceName ( std::size_t  index) const

Get name of selected resource

Parameters
indexIndex of selected resource (indexed from 0)
Returns
Name of selected resource

◆ getResourceNameIdStr()

std::string retdec::fileinfo::ResourceTable::getResourceNameIdStr ( std::size_t  index,
std::ios_base &(*)(std::ios_base &)  format 
) const

Get name ID of selected resource

Parameters
indexIndex of selected resource (indexed from 0)
formatFormat of resulting string (e.g. std::dec, std::hex)
Returns
Name ID of selected resource

◆ getResourceOffsetStr()

std::string retdec::fileinfo::ResourceTable::getResourceOffsetStr ( std::size_t  index,
std::ios_base &(*)(std::ios_base &)  format 
) const

Get offset of selected resource

Parameters
indexIndex of selected resource (indexed from 0)
formatFormat of resulting string (e.g. std::dec, std::hex)
Returns
Offset of selected resource

◆ getResourceSha256()

std::string retdec::fileinfo::ResourceTable::getResourceSha256 ( std::size_t  index) const

Get SHA256 of selected resource

Parameters
indexIndex of selected resource (indexed from 0)
Returns
SHA256 of selected resource

◆ getResourceSizeStr()

std::string retdec::fileinfo::ResourceTable::getResourceSizeStr ( std::size_t  index,
std::ios_base &(*)(std::ios_base &)  format 
) const

Get size of selected resource

Parameters
indexIndex of selected resource (indexed from 0)
formatFormat of resulting string (e.g. std::dec, std::hex)
Returns
Size of selected resource

◆ getResourceSublanguageIdStr()

std::string retdec::fileinfo::ResourceTable::getResourceSublanguageIdStr ( std::size_t  index,
std::ios_base &(*)(std::ios_base &)  format 
) const

Get sublanguage ID of selected resource

Parameters
indexIndex of selected resource (indexed from 0)
formatFormat of resulting string (e.g. std::dec, std::hex)
Returns
Sublanguage ID of selected resource

◆ getResourceType()

std::string retdec::fileinfo::ResourceTable::getResourceType ( std::size_t  index) const

Get type of selected resource

Parameters
indexIndex of selected resource (indexed from 0)
Returns
Type of selected resource

◆ getResourceTypeIdStr()

std::string retdec::fileinfo::ResourceTable::getResourceTypeIdStr ( std::size_t  index,
std::ios_base &(*)(std::ios_base &)  format 
) const

Get type ID of selected resource

Parameters
indexIndex of selected resource (indexed from 0)
formatFormat of resulting string (e.g. std::dec, std::hex)
Returns
Type ID of selected resource

◆ getStringName()

std::string retdec::fileinfo::ResourceTable::getStringName ( std::size_t  index) const

Get name of selected string

Parameters
indexIndex of selected string (indexed from 0)
Returns
Name of string

◆ getStringValue()

std::string retdec::fileinfo::ResourceTable::getStringValue ( std::size_t  index) const

Get value of selected string

Parameters
indexIndex of selected string (indexed from 0)
Returns
Value of string

◆ hasRecords()

bool retdec::fileinfo::ResourceTable::hasRecords ( ) const

Find out if there are any resources

Returns
true if there are some resources, false otherwise

◆ setTable()

void retdec::fileinfo::ResourceTable::setTable ( const retdec::fileformat::ResourceTable resourceTable)

Set resource table data

Parameters
resourceTableInstance of class with original information about resource table

Member Data Documentation

◆ table

const retdec::fileformat::ResourceTable* retdec::fileinfo::ResourceTable::table = nullptr
private

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