#include <resource.h>
◆ getBits()
bool retdec::fileformat::Resource::getBits |
( |
std::string & |
sResult | ) |
const |
Get content of resource as bits
- Parameters
-
sResult | Read bits in string representation |
- Returns
true
if operation went OK, false
otherwise
◆ getBytes() [1/2]
const llvm::StringRef retdec::fileformat::Resource::getBytes |
( |
std::size_t |
sOffset = 0 , |
|
|
std::size_t |
sSize = 0 |
|
) |
| const |
Get resource content as reference to string
- Parameters
-
sOffset | First byte of the resource data to get (0 means first byte of resource data) |
sSize | Number of resource bytes to get. If this parameter is set to zero, method returns all bytes from sOffset until end of resource data. |
- Returns
- Resource content as reference to string
◆ getBytes() [2/2]
bool retdec::fileformat::Resource::getBytes |
( |
std::vector< unsigned char > & |
sResult, |
|
|
std::size_t |
sOffset = 0 , |
|
|
std::size_t |
sSize = 0 |
|
) |
| const |
Get content of resource as bytes
- Parameters
-
sResult | Read bytes in integer representation |
sOffset | First byte of the resource data to be loaded (0 means first byte of resource data) |
sSize | Number of bytes for read. If this parameter is set to zero, method will read all bytes from sOffset until end of resource data. |
- Returns
true
if operation went OK, false
otherwise
◆ getCrc32()
std::string retdec::fileformat::Resource::getCrc32 |
( |
| ) |
const |
Get CRC32
- Returns
- CRC32 of resource content
◆ getHexBytes()
bool retdec::fileformat::Resource::getHexBytes |
( |
std::string & |
sResult | ) |
const |
Get content of resource as bytes
- Parameters
-
sResult | Read bytes in hexadecimal string representation |
- Returns
true
if operation went OK, false
otherwise
◆ getLanguage()
std::string retdec::fileformat::Resource::getLanguage |
( |
| ) |
const |
Get resource language
- Returns
- Resource language
◆ getLanguageId()
bool retdec::fileformat::Resource::getLanguageId |
( |
std::size_t & |
rId | ) |
const |
Get resource language ID
- Parameters
-
rId | Into this parameter is stored resource language ID |
- Returns
true
if language ID of resource is valid, false
otherwise
If method returns false
, rId is left unchanged
◆ getLoadedSize()
std::size_t retdec::fileformat::Resource::getLoadedSize |
( |
| ) |
const |
Get real file size of resource
- Returns
- Real file size of resource
◆ getMd5()
std::string retdec::fileformat::Resource::getMd5 |
( |
| ) |
const |
Get MD5
- Returns
- MD5 of resource content
◆ getName()
std::string retdec::fileformat::Resource::getName |
( |
| ) |
const |
◆ getNameId()
bool retdec::fileformat::Resource::getNameId |
( |
std::size_t & |
rId | ) |
const |
Get resource name ID
- Parameters
-
rId | Into this parameter is stored resource name ID |
- Returns
true
if name ID of resource is valid, false
otherwise
If method returns false
, rId is left unchanged
◆ getOffset()
std::size_t retdec::fileformat::Resource::getOffset |
( |
| ) |
const |
Get resource offset
- Returns
- Offset of resource in input file
◆ getSha256()
std::string retdec::fileformat::Resource::getSha256 |
( |
| ) |
const |
Get SHA256
- Returns
- SHA256 of resource content
◆ getSizeInFile()
std::size_t retdec::fileformat::Resource::getSizeInFile |
( |
| ) |
const |
Get resource size in file
- Returns
- Size of resource data in file
◆ getString()
bool retdec::fileformat::Resource::getString |
( |
std::string & |
sResult, |
|
|
std::size_t |
sOffset = 0 , |
|
|
std::size_t |
sSize = 0 |
|
) |
| const |
Get content of resource as plain string
- Parameters
-
sResult | Into this parameter is stored content of resource as plain string |
sOffset | First byte of the resource data to be loaded (0 means first byte of resource data) |
sSize | Number of bytes for read. If this parameter is set to zero, method will read all bytes from sOffset until end of resource data. |
- Returns
true
if operation went OK, false
otherwise
◆ getSublanguageId()
bool retdec::fileformat::Resource::getSublanguageId |
( |
std::size_t & |
rId | ) |
const |
Get resource sublanguage ID
- Parameters
-
rId | Into this parameter is stored resource sublanguage ID |
- Returns
true
if sublanguage ID of resource is valid, false
otherwise
If method returns false
, rId is left unchanged
◆ getType()
std::string retdec::fileformat::Resource::getType |
( |
| ) |
const |
◆ getTypeId()
bool retdec::fileformat::Resource::getTypeId |
( |
std::size_t & |
rId | ) |
const |
Get resource type ID
- Parameters
-
rId | Into this parameter is stored resource type ID |
- Returns
true
if type ID of resource is valid, false
otherwise
If method returns false
, rId is left unchanged
◆ hasCrc32()
bool retdec::fileformat::Resource::hasCrc32 |
( |
| ) |
const |
Check if CRC32 was computed
- Returns
true
if CRC32 was computed, false
otherwise
◆ hasEmptyLanguage()
bool retdec::fileformat::Resource::hasEmptyLanguage |
( |
| ) |
const |
- Returns
true
if resource has empty language string, false
otherwise
◆ hasEmptyName()
bool retdec::fileformat::Resource::hasEmptyName |
( |
| ) |
const |
- Returns
true
if resource has empty name string, false
otherwise
◆ hasEmptyType()
bool retdec::fileformat::Resource::hasEmptyType |
( |
| ) |
const |
- Returns
true
if resource has empty type string, false
otherwise
◆ hasMd5()
bool retdec::fileformat::Resource::hasMd5 |
( |
| ) |
const |
Check if MD5 was computed
- Returns
true
if MD5 was computed, false
otherwise
◆ hasSha256()
bool retdec::fileformat::Resource::hasSha256 |
( |
| ) |
const |
Check if SHA256 was computed
- Returns
true
if SHA256 was computed, false
otherwise
◆ hasValidId()
bool retdec::fileformat::Resource::hasValidId |
( |
| ) |
const |
A method which indicates whether ID is valid.
- Returns
true
if it is, otherwise false
.
◆ hasValidName()
bool retdec::fileformat::Resource::hasValidName |
( |
| ) |
const |
A method which indicates whether name is valid.
- Returns
true
if it is, otherwise false
.
◆ invalidateLanguageId()
void retdec::fileformat::Resource::invalidateLanguageId |
( |
| ) |
|
Invalidate language ID of resource
Instance method getLanguageId() returns false
after invocation of this method. ID is possible to revalidate by invocation of method setLanguageId().
◆ invalidateNameId()
void retdec::fileformat::Resource::invalidateNameId |
( |
| ) |
|
Invalidate name ID of resource
Instance method getNameId() returns false
after invocation of this method. ID is possible to revalidate by invocation of method setNameId().
◆ invalidateSublanguageId()
void retdec::fileformat::Resource::invalidateSublanguageId |
( |
| ) |
|
Invalidate sublanguage ID of resource
Instance method getSublanguageId() returns false
after invocation of this method. ID is possible to revalidate by invocation of method setSublanguageId().
◆ invalidateTypeId()
void retdec::fileformat::Resource::invalidateTypeId |
( |
| ) |
|
Invalidate type ID of resource
Instance method getTypeId() returns false
after invocation of this method. ID is possible to revalidate by invocation of method setTypeId().
◆ isLoaded()
bool retdec::fileformat::Resource::isLoaded |
( |
| ) |
const |
A method which indicates whether resource is loaded.
- Returns
true
if it is, otherwise false
.
◆ load()
void retdec::fileformat::Resource::load |
( |
const FileFormat * |
rOwner | ) |
|
Load content of resource from input file
- Parameters
-
rOwner | Pointer to input file |
This method must be called before getters of resource content
◆ setLanguage()
void retdec::fileformat::Resource::setLanguage |
( |
std::string |
rLan | ) |
|
Set resource language
- Parameters
-
◆ setLanguageId()
void retdec::fileformat::Resource::setLanguageId |
( |
std::size_t |
rId | ) |
|
Set resource language ID
- Parameters
-
◆ setName()
void retdec::fileformat::Resource::setName |
( |
std::string |
rName | ) |
|
Set resource name
- Parameters
-
◆ setNameId()
void retdec::fileformat::Resource::setNameId |
( |
std::size_t |
rId | ) |
|
Set resource name ID
- Parameters
-
◆ setOffset()
void retdec::fileformat::Resource::setOffset |
( |
std::size_t |
rOffset | ) |
|
Set resource offset
- Parameters
-
rOffset | Offset of resource in input file |
◆ setSizeInFile()
void retdec::fileformat::Resource::setSizeInFile |
( |
std::size_t |
rSize | ) |
|
Set resource size in file
- Parameters
-
rSize | Size of resource in input file |
◆ setSublanguageId()
void retdec::fileformat::Resource::setSublanguageId |
( |
std::size_t |
rId | ) |
|
Set resource sublanguage ID
- Parameters
-
◆ setType()
void retdec::fileformat::Resource::setType |
( |
std::string |
rType | ) |
|
Set resource type
- Parameters
-
◆ setTypeId()
void retdec::fileformat::Resource::setTypeId |
( |
std::size_t |
rId | ) |
|
Set resource type ID
- Parameters
-
◆ bytes
llvm::StringRef retdec::fileformat::Resource::bytes |
|
private |
reference to resource data
◆ crc32
std::string retdec::fileformat::Resource::crc32 |
|
private |
CRC32 of resource content.
◆ language
std::string retdec::fileformat::Resource::language |
|
private |
◆ languageId
std::size_t retdec::fileformat::Resource::languageId = 0 |
|
private |
resource language identifier
◆ languageIdIsValid
bool retdec::fileformat::Resource::languageIdIsValid = false |
|
private |
true
if language ID is valid
◆ loaded
bool retdec::fileformat::Resource::loaded = false |
|
private |
true
if content of resource was successfully loaded from input file
◆ md5
std::string retdec::fileformat::Resource::md5 |
|
private |
◆ name
std::string retdec::fileformat::Resource::name |
|
private |
◆ nameId
std::size_t retdec::fileformat::Resource::nameId = 0 |
|
private |
◆ nameIdIsValid
bool retdec::fileformat::Resource::nameIdIsValid = false |
|
private |
◆ offset
std::size_t retdec::fileformat::Resource::offset = 0 |
|
private |
◆ sha256
std::string retdec::fileformat::Resource::sha256 |
|
private |
SHA256 of resource content.
◆ size
std::size_t retdec::fileformat::Resource::size = 0 |
|
private |
◆ sublanguageId
std::size_t retdec::fileformat::Resource::sublanguageId = 0 |
|
private |
resource sublanguage identifier
◆ sublanguageIdIsValid
bool retdec::fileformat::Resource::sublanguageIdIsValid = false |
|
private |
true
if sublanguage ID is valid
◆ type
std::string retdec::fileformat::Resource::type |
|
private |
◆ typeId
std::size_t retdec::fileformat::Resource::typeId = 0 |
|
private |
◆ typeIdIsValid
bool retdec::fileformat::Resource::typeIdIsValid = false |
|
private |
The documentation for this class was generated from the following files:
- /var/cache/acbs/build/acbs.6bu6osb6/retdec/include/retdec/fileformat/types/resource_table/resource.h
- /var/cache/acbs/build/acbs.6bu6osb6/retdec/src/fileformat/types/resource_table/resource.cpp