LIEF: Library to Instrument Executable Formats Version 0.15.0
Loading...
Searching...
No Matches
MsSpcStatementType.hpp
1/* Copyright 2017 - 2024 R. Thomas
2 * Copyright 2017 - 2024 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_MS_SPC_STATEMENT_TYPE_H
17#define LIEF_PE_ATTRIBUTES_MS_SPC_STATEMENT_TYPE_H
18
19#include "LIEF/visibility.h"
20#include "LIEF/errors.hpp"
21#include "LIEF/PE/signature/Attribute.hpp"
22#include "LIEF/PE/signature/types.hpp"
23
24namespace LIEF {
25class VectorStream;
26namespace PE {
27
36class LIEF_API MsSpcStatementType : public Attribute {
37
38 friend class Parser;
39 friend class SignatureParser;
40
41 public:
42 MsSpcStatementType() = delete;
43 MsSpcStatementType(oid_t oid) :
44 Attribute(Attribute::TYPE::MS_SPC_STATEMENT_TYPE),
45 oid_{std::move(oid)}
46 {}
47
48 MsSpcStatementType(const MsSpcStatementType&) = default;
49 MsSpcStatementType& operator=(const MsSpcStatementType&) = default;
50
51 std::unique_ptr<Attribute> clone() const override {
52 return std::unique_ptr<Attribute>(new MsSpcStatementType{*this});
53 }
54
59 const oid_t& oid() const {
60 return oid_;
61 }
62
64 std::string print() const override;
65
66 static bool classof(const Attribute* attr) {
67 return attr->type() == Attribute::TYPE::MS_SPC_STATEMENT_TYPE;
68 }
69
70 void accept(Visitor& visitor) const override;
71 ~MsSpcStatementType() override = default;
72
73 private:
74 oid_t oid_;
75};
76
77}
78}
79
80#endif
Interface over PKCS #7 attribute.
Definition Attribute.hpp:30
virtual TYPE type() const
Concrete type of the attribute.
Definition Attribute.hpp:60
Interface over the structure described by the OID 1.3.6.1.4.1.311.2.1.11
Definition MsSpcStatementType.hpp:36
const oid_t & oid() const
According to the documentation: ‍The SpcStatementType MUST contain one Object Identifier with either ...
Definition MsSpcStatementType.hpp:59
std::string print() const override
Print information about the attribute.
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 Visitor.hpp:219
LIEF namespace.
Definition Abstract/Binary.hpp:32