LIEF: Library to Instrument Executable Formats
Version 0.17.4
Toggle main menu visibility
Loading...
Searching...
No Matches
install
linux
x86_64
sdk
static
include
LIEF
PE
signature
GenericContent.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2025 R. Thomas
2
* Copyright 2017 - 2025 Quarkslab
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#ifndef LIEF_PE_GENERIC_CONTENT_H
17
#define LIEF_PE_GENERIC_CONTENT_H
18
19
#include "
LIEF/visibility.h
"
20
#include "
LIEF/span.hpp
"
21
22
#include "
LIEF/PE/signature/ContentInfo.hpp
"
23
24
namespace
LIEF
{
25
namespace
PE
{
26
class
LIEF_API
GenericContent
:
public
ContentInfo::Content
{
27
friend
class
SignatureParser
;
28
29
public
:
30
GenericContent
();
31
GenericContent
(
oid_t
oid
);
32
GenericContent
(
const
GenericContent
&) =
default
;
33
GenericContent
&
operator=
(
const
GenericContent
&) =
default
;
34
35
std::unique_ptr<Content>
clone
()
const override
{
36
return
std::unique_ptr<Content>(
new
GenericContent
{*
this
});
37
}
38
39
const
oid_t
&
oid
()
const
{
40
return
oid_;
41
}
42
43
span<const uint8_t>
raw
()
const
{
44
return
raw_;
45
}
46
47
span<uint8_t>
raw
() {
48
return
raw_;
49
}
50
51
~GenericContent
()
override
;
52
53
void
print
(std::ostream& os)
const override
;
54
void
accept
(
Visitor
& visitor)
const override
;
55
56
LIEF_API
friend
std::ostream&
operator<<
(std::ostream& os,
const
GenericContent
& content) {
57
content.
print
(os);
58
return
os;
59
}
60
61
static
bool
classof
(
const
ContentInfo::Content
* content);
62
63
private
:
64
oid_t
oid_;
65
std::vector<uint8_t> raw_;
66
};
67
}
68
}
69
#endif
ContentInfo.hpp
LIEF::PE::ContentInfo::Content
Definition
ContentInfo.hpp:83
LIEF::PE::GenericContent::~GenericContent
~GenericContent() override
LIEF::PE::GenericContent::print
void print(std::ostream &os) const override
LIEF::PE::GenericContent::raw
span< uint8_t > raw()
Definition
GenericContent.hpp:47
LIEF::PE::GenericContent::classof
static bool classof(const ContentInfo::Content *content)
LIEF::PE::GenericContent::accept
void accept(Visitor &visitor) const override
LIEF::PE::GenericContent::GenericContent
GenericContent(const GenericContent &)=default
LIEF::PE::GenericContent::SignatureParser
friend class SignatureParser
Definition
GenericContent.hpp:27
LIEF::PE::GenericContent::raw
span< const uint8_t > raw() const
Definition
GenericContent.hpp:43
LIEF::PE::GenericContent::oid
const oid_t & oid() const
Definition
GenericContent.hpp:39
LIEF::PE::GenericContent::GenericContent
GenericContent()
LIEF::PE::GenericContent::GenericContent
GenericContent(oid_t oid)
LIEF::PE::GenericContent::operator=
GenericContent & operator=(const GenericContent &)=default
LIEF::PE::GenericContent::operator<<
friend std::ostream & operator<<(std::ostream &os, const GenericContent &content)
Definition
GenericContent.hpp:56
LIEF::PE::GenericContent::clone
std::unique_ptr< Content > clone() const override
Definition
GenericContent.hpp:35
LIEF::Visitor
Definition
Visitor.hpp:210
LIEF::PE
Namespace related to the LIEF's PE module.
Definition
Abstract/Header.hpp:32
LIEF::PE::oid_t
std::string oid_t
Definition
PE/signature/types.hpp:23
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
LIEF::span
tcb::span< ElementType, Extent > span
Definition
span.hpp:22
span.hpp
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0