LIEF: Library to Instrument Executable Formats Version 0.15.1
Loading...
Searching...
No Matches
SpcRelaxedPeMarkerCheck.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2023 R. Thomas
2 * Copyright 2017 - 2023 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
19#include "LIEF/visibility.h"
21
22namespace LIEF {
23namespace PE {
24
26 friend class Parser;
27 friend class SignatureParser;
28
29 public:
33
34 SpcRelaxedPeMarkerCheck(uint32_t value) :
35 Attribute(Attribute::TYPE::SPC_RELAXED_PE_MARKER_CHECK),
36 value_(value)
37 {}
38
41
42 uint32_t value() const {
43 return value_;
44 }
45
46 void value(uint32_t v) {
47 value_ = v;
48 }
49
50 std::unique_ptr<Attribute> clone() const override {
51 return std::unique_ptr<Attribute>(new SpcRelaxedPeMarkerCheck{*this});
52 }
53
54 std::string print() const override {
55 return "value=" + std::to_string(value_);
56 }
57
58 static bool classof(const Attribute* attr) {
59 return attr->type() == Attribute::TYPE::SPC_RELAXED_PE_MARKER_CHECK;
60 }
61
62 void accept(Visitor& visitor) const override;
63
64 ~SpcRelaxedPeMarkerCheck() override = default;
65
66 private:
67 uint32_t value_ = 0;
68};
69
70}
71}
72
73#endif
Interface over PKCS #7 attribute.
Definition PE/signature/Attribute.hpp:28
TYPE
Definition PE/signature/Attribute.hpp:34
virtual TYPE type() const
Concrete type of the attribute.
Definition PE/signature/Attribute.hpp:61
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:47
Definition SignatureParser.hpp:37
Definition SpcRelaxedPeMarkerCheck.hpp:25
std::string print() const override
Print information about the underlying attribute.
Definition SpcRelaxedPeMarkerCheck.hpp:54
std::unique_ptr< Attribute > clone() const override
Definition SpcRelaxedPeMarkerCheck.hpp:50
SpcRelaxedPeMarkerCheck()
Definition SpcRelaxedPeMarkerCheck.hpp:30
~SpcRelaxedPeMarkerCheck() override=default
SpcRelaxedPeMarkerCheck(const SpcRelaxedPeMarkerCheck &)=default
static bool classof(const Attribute *attr)
Definition SpcRelaxedPeMarkerCheck.hpp:58
void value(uint32_t v)
Definition SpcRelaxedPeMarkerCheck.hpp:46
uint32_t value() const
Definition SpcRelaxedPeMarkerCheck.hpp:42
void accept(Visitor &visitor) const override
SpcRelaxedPeMarkerCheck & operator=(const SpcRelaxedPeMarkerCheck &)=default
SpcRelaxedPeMarkerCheck(uint32_t value)
Definition SpcRelaxedPeMarkerCheck.hpp:34
Definition Visitor.hpp:224
LIEF namespace.
Definition Abstract/Binary.hpp:32
#define LIEF_API
Definition visibility.h:41