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

#include <resource_icon_group.h>

Inheritance diagram for retdec::fileformat::ResourceIconGroup:
Inheritance graph
[legend]
Collaboration diagram for retdec::fileformat::ResourceIconGroup:
Collaboration graph
[legend]

Public Member Functions

Getters
std::size_t getNumberOfIcons () const
 
const ResourceIcongetIcon (std::size_t iIndex) const
 
const ResourceIcongetPriorIcon () const
 
std::size_t getIconGroupID () const
 
Getters of icon group content
bool getNumberOfEntries (std::size_t &nEntries) const
 
bool getEntryNameID (std::size_t eIndex, std::size_t &nameID) const
 
bool getEntryWidth (std::size_t eIndex, std::uint16_t &width) const
 
bool getEntryHeight (std::size_t eIndex, std::uint16_t &height) const
 
bool getEntryIconSize (std::size_t eIndex, std::size_t &iconSize) const
 
bool getEntryColorCount (std::size_t eIndex, std::uint8_t &colorCount) const
 
bool getEntryPlanes (std::size_t eIndex, std::uint16_t &planes) const
 
bool getEntryBitCount (std::size_t eIndex, std::uint16_t &bitCount) const
 
Setters
void setIconGroupID (std::size_t id)
 
Other methods
bool hasIcons () const
 
void addIcon (ResourceIcon *icon)
 
- Public Member Functions inherited from retdec::fileformat::Resource
std::string getCrc32 () const
 
std::string getMd5 () const
 
std::string getSha256 () const
 
std::string getName () const
 
std::string getType () const
 
std::string getLanguage () const
 
const llvm::StringRef getBytes (std::size_t sOffset=0, std::size_t sSize=0) const
 
std::size_t getOffset () const
 
std::size_t getSizeInFile () const
 
std::size_t getLoadedSize () const
 
bool getNameId (std::size_t &rId) const
 
bool getTypeId (std::size_t &rId) const
 
bool getLanguageId (std::size_t &rId) const
 
bool getSublanguageId (std::size_t &rId) const
 
bool getBits (std::string &sResult) const
 
bool getBytes (std::vector< unsigned char > &sResult, std::size_t sOffset=0, std::size_t sSize=0) const
 
bool getString (std::string &sResult, std::size_t sOffset=0, std::size_t sSize=0) const
 
bool getHexBytes (std::string &sResult) const
 
void setName (std::string rName)
 
void setType (std::string rType)
 
void setLanguage (std::string rLan)
 
void setOffset (std::size_t rOffset)
 
void setSizeInFile (std::size_t rSize)
 
void setNameId (std::size_t rId)
 
void setTypeId (std::size_t rId)
 
void setLanguageId (std::size_t rId)
 
void setSublanguageId (std::size_t rId)
 
bool isLoaded () const
 
bool hasValidName () const
 
bool hasValidId () const
 
void invalidateNameId ()
 
void invalidateTypeId ()
 
void invalidateLanguageId ()
 
void invalidateSublanguageId ()
 
void load (const FileFormat *rOwner)
 
bool hasCrc32 () const
 
bool hasMd5 () const
 
bool hasSha256 () const
 
bool hasEmptyName () const
 
bool hasEmptyType () const
 
bool hasEmptyLanguage () const
 

Private Member Functions

Auxiliary methods
std::size_t getEntryOffset (std::size_t eIndex) const
 

Private Attributes

std::vector< ResourceIcon * > icons
 stored icons More...
 
size_t iconGroupID = 0
 icon group id More...
 

Detailed Description

One resource icon

Member Function Documentation

◆ addIcon()

void retdec::fileformat::ResourceIconGroup::addIcon ( ResourceIcon icon)

Add an icon to the icon group

◆ getEntryBitCount()

bool retdec::fileformat::ResourceIconGroup::getEntryBitCount ( std::size_t  eIndex,
std::uint16_t &  bitCount 
) const

Get entry bit count

Parameters
eIndexIndex of selected entry (indexed from 0)
bitCountDestination for result to be stored
Returns
true if get was successful, otherwise false

◆ getEntryColorCount()

bool retdec::fileformat::ResourceIconGroup::getEntryColorCount ( std::size_t  eIndex,
std::uint8_t &  colorCount 
) const

Get entry color count

Parameters
eIndexIndex of selected entry (indexed from 0)
colorCountDestination for result to be stored
Returns
true if get was successful, otherwise false

◆ getEntryHeight()

bool retdec::fileformat::ResourceIconGroup::getEntryHeight ( std::size_t  eIndex,
std::uint16_t &  height 
) const

Get entry height

Parameters
eIndexIndex of selected entry (indexed from 0)
heightDestination for result to be stored
Returns
true if get was successful, otherwise false

◆ getEntryIconSize()

bool retdec::fileformat::ResourceIconGroup::getEntryIconSize ( std::size_t  eIndex,
std::size_t &  iconSize 
) const

Get entry icon size

Parameters
eIndexIndex of selected entry (indexed from 0)
iconSizeDestination for result to be stored
Returns
true if get was successful, otherwise false

◆ getEntryNameID()

bool retdec::fileformat::ResourceIconGroup::getEntryNameID ( std::size_t  eIndex,
std::size_t &  nameID 
) const

Get entry name ID

Parameters
eIndexIndex of selected entry (indexed from 0)
nameIDDestination for result to be stored
Returns
true if get was successful, otherwise false

◆ getEntryOffset()

std::size_t retdec::fileformat::ResourceIconGroup::getEntryOffset ( std::size_t  eIndex) const
private

Get entry offset

Parameters
eIndexIndex of selected entry (indexed from 0)
Returns
Entry offset

◆ getEntryPlanes()

bool retdec::fileformat::ResourceIconGroup::getEntryPlanes ( std::size_t  eIndex,
std::uint16_t &  planes 
) const

Get entry planes

Parameters
eIndexIndex of selected entry (indexed from 0)
planesDestination for result to be stored
Returns
true if get was successful, otherwise false

◆ getEntryWidth()

bool retdec::fileformat::ResourceIconGroup::getEntryWidth ( std::size_t  eIndex,
std::uint16_t &  width 
) const

Get entry width

Parameters
eIndexIndex of selected entry (indexed from 0)
widthDestination for result to be stored
Returns
true if get was successful, otherwise false

◆ getIcon()

const ResourceIcon * retdec::fileformat::ResourceIconGroup::getIcon ( std::size_t  iIndex) const

Get icon

Parameters
iIndexIndex of selected icon (indexed from 0)
Returns
Icon

◆ getIconGroupID()

std::size_t retdec::fileformat::ResourceIconGroup::getIconGroupID ( ) const

Get icon group ID

Returns
Icon group ID

◆ getNumberOfEntries()

bool retdec::fileformat::ResourceIconGroup::getNumberOfEntries ( std::size_t &  nEntries) const

Get number of entries

Parameters
nEntriesDestination for result to be stored
Returns
true if get was successful, otherwise false

◆ getNumberOfIcons()

std::size_t retdec::fileformat::ResourceIconGroup::getNumberOfIcons ( ) const

Get number of icons

Returns
Number of icons

◆ getPriorIcon()

const ResourceIcon * retdec::fileformat::ResourceIconGroup::getPriorIcon ( ) const

Get prior icon by Windows OS precedence

Returns
Prior icon

◆ hasIcons()

bool retdec::fileformat::ResourceIconGroup::hasIcons ( ) const

A method which indicates whether there are icons present in icon group.

Returns
true if there are, otherwise false

◆ setIconGroupID()

void retdec::fileformat::ResourceIconGroup::setIconGroupID ( std::size_t  id)

Set icon group ID

Parameters
idIcon group ID

Member Data Documentation

◆ iconGroupID

size_t retdec::fileformat::ResourceIconGroup::iconGroupID = 0
private

icon group id

◆ icons

std::vector<ResourceIcon *> retdec::fileformat::ResourceIconGroup::icons
private

stored icons


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