retdec
|
#include <file_segment.h>
Public Member Functions | |
Getters | |
std::string | getType () const |
std::string | getCrc32 () const |
std::string | getMd5 () const |
std::string | getSha256 () const |
std::string | getIndexStr () const |
std::string | getOffsetStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getVirtualAddressStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getPhysicalAddressStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getSizeInFileStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getSizeInMemoryStr (std::ios_base &(*format)(std::ios_base &)) const |
std::string | getAlignmentStr (std::ios_base &(*format)(std::ios_base &)) const |
unsigned long long | getFlagsSize () const |
unsigned long long | getFlags () const |
std::string | getFlagsStr () const |
std::size_t | getNumberOfFlagsDescriptors () const |
void | getFlagsDescriptors (std::vector< std::string > &desc, std::vector< std::string > &abb) const |
Setters | |
void | setType (std::string type) |
void | setCrc32 (std::string segmentCrc32) |
void | setMd5 (std::string segmentMd5) |
void | setSha256 (std::string segmentSha256) |
void | setIndex (unsigned long long segmentIndex) |
void | setOffset (unsigned long long fileOffset) |
void | setVirtualAddress (unsigned long long address) |
void | setPhysicalAddress (unsigned long long address) |
void | setSizeInFile (unsigned long long size) |
void | setSizeInMemory (unsigned long long size) |
void | setAlignment (unsigned long long segmentAlignment) |
void | setFlagsSize (unsigned long long flagsSize) |
void | setFlags (unsigned long long flags) |
Other methods | |
void | addFlagsDescriptor (std::string descriptor, std::string abbreviation) |
void | clearFlagsDescriptors () |
Private Attributes | |
std::string | segmentType |
type of segment More... | |
std::string | crc32 |
CRC32 of segment content. More... | |
std::string | md5 |
MD5 of segment content. More... | |
std::string | sha256 |
SHA256 of segment content. More... | |
unsigned long long | index = std::numeric_limits<unsigned long long>::max() |
index of segment More... | |
unsigned long long | offset = std::numeric_limits<unsigned long long>::max() |
offset in file More... | |
unsigned long long | virtualAddress = std::numeric_limits<unsigned long long>::max() |
virtual address in memory More... | |
unsigned long long | physicalAddress = std::numeric_limits<unsigned long long>::max() |
physical address in memory More... | |
unsigned long long | sizeInFile = std::numeric_limits<unsigned long long>::max() |
size of segment in file More... | |
unsigned long long | sizeInMemory = std::numeric_limits<unsigned long long>::max() |
size of segment in memory More... | |
unsigned long long | alignment = std::numeric_limits<unsigned long long>::max() |
alignment in memory and in file More... | |
Flags | flags |
segment flags More... | |
Class for save information about segment
Value std::numeric_limits<unsigned long long>::max() mean unspecified value or error for numeric types.
void retdec::fileinfo::FileSegment::addFlagsDescriptor | ( | std::string | descriptor, |
std::string | abbreviation | ||
) |
Add flag descriptor
descriptor | Descriptor (full description of flag) |
abbreviation | Abbreviation (short description of flag) |
void retdec::fileinfo::FileSegment::clearFlagsDescriptors | ( | ) |
Delete all flags descriptors
std::string retdec::fileinfo::FileSegment::getAlignmentStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get alignment
format | Format of result (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::FileSegment::getCrc32 | ( | ) | const |
Get CRC32
unsigned long long retdec::fileinfo::FileSegment::getFlags | ( | ) | const |
Get segment flags as number
void retdec::fileinfo::FileSegment::getFlagsDescriptors | ( | std::vector< std::string > & | desc, |
std::vector< std::string > & | abb | ||
) | const |
Get flags descriptors and its abbreviations
desc | Vector for save descriptors |
abb | Vector for save abbreviations of descriptors |
It is guaranteed that the number of stored descriptors and abbreviations are the same
unsigned long long retdec::fileinfo::FileSegment::getFlagsSize | ( | ) | const |
Get segment flags size
std::string retdec::fileinfo::FileSegment::getFlagsStr | ( | ) | const |
Get segment flags as string
std::string retdec::fileinfo::FileSegment::getIndexStr | ( | ) | const |
Get segment index
std::string retdec::fileinfo::FileSegment::getMd5 | ( | ) | const |
Get MD5
std::size_t retdec::fileinfo::FileSegment::getNumberOfFlagsDescriptors | ( | ) | const |
Get number of flags descriptors
std::string retdec::fileinfo::FileSegment::getOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get segment offset in file
format | Format of result (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::FileSegment::getPhysicalAddressStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get physical address in memory
format | Format of result (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::FileSegment::getSha256 | ( | ) | const |
Get SHA256
std::string retdec::fileinfo::FileSegment::getSizeInFileStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get size of segment in file
std::string retdec::fileinfo::FileSegment::getSizeInMemoryStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get size of segment in memory
std::string retdec::fileinfo::FileSegment::getType | ( | ) | const |
Get segment type
std::string retdec::fileinfo::FileSegment::getVirtualAddressStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get virtual address in memory
format | Format of result (e.g. std::dec, std::hex) |
void retdec::fileinfo::FileSegment::setAlignment | ( | unsigned long long | segmentAlignment | ) |
Set segment alignment
segmentAlignment | Segment alignment |
void retdec::fileinfo::FileSegment::setCrc32 | ( | std::string | segmentCrc32 | ) |
Set segment CRC32
segmentCrc32 | CRC32 of segment content |
void retdec::fileinfo::FileSegment::setFlags | ( | unsigned long long | flagsArray | ) |
Set segment flags
flagsArray | Segment flags |
void retdec::fileinfo::FileSegment::setFlagsSize | ( | unsigned long long | flagsSize | ) |
Set segment flags size
flagsSize | Segment flags size |
void retdec::fileinfo::FileSegment::setIndex | ( | unsigned long long | segmentIndex | ) |
Set segment index
segmentIndex | Segment index |
void retdec::fileinfo::FileSegment::setMd5 | ( | std::string | segmentMd5 | ) |
Set segment MD5
segmentMd5 | MD5 of segment content |
void retdec::fileinfo::FileSegment::setOffset | ( | unsigned long long | fileOffset | ) |
Set segment offset in file
fileOffset | Segment offset in file |
void retdec::fileinfo::FileSegment::setPhysicalAddress | ( | unsigned long long | address | ) |
Set segment physical address
address | Segment physical address |
void retdec::fileinfo::FileSegment::setSha256 | ( | std::string | segmentSha256 | ) |
Set segment SHA256
segmentSha256 | SHA256 of segment content |
void retdec::fileinfo::FileSegment::setSizeInFile | ( | unsigned long long | size | ) |
Set segment size in file
size | Segment size in file |
void retdec::fileinfo::FileSegment::setSizeInMemory | ( | unsigned long long | size | ) |
Set segment size in memory
size | Segment size in memory |
void retdec::fileinfo::FileSegment::setType | ( | std::string | type | ) |
Set type of segment
type | Type of segment |
void retdec::fileinfo::FileSegment::setVirtualAddress | ( | unsigned long long | address | ) |
Set segment virtual address
address | Segment virtual address |
|
private |
alignment in memory and in file
|
private |
CRC32 of segment content.
|
private |
segment flags
|
private |
index of segment
|
private |
MD5 of segment content.
|
private |
offset in file
|
private |
physical address in memory
|
private |
type of segment
|
private |
SHA256 of segment content.
|
private |
size of segment in file
|
private |
size of segment in memory
|
private |
virtual address in memory