LIEF: Library to Instrument Executable Formats
Version 2.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
MachO
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_view>
19
#include <memory>
20
#include <ostream>
21
#include <string>
22
23
#include "
LIEF/compiler_attributes.hpp
"
24
#include "
LIEF/visibility.h
"
25
26
#include "
LIEF/MachO/LoadCommand.hpp
"
27
28
29
namespace
LIEF::MachO
{
30
31
class
BinaryParser
;
32
33
namespace
details
{
34
struct
sub_framework_command;
35
}
36
49
class
LIEF_API
SubFramework
:
public
LoadCommand
{
50
friend
class
BinaryParser
;
51
52
public
:
53
SubFramework
() =
default
;
54
SubFramework
(
const
details::sub_framework_command& cmd);
55
56
SubFramework
&
operator=
(
const
SubFramework
& copy) =
default
;
57
SubFramework
(
const
SubFramework
& copy) =
default
;
58
59
std::unique_ptr<LoadCommand>
clone
()
const override
{
60
return
std::make_unique<SubFramework>(*
this
);
61
}
62
64
std::string_view
umbrella
() const
LIEF_LIFETIMEBOUND
{
65
return
umbrella_;
66
}
67
void
umbrella
(std::string u) {
68
umbrella_ = std::move(u);
69
}
70
71
~SubFramework
()
override
=
default
;
72
73
void
accept
(
Visitor
& visitor)
const override
;
74
75
std::ostream&
print
(std::ostream& os)
const override
;
76
77
static
bool
classof
(
const
LoadCommand
* cmd) {
78
return
cmd->
command
() ==
LoadCommand::TYPE::SUB_FRAMEWORK
;
79
}
80
81
private
:
82
std::string umbrella_;
83
};
84
85
}
86
87
#endif
LoadCommand.hpp
LIEF::MachO::BinaryParser
Class used to parse a single binary (i.e. non-FAT).
Definition
BinaryParser.hpp:79
LIEF::MachO::LoadCommand::LoadCommand
LoadCommand()=default
LIEF::MachO::LoadCommand::command
LoadCommand::TYPE command() const
Command type.
Definition
LoadCommand.hpp:132
LIEF::MachO::LoadCommand::TYPE::SUB_FRAMEWORK
@ SUB_FRAMEWORK
Definition
LoadCommand.hpp:66
LIEF::MachO::SubFramework::SubFramework
SubFramework(const SubFramework ©)=default
LIEF::MachO::SubFramework::clone
std::unique_ptr< LoadCommand > clone() const override
Definition
SubFramework.hpp:59
LIEF::MachO::SubFramework::BinaryParser
friend class BinaryParser
Definition
SubFramework.hpp:50
LIEF::MachO::SubFramework::operator=
SubFramework & operator=(const SubFramework ©)=default
LIEF::MachO::SubFramework::SubFramework
SubFramework(const details::sub_framework_command &cmd)
LIEF::MachO::SubFramework::~SubFramework
~SubFramework() override=default
LIEF::MachO::SubFramework::print
std::ostream & print(std::ostream &os) const override
LIEF::MachO::SubFramework::SubFramework
SubFramework()=default
LIEF::MachO::SubFramework::umbrella
std::string_view umbrella() const
Name of the umbrella framework.
Definition
SubFramework.hpp:64
LIEF::MachO::SubFramework::accept
void accept(Visitor &visitor) const override
LIEF::MachO::SubFramework::umbrella
void umbrella(std::string u)
Definition
SubFramework.hpp:67
LIEF::MachO::SubFramework::classof
static bool classof(const LoadCommand *cmd)
Definition
SubFramework.hpp:77
LIEF::Visitor
Definition
Visitor.hpp:212
compiler_attributes.hpp
LIEF_LIFETIMEBOUND
#define LIEF_LIFETIMEBOUND
Definition
compiler_attributes.hpp:72
LIEF::MachO::details
Definition
endianness_support.hpp:59
LIEF::MachO
Namespace related to the LIEF's Mach-O module.
Definition
Abstract/Header.hpp:36
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:45
Generated by
1.18.0