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