LIEF: Library to Instrument Executable Formats Version 0.15.0
|
The Resource Manager provides an enhanced API to manipulate the resource tree. More...
#include <ResourcesManager.hpp>
Public Types | |
enum class | TYPE { CURSOR = 1 , BITMAP = 2 , ICON = 3 , MENU = 4 , DIALOG = 5 , STRING = 6 , FONTDIR = 7 , FONT = 8 , ACCELERATOR = 9 , RCDATA = 10 , MESSAGETABLE = 11 , GROUP_CURSOR = 12 , GROUP_ICON = 14 , VERSION = 16 , DLGINCLUDE = 17 , PLUGPLAY = 19 , VXD = 20 , ANICURSOR = 21 , ANIICON = 22 , HTML = 23 , MANIFEST = 24 } |
The different types of resources Ref: From https://docs.microsoft.com/en-us/windows/win32/menurc/resource-types. | |
using | dialogs_t = std::vector<ResourceDialog> |
using | it_const_dialogs = const_ref_iterator<dialogs_t> |
using | icons_t = std::vector<ResourceIcon> |
using | it_const_icons = const_ref_iterator<icons_t> |
using | strings_table_t = std::vector<ResourceStringTable> |
using | it_const_strings_table = const_ref_iterator<strings_table_t> |
using | accelerators_t = std::vector<ResourceAccelerator> |
using | it_const_accelerators = const_ref_iterator<accelerators_t> |
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>>> |
Public Member Functions | |
ResourcesManager (ResourceNode &rsrc) | |
ResourcesManager (const ResourcesManager &)=default | |
ResourcesManager & | operator= (const ResourcesManager &)=default |
ResourcesManager (ResourcesManager &&)=default | |
ResourcesManager & | operator= (ResourcesManager &&)=default |
ResourceNode * | get_node_type (TYPE type) |
Return the ResourceNode associated with the given KIND or a nullptr if not found;. | |
const ResourceNode * | get_node_type (TYPE type) const |
std::vector< TYPE > | get_types () const |
List of TYPE present in the resources. | |
bool | has_type (TYPE type) const |
true if the resource has the given LIEF::PE::KIND | |
bool | has_manifest () const |
true if resources contain the Manifest element | |
std::string | manifest () const |
Return the manifest as a std::string or an empty string if not found or corrupted. | |
void | manifest (const std::string &manifest) |
Update the manifest with the given string. | |
bool | has_version () const |
true if resources contain a LIEF::PE::ResourceVersion | |
result< ResourceVersion > | version () const |
Return the ResourceVersion if any. | |
bool | has_icons () const |
true if resources contain a LIEF::PE::ResourceIcon | |
it_const_icons | icons () const |
Return the list of the icons present in the resources. | |
void | add_icon (const ResourceIcon &icon) |
Add an icon to the resources. | |
void | change_icon (const ResourceIcon &original, const ResourceIcon &newone) |
bool | has_dialogs () const |
true if resources contain dialogs | |
it_const_dialogs | dialogs () const |
Return the list of the dialogs present in the resource. | |
bool | has_string_table () const |
true if the resources contain a LIEF::PE::ResourceStringTable | |
it_const_strings_table | string_table () const |
Return the list of the string table in the resource. | |
bool | has_html () const |
true if the resources contain html | |
std::vector< std::string > | html () const |
Return the list of the html resources. | |
bool | has_accelerator () const |
true if the resources contain LIEF::PE::ResourceAccelerator | |
it_const_accelerators | accelerator () const |
Return the list of the accelerator in the resource. | |
std::string | print (uint32_t depth=0) const |
Print the resource tree to the given depth. | |
void | accept (Visitor &visitor) const override |
Public Member Functions inherited from LIEF::Object | |
Object (const Object &other) | |
Object & | operator= (const Object &other) |
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 |
Static Public Member Functions | |
static constexpr uint32_t | lang_from_id (size_t id) |
static constexpr uint32_t | sublang_from_id (size_t id) |
The Resource Manager provides an enhanced API to manipulate the resource tree.
|
overridevirtual |
Implements LIEF::Object.