LIEF: Library to Instrument Executable Formats Version 2.0.0
Loading...
Searching...
No Matches
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
20#include "LIEF/visibility.h"
21
22
23namespace LIEF::PE {
24
26 friend class Parser;
27 friend class SignatureParser;
28
29 public:
32
34 Attribute(Attribute::TYPE::SPC_RELAXED_PE_MARKER_CHECK),
35 value_(value) {}
36
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) {
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
TYPE
Definition PE/signature/Attribute.hpp:34
@ SPC_RELAXED_PE_MARKER_CHECK
Definition PE/signature/Attribute.hpp:41
virtual TYPE type() const
Concrete type of the attribute.
Definition PE/signature/Attribute.hpp:61
std::string print() const override
Print information about the underlying attribute.
Definition SpcRelaxedPeMarkerCheck.hpp:52
std::unique_ptr< Attribute > clone() const override
Definition SpcRelaxedPeMarkerCheck.hpp:48
SpcRelaxedPeMarkerCheck()
Definition SpcRelaxedPeMarkerCheck.hpp:30
~SpcRelaxedPeMarkerCheck() override=default
SpcRelaxedPeMarkerCheck(const SpcRelaxedPeMarkerCheck &)=default
static bool classof(const Attribute *attr)
Definition SpcRelaxedPeMarkerCheck.hpp:56
friend class SignatureParser
Definition SpcRelaxedPeMarkerCheck.hpp:27
void value(uint32_t v)
Definition SpcRelaxedPeMarkerCheck.hpp:44
uint32_t value() const
Definition SpcRelaxedPeMarkerCheck.hpp:40
friend class Parser
Definition SpcRelaxedPeMarkerCheck.hpp:26
void accept(Visitor &visitor) const override
SpcRelaxedPeMarkerCheck & operator=(const SpcRelaxedPeMarkerCheck &)=default
SpcRelaxedPeMarkerCheck(uint32_t value)
Definition SpcRelaxedPeMarkerCheck.hpp:33
Definition Visitor.hpp:211
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:31
#define LIEF_API
Definition visibility.h:44