LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::PE::ResourceIcon Class Reference

#include <ResourceIcon.hpp>

Inheritance diagram for LIEF::PE::ResourceIcon:
Collaboration diagram for LIEF::PE::ResourceIcon:

Public Member Functions

 ResourceIcon ()=default
 ResourceIcon (const details::pe_resource_icon_group &header)
 ResourceIcon (const details::pe_icon_header &header)
 ResourceIcon (const ResourceIcon &)=default
ResourceIconoperator= (const ResourceIcon &)=default
 ResourceIcon (ResourceIcon &&)=default
ResourceIconoperator= (ResourceIcon &&)=default
 ~ResourceIcon () override=default
uint32_t id () const
 Id associated with the icon.
uint32_t lang () const
 Language associated with the icon.
uint32_t sublang () const
 Sub language associated with the icon.
uint8_t width () const
 Width in pixels of the image.
uint8_t height () const
 Height in pixels of the image.
uint8_t color_count () const
 Number of colors in image (0 if >=8bpp).
uint8_t reserved () const
 Reserved (must be 0).
uint16_t planes () const
 Color Planes.
uint16_t bit_count () const
 Bits per pixel.
uint32_t size () const
 Size in bytes of the image.
span< const uint8_t > pixels () const
 Pixels of the image (as bytes).
void id (uint32_t id)
void lang (uint32_t lang)
void sublang (uint32_t sublang)
void width (uint8_t width)
void height (uint8_t height)
void color_count (uint8_t color_count)
void reserved (uint8_t reserved)
void planes (uint16_t planes)
void bit_count (uint16_t bit_count)
void pixels (std::vector< uint8_t > pixels)
void save (const std::string &filename) const
 Save the icon to the given filename.
std::vector< uint8_t > serialize () const
void accept (Visitor &visitor) const override
Public Member Functions inherited from LIEF::Object
 Object ()
 Object (const Object &other)
Objectoperator= (const Object &other)
 Object (Object &&other) noexcept=default
Objectoperator= (Object &&other) noexcept=default
template<class T>
output_t< T > as ()
template<class T>
output_const_t< T > as () const
virtual bool operator== (const Object &other) const
virtual bool operator!= (const Object &other) const
virtual ~Object ()

Static Public Member Functions

static result< ResourceIconfrom_serialization (const uint8_t *buffer, size_t size)
static result< ResourceIconfrom_serialization (const std::vector< uint8_t > &bytes)
static result< ResourceIconfrom_bytes (LIEF::span< const uint8_t > bytes)

Additional Inherited Members

Public Types inherited from LIEF::Object
template<class T>
using output_t = add_pointer_t<decay_t<T>>
template<class T>
using output_const_t = add_pointer_t<add_const_t<decay_t<T>>>

Constructor & Destructor Documentation

◆ ResourceIcon() [1/5]

LIEF::PE::ResourceIcon::ResourceIcon ( )
default

◆ ResourceIcon() [2/5]

LIEF::PE::ResourceIcon::ResourceIcon ( const details::pe_resource_icon_group & header)

◆ ResourceIcon() [3/5]

LIEF::PE::ResourceIcon::ResourceIcon ( const details::pe_icon_header & header)

◆ ResourceIcon() [4/5]

LIEF::PE::ResourceIcon::ResourceIcon ( const ResourceIcon & )
default

References ResourceIcon().

◆ ResourceIcon() [5/5]

LIEF::PE::ResourceIcon::ResourceIcon ( ResourceIcon && )
default

References ResourceIcon().

◆ ~ResourceIcon()

LIEF::PE::ResourceIcon::~ResourceIcon ( )
overridedefault

Member Function Documentation

◆ accept()

void LIEF::PE::ResourceIcon::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ bit_count() [1/2]

uint16_t LIEF::PE::ResourceIcon::bit_count ( ) const
inline

Bits per pixel.

Referenced by bit_count().

◆ bit_count() [2/2]

void LIEF::PE::ResourceIcon::bit_count ( uint16_t bit_count)
inline

References bit_count().

◆ color_count() [1/2]

uint8_t LIEF::PE::ResourceIcon::color_count ( ) const
inline

Number of colors in image (0 if >=8bpp).

Referenced by color_count().

◆ color_count() [2/2]

void LIEF::PE::ResourceIcon::color_count ( uint8_t color_count)
inline

References color_count().

◆ from_bytes()

result< ResourceIcon > LIEF::PE::ResourceIcon::from_bytes ( LIEF::span< const uint8_t > bytes)
inlinestatic

References from_serialization().

◆ from_serialization() [1/2]

result< ResourceIcon > LIEF::PE::ResourceIcon::from_serialization ( const std::vector< uint8_t > & bytes)
inlinestatic

References from_serialization().

◆ from_serialization() [2/2]

result< ResourceIcon > LIEF::PE::ResourceIcon::from_serialization ( const uint8_t * buffer,
size_t size )
static

References size().

Referenced by from_bytes(), and from_serialization().

◆ height() [1/2]

uint8_t LIEF::PE::ResourceIcon::height ( ) const
inline

Height in pixels of the image.

Referenced by height().

◆ height() [2/2]

void LIEF::PE::ResourceIcon::height ( uint8_t height)
inline

References height().

◆ id() [1/2]

uint32_t LIEF::PE::ResourceIcon::id ( ) const
inline

Id associated with the icon.

Referenced by id().

◆ id() [2/2]

void LIEF::PE::ResourceIcon::id ( uint32_t id)
inline

References id().

◆ lang() [1/2]

uint32_t LIEF::PE::ResourceIcon::lang ( ) const
inline

Language associated with the icon.

Referenced by lang().

◆ lang() [2/2]

void LIEF::PE::ResourceIcon::lang ( uint32_t lang)
inline

References lang().

◆ operator=() [1/2]

ResourceIcon & LIEF::PE::ResourceIcon::operator= ( const ResourceIcon & )
default

References ResourceIcon().

◆ operator=() [2/2]

ResourceIcon & LIEF::PE::ResourceIcon::operator= ( ResourceIcon && )
default

References ResourceIcon().

◆ pixels() [1/2]

span< const uint8_t > LIEF::PE::ResourceIcon::pixels ( ) const
inline

Pixels of the image (as bytes).

Referenced by pixels().

◆ pixels() [2/2]

void LIEF::PE::ResourceIcon::pixels ( std::vector< uint8_t > pixels)
inline

References pixels().

◆ planes() [1/2]

uint16_t LIEF::PE::ResourceIcon::planes ( ) const
inline

Color Planes.

Referenced by planes().

◆ planes() [2/2]

void LIEF::PE::ResourceIcon::planes ( uint16_t planes)
inline

References planes().

◆ reserved() [1/2]

uint8_t LIEF::PE::ResourceIcon::reserved ( ) const
inline

Reserved (must be 0).

Referenced by reserved().

◆ reserved() [2/2]

void LIEF::PE::ResourceIcon::reserved ( uint8_t reserved)
inline

References reserved().

◆ save()

void LIEF::PE::ResourceIcon::save ( const std::string & filename) const

Save the icon to the given filename.

Parameters
[in]filenamePath to file in which the icon will be saved

◆ serialize()

std::vector< uint8_t > LIEF::PE::ResourceIcon::serialize ( ) const

◆ size()

uint32_t LIEF::PE::ResourceIcon::size ( ) const
inline

Size in bytes of the image.

Referenced by from_serialization().

◆ sublang() [1/2]

uint32_t LIEF::PE::ResourceIcon::sublang ( ) const
inline

Sub language associated with the icon.

Referenced by sublang().

◆ sublang() [2/2]

void LIEF::PE::ResourceIcon::sublang ( uint32_t sublang)
inline

References sublang().

◆ width() [1/2]

uint8_t LIEF::PE::ResourceIcon::width ( ) const
inline

Width in pixels of the image.

Referenced by width().

◆ width() [2/2]

void LIEF::PE::ResourceIcon::width ( uint8_t width)
inline

References width().


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