LIEF: Library to Instrument Executable Formats Version 0.16.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_PE_RESOURCE_DATA_H
17#define LIEF_PE_RESOURCE_DATA_H
39 ResourceNode(ResourceNode::TYPE::
DATA)
42 ResourceNode(ResourceNode::TYPE::
DATA),
43 content_(std::move(content)),
48 ResourceData&
operator=(
const ResourceData& other) =
default;
49 void swap(ResourceData& other)
noexcept;
53 std::unique_ptr<ResourceNode>
clone()
const override {
54 return std::unique_ptr<ResourceNode>{
new ResourceData{*
this}};
62 span<const uint8_t>
content()
const {
84 code_page_ = code_page;
87 void content(std::vector<uint8_t> content) {
88 content_ = std::move(content);
95 static bool classof(
const ResourceNode* node) {
99 void accept(Visitor& visitor)
const override;
104 std::vector<uint8_t> content_;
105 uint32_t code_page_ = 0;
106 uint32_t reserved_ = 0;
107 uint32_t offset_ = 0;
Class that is used to rebuild a raw PE binary from a PE::Binary object.
Definition PE/Builder.hpp:45
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:47
Class which represents a Data Node in the PE resources tree.
Definition ResourceData.hpp:32
ResourceData(std::vector< uint8_t > content, uint32_t code_page)
Definition ResourceData.hpp:41
span< uint8_t > content()
Definition ResourceData.hpp:67
ResourceData()
Definition ResourceData.hpp:38
ResourceData & operator=(const ResourceData &other)=default
friend std::ostream & operator<<(std::ostream &os, const ResourceData &data)
uint32_t offset() const
Offset of the content within the resource.
Definition ResourceData.hpp:79
std::unique_ptr< ResourceNode > clone() const override
Definition ResourceData.hpp:53
uint32_t reserved() const
Reserved value. Should be 0
Definition ResourceData.hpp:72
void code_page(uint32_t code_page)
Definition ResourceData.hpp:83
void accept(Visitor &visitor) const override
void reserved(uint32_t value)
Definition ResourceData.hpp:91
static bool classof(const ResourceNode *node)
Definition ResourceData.hpp:95
span< const uint8_t > content() const
Resource content.
Definition ResourceData.hpp:64
uint32_t code_page() const
Return the code page that is used to decode code point values within the resource data....
Definition ResourceData.hpp:59
ResourceData(const ResourceData &other)=default
~ResourceData() override=default
void swap(ResourceData &other) noexcept
void content(std::vector< uint8_t > content)
Definition ResourceData.hpp:87
Class which represents a Node in the resource tree.
Definition ResourceNode.hpp:36
bool is_data() const
True if the current entry is a ResourceData.
Definition ResourceNode.hpp:112
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
@ DATA
Definition PE/enums.hpp:670
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41