LIEF: Library to Instrument Executable Formats
Version 2.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
PE
signature
attributes
SpcRelaxedPeMarkerCheck.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2026 R. Thomas
2
*
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
#ifndef LIEF_PE_ATTRIBUTES_SPC_RELAXED_PE_MARKER_CHECK_H
16
#define LIEF_PE_ATTRIBUTES_SPC_RELAXED_PE_MARKER_CHECK_H
17
#include <cstdint>
18
19
#include "
LIEF/PE/signature/Attribute.hpp
"
20
#include "
LIEF/visibility.h
"
21
22
23
namespace
LIEF::PE
{
24
25
class
LIEF_API
SpcRelaxedPeMarkerCheck
:
public
Attribute
{
26
friend
class
Parser
;
27
friend
class
SignatureParser
;
28
29
public
:
30
SpcRelaxedPeMarkerCheck
() :
31
SpcRelaxedPeMarkerCheck
(0) {}
32
33
SpcRelaxedPeMarkerCheck
(uint32_t
value
) :
34
Attribute
(
Attribute
::
TYPE
::SPC_RELAXED_PE_MARKER_CHECK),
35
value_(
value
) {}
36
37
SpcRelaxedPeMarkerCheck
(
const
SpcRelaxedPeMarkerCheck
&) =
default
;
38
SpcRelaxedPeMarkerCheck
&
operator=
(
const
SpcRelaxedPeMarkerCheck
&) =
default
;
39
40
uint32_t
value
()
const
{
41
return
value_;
42
}
43
44
void
value
(uint32_t v) {
45
value_ = v;
46
}
47
48
std::unique_ptr<Attribute>
clone
()
const override
{
49
return
std::unique_ptr<Attribute>(
new
SpcRelaxedPeMarkerCheck
{*
this
});
50
}
51
52
std::string
print
()
const override
{
53
return
"value="
+ std::to_string(value_);
54
}
55
56
static
bool
classof
(
const
Attribute
* attr) {
57
return
attr->
type
() ==
Attribute::TYPE::SPC_RELAXED_PE_MARKER_CHECK
;
58
}
59
60
void
accept
(
Visitor
& visitor)
const override
;
61
62
~SpcRelaxedPeMarkerCheck
()
override
=
default
;
63
64
private
:
65
uint32_t value_ = 0;
66
};
67
68
}
69
70
71
#endif
Attribute.hpp
LIEF::PE::Attribute::TYPE
TYPE
Definition
PE/signature/Attribute.hpp:34
LIEF::PE::Attribute::TYPE::SPC_RELAXED_PE_MARKER_CHECK
@ SPC_RELAXED_PE_MARKER_CHECK
Definition
PE/signature/Attribute.hpp:41
LIEF::PE::Attribute::Attribute
Attribute()=delete
LIEF::PE::Attribute::type
virtual TYPE type() const
Concrete type of the attribute.
Definition
PE/signature/Attribute.hpp:61
LIEF::PE::SpcRelaxedPeMarkerCheck::print
std::string print() const override
Print information about the underlying attribute.
Definition
SpcRelaxedPeMarkerCheck.hpp:52
LIEF::PE::SpcRelaxedPeMarkerCheck::clone
std::unique_ptr< Attribute > clone() const override
Definition
SpcRelaxedPeMarkerCheck.hpp:48
LIEF::PE::SpcRelaxedPeMarkerCheck::SpcRelaxedPeMarkerCheck
SpcRelaxedPeMarkerCheck()
Definition
SpcRelaxedPeMarkerCheck.hpp:30
LIEF::PE::SpcRelaxedPeMarkerCheck::~SpcRelaxedPeMarkerCheck
~SpcRelaxedPeMarkerCheck() override=default
LIEF::PE::SpcRelaxedPeMarkerCheck::SpcRelaxedPeMarkerCheck
SpcRelaxedPeMarkerCheck(const SpcRelaxedPeMarkerCheck &)=default
LIEF::PE::SpcRelaxedPeMarkerCheck::classof
static bool classof(const Attribute *attr)
Definition
SpcRelaxedPeMarkerCheck.hpp:56
LIEF::PE::SpcRelaxedPeMarkerCheck::SignatureParser
friend class SignatureParser
Definition
SpcRelaxedPeMarkerCheck.hpp:27
LIEF::PE::SpcRelaxedPeMarkerCheck::value
void value(uint32_t v)
Definition
SpcRelaxedPeMarkerCheck.hpp:44
LIEF::PE::SpcRelaxedPeMarkerCheck::value
uint32_t value() const
Definition
SpcRelaxedPeMarkerCheck.hpp:40
LIEF::PE::SpcRelaxedPeMarkerCheck::Parser
friend class Parser
Definition
SpcRelaxedPeMarkerCheck.hpp:26
LIEF::PE::SpcRelaxedPeMarkerCheck::accept
void accept(Visitor &visitor) const override
LIEF::PE::SpcRelaxedPeMarkerCheck::operator=
SpcRelaxedPeMarkerCheck & operator=(const SpcRelaxedPeMarkerCheck &)=default
LIEF::PE::SpcRelaxedPeMarkerCheck::SpcRelaxedPeMarkerCheck
SpcRelaxedPeMarkerCheck(uint32_t value)
Definition
SpcRelaxedPeMarkerCheck.hpp:33
LIEF::Visitor
Definition
Visitor.hpp:211
LIEF::PE
Namespace related to the LIEF's PE module.
Definition
Abstract/Header.hpp:31
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:44
Generated by
1.19.0