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