LIEF: Library to Instrument Executable Formats
Version 1.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
* Copyright 2017 - 2026 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_ATTRIBUTES_SPC_RELAXED_PE_MARKER_CHECK_H
17
#define LIEF_PE_ATTRIBUTES_SPC_RELAXED_PE_MARKER_CHECK_H
18
#include <cstdint>
19
20
#include "
LIEF/visibility.h
"
21
#include "
LIEF/PE/signature/Attribute.hpp
"
22
23
namespace
LIEF
{
24
namespace
PE
{
25
26
class
LIEF_API
SpcRelaxedPeMarkerCheck
:
public
Attribute
{
27
friend
class
Parser
;
28
friend
class
SignatureParser
;
29
30
public
:
31
SpcRelaxedPeMarkerCheck
() :
32
SpcRelaxedPeMarkerCheck
(0)
33
{}
34
35
SpcRelaxedPeMarkerCheck
(uint32_t
value
) :
36
Attribute
(
Attribute
::
TYPE
::SPC_RELAXED_PE_MARKER_CHECK),
37
value_(
value
)
38
{}
39
40
SpcRelaxedPeMarkerCheck
(
const
SpcRelaxedPeMarkerCheck
&) =
default
;
41
SpcRelaxedPeMarkerCheck
&
operator=
(
const
SpcRelaxedPeMarkerCheck
&) =
default
;
42
43
uint32_t
value
()
const
{
44
return
value_;
45
}
46
47
void
value
(uint32_t v) {
48
value_ = v;
49
}
50
51
std::unique_ptr<Attribute>
clone
()
const override
{
52
return
std::unique_ptr<Attribute>(
new
SpcRelaxedPeMarkerCheck
{*
this
});
53
}
54
55
std::string
print
()
const override
{
56
return
"value="
+ std::to_string(value_);
57
}
58
59
static
bool
classof
(
const
Attribute
* attr) {
60
return
attr->
type
() ==
Attribute::TYPE::SPC_RELAXED_PE_MARKER_CHECK
;
61
}
62
63
void
accept
(
Visitor
& visitor)
const override
;
64
65
~SpcRelaxedPeMarkerCheck
()
override
=
default
;
66
67
private
:
68
uint32_t value_ = 0;
69
};
70
71
}
72
}
73
74
#endif
Attribute.hpp
LIEF::PE::Attribute::TYPE
TYPE
Definition
PE/signature/Attribute.hpp:35
LIEF::PE::Attribute::TYPE::SPC_RELAXED_PE_MARKER_CHECK
@ SPC_RELAXED_PE_MARKER_CHECK
Definition
PE/signature/Attribute.hpp:42
LIEF::PE::Attribute::Attribute
Attribute()=delete
LIEF::PE::Attribute::type
virtual TYPE type() const
Concrete type of the attribute.
Definition
PE/signature/Attribute.hpp:62
LIEF::PE::SpcRelaxedPeMarkerCheck::print
std::string print() const override
Print information about the underlying attribute.
Definition
SpcRelaxedPeMarkerCheck.hpp:55
LIEF::PE::SpcRelaxedPeMarkerCheck::clone
std::unique_ptr< Attribute > clone() const override
Definition
SpcRelaxedPeMarkerCheck.hpp:51
LIEF::PE::SpcRelaxedPeMarkerCheck::SpcRelaxedPeMarkerCheck
SpcRelaxedPeMarkerCheck()
Definition
SpcRelaxedPeMarkerCheck.hpp:31
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:59
LIEF::PE::SpcRelaxedPeMarkerCheck::SignatureParser
friend class SignatureParser
Definition
SpcRelaxedPeMarkerCheck.hpp:28
LIEF::PE::SpcRelaxedPeMarkerCheck::value
void value(uint32_t v)
Definition
SpcRelaxedPeMarkerCheck.hpp:47
LIEF::PE::SpcRelaxedPeMarkerCheck::value
uint32_t value() const
Definition
SpcRelaxedPeMarkerCheck.hpp:43
LIEF::PE::SpcRelaxedPeMarkerCheck::Parser
friend class Parser
Definition
SpcRelaxedPeMarkerCheck.hpp:27
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:35
LIEF::Visitor
Definition
Visitor.hpp:210
LIEF::PE
Namespace related to the LIEF's PE module.
Definition
Abstract/Header.hpp:32
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0