LIEF: Library to Instrument Executable Formats Version 2.0.0
Loading...
Searching...
No Matches
MsManifestBinaryID.hpp
Go to the documentation of this file.
1
2/* Copyright 2017 - 2026 R. Thomas
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_MS_MANIFEST_BINARY_ID_H
17#define LIEF_PE_ATTRIBUTES_MS_MANIFEST_BINARY_ID_H
18
21#include "LIEF/visibility.h"
22#include <string_view>
23
24
25namespace LIEF::PE {
26
39
40 friend class Parser;
41 friend class SignatureParser;
42
43 public:
45 MsManifestBinaryID(std::string binid) :
46 Attribute(Attribute::TYPE::MS_PLATFORM_MANIFEST_BINARY_ID),
47 id_(std::move(binid)) {}
48
51
53 std::string print() const override {
54 return id_;
55 }
56
58 std::string_view manifest_id() const LIEF_LIFETIMEBOUND {
59 return id_;
60 }
61
62 void manifest_id(std::string_view id) {
63 id_ = id;
64 }
65
66 std::unique_ptr<Attribute> clone() const override {
67 return std::unique_ptr<Attribute>(new MsManifestBinaryID{*this});
68 }
69
70 static bool classof(const Attribute* attr) {
72 }
73
74 void accept(Visitor& visitor) const override;
75
76 ~MsManifestBinaryID() override = default;
77
78 private:
79 std::string id_;
80};
81
82}
83
84
85#endif
TYPE
Definition PE/signature/Attribute.hpp:34
@ MS_PLATFORM_MANIFEST_BINARY_ID
Definition PE/signature/Attribute.hpp:46
virtual TYPE type() const
Concrete type of the attribute.
Definition PE/signature/Attribute.hpp:61
std::string_view manifest_id() const
The manifest id as a string.
Definition MsManifestBinaryID.hpp:58
std::unique_ptr< Attribute > clone() const override
Definition MsManifestBinaryID.hpp:66
MsManifestBinaryID(std::string binid)
Definition MsManifestBinaryID.hpp:45
friend class SignatureParser
Definition MsManifestBinaryID.hpp:41
std::string print() const override
Print information about the attribute.
Definition MsManifestBinaryID.hpp:53
friend class Parser
Definition MsManifestBinaryID.hpp:40
MsManifestBinaryID & operator=(const MsManifestBinaryID &)=default
MsManifestBinaryID(const MsManifestBinaryID &)=default
void manifest_id(std::string_view id)
Definition MsManifestBinaryID.hpp:62
static bool classof(const Attribute *attr)
Definition MsManifestBinaryID.hpp:70
void accept(Visitor &visitor) const override
~MsManifestBinaryID() override=default
Definition Visitor.hpp:211
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:31
#define LIEF_API
Definition visibility.h:44