LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
SpcRelaxedPeMarkerCheck.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_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"
22
23namespace LIEF {
24namespace PE {
25
27 friend class Parser;
28 friend class SignatureParser;
29
30 public:
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
Interface over PKCS #7 attribute.
Definition PE/signature/Attribute.hpp:29
virtual TYPE type() const
Concrete type of the attribute.
Definition PE/signature/Attribute.hpp:62
Definition SpcRelaxedPeMarkerCheck.hpp:26
std::string print() const override
Print information about the underlying attribute.
Definition SpcRelaxedPeMarkerCheck.hpp:55
std::unique_ptr< Attribute > clone() const override
Definition SpcRelaxedPeMarkerCheck.hpp:51
SpcRelaxedPeMarkerCheck()
Definition SpcRelaxedPeMarkerCheck.hpp:31
~SpcRelaxedPeMarkerCheck() override=default
SpcRelaxedPeMarkerCheck(const SpcRelaxedPeMarkerCheck &)=default
static bool classof(const Attribute *attr)
Definition SpcRelaxedPeMarkerCheck.hpp:59
void value(uint32_t v)
Definition SpcRelaxedPeMarkerCheck.hpp:47
uint32_t value() const
Definition SpcRelaxedPeMarkerCheck.hpp:43
void accept(Visitor &visitor) const override
SpcRelaxedPeMarkerCheck & operator=(const SpcRelaxedPeMarkerCheck &)=default
SpcRelaxedPeMarkerCheck(uint32_t value)
Definition SpcRelaxedPeMarkerCheck.hpp:35
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41