LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
SubFramework.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2026 R. Thomas
2 * Copyright 2017 - 2026 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_MACHO_SUB_FRAMEWORK_H
17#define LIEF_MACHO_SUB_FRAMEWORK_H
18#include <string>
19#include <ostream>
20
21#include "LIEF/visibility.h"
22
24
25namespace LIEF {
26namespace MachO {
27
28class BinaryParser;
29
30namespace details {
31struct sub_framework_command;
32}
33
47 friend class BinaryParser;
48
49 public:
50 SubFramework() = default;
51 SubFramework(const details::sub_framework_command& cmd);
52
53 SubFramework& operator=(const SubFramework& copy) = default;
54 SubFramework(const SubFramework& copy) = default;
55
56 std::unique_ptr<LoadCommand> clone() const override {
57 return std::unique_ptr<SubFramework>(new SubFramework(*this));
58 }
59
61 const std::string& umbrella() const {
62 return umbrella_;
63 }
64 void umbrella(std::string u) {
65 umbrella_ = std::move(u);
66 }
67
68 ~SubFramework() override = default;
69
70 void accept(Visitor& visitor) const override;
71
72 std::ostream& print(std::ostream& os) const override;
73
74 static bool classof(const LoadCommand* cmd) {
76 }
77
78 private:
79 std::string umbrella_;
80};
81
82}
83}
84#endif
Class used to parse a single binary (i.e. non-FAT).
Definition BinaryParser.hpp:78
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:128
@ SUB_FRAMEWORK
Definition LoadCommand.hpp:64
SubFramework(const SubFramework &copy)=default
std::unique_ptr< LoadCommand > clone() const override
Definition SubFramework.hpp:56
friend class BinaryParser
Definition SubFramework.hpp:47
SubFramework & operator=(const SubFramework &copy)=default
SubFramework(const details::sub_framework_command &cmd)
~SubFramework() override=default
std::ostream & print(std::ostream &os) const override
void accept(Visitor &visitor) const override
void umbrella(std::string u)
Definition SubFramework.hpp:64
const std::string & umbrella() const
Name of the umbrella framework.
Definition SubFramework.hpp:61
static bool classof(const LoadCommand *cmd)
Definition SubFramework.hpp:74
Definition Visitor.hpp:212
Definition endianness_support.hpp:60
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
LIEF namespace.
Definition Abstract/Binary.hpp:40
#define LIEF_API
Definition visibility.h:43