LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
MsManifestBinaryID.hpp
Go to the documentation of this file.
1
2/* Copyright 2017 - 2025 R. Thomas
3 * Copyright 2017 - 2025 Quarkslab
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17#ifndef LIEF_PE_ATTRIBUTES_MS_MANIFEST_BINARY_ID_H
18#define LIEF_PE_ATTRIBUTES_MS_MANIFEST_BINARY_ID_H
19
20#include "LIEF/visibility.h"
22
23namespace LIEF {
24namespace PE {
25
36
37 friend class Parser;
38 friend class SignatureParser;
39
40 public:
42 MsManifestBinaryID(std::string binid) :
44 id_(std::move(binid))
45 {}
46
49
51 std::string print() const override {
52 return id_;
53 }
54
56 const std::string& manifest_id() const {
57 return id_;
58 }
59
60 void manifest_id(const std::string& id) {
61 id_ = id;
62 }
63
64 std::unique_ptr<Attribute> clone() const override {
65 return std::unique_ptr<Attribute>(new MsManifestBinaryID{*this});
66 }
67
68 static bool classof(const Attribute* attr) {
70 }
71
72 void accept(Visitor& visitor) const override;
73
74 virtual ~MsManifestBinaryID() = default;
75
76 private:
77 std::string id_;
78};
79
80}
81}
82
83#endif
TYPE
Definition PE/signature/Attribute.hpp:35
@ MS_PLATFORM_MANIFEST_BINARY_ID
Definition PE/signature/Attribute.hpp:47
virtual TYPE type() const
Concrete type of the attribute.
Definition PE/signature/Attribute.hpp:62
std::unique_ptr< Attribute > clone() const override
Definition MsManifestBinaryID.hpp:64
const std::string & manifest_id() const
The manifest id as a string.
Definition MsManifestBinaryID.hpp:56
MsManifestBinaryID(std::string binid)
Definition MsManifestBinaryID.hpp:42
void manifest_id(const std::string &id)
Definition MsManifestBinaryID.hpp:60
virtual ~MsManifestBinaryID()=default
friend class SignatureParser
Definition MsManifestBinaryID.hpp:38
std::string print() const override
Print information about the attribute.
Definition MsManifestBinaryID.hpp:51
friend class Parser
Definition MsManifestBinaryID.hpp:37
MsManifestBinaryID & operator=(const MsManifestBinaryID &)=default
MsManifestBinaryID(const MsManifestBinaryID &)=default
static bool classof(const Attribute *attr)
Definition MsManifestBinaryID.hpp:68
void accept(Visitor &visitor) const override
Definition Visitor.hpp:210
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:41