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
SubClient.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2026 R. Thomas
2
*
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
#ifndef LIEF_MACHO_SUB_CLIENT_H
16
#define LIEF_MACHO_SUB_CLIENT_H
17
#include <string_view>
18
#include <memory>
19
#include <ostream>
20
#include <string>
21
22
#include "
LIEF/compiler_attributes.hpp
"
23
#include "
LIEF/visibility.h
"
24
25
#include "
LIEF/MachO/LoadCommand.hpp
"
26
27
28
namespace
LIEF::MachO
{
29
30
class
BinaryParser
;
31
32
namespace
details
{
33
struct
sub_client_command;
34
}
35
46
class
LIEF_API
SubClient
:
public
LoadCommand
{
47
friend
class
BinaryParser
;
48
49
public
:
50
SubClient
() =
default
;
51
SubClient
(
const
details::sub_client_command& cmd);
52
53
SubClient
&
operator=
(
const
SubClient
& copy) =
default
;
54
SubClient
(
const
SubClient
& copy) =
default
;
55
56
std::unique_ptr<LoadCommand>
clone
()
const override
{
57
return
std::make_unique<SubClient>(*
this
);
58
}
59
61
std::string_view
client
() const
LIEF_LIFETIMEBOUND
{
62
return
client_;
63
}
64
65
void
client
(std::string u) {
66
client_ = std::move(u);
67
}
68
69
~SubClient
()
override
=
default
;
70
71
void
accept
(
Visitor
& visitor)
const override
;
72
73
std::ostream&
print
(std::ostream& os)
const override
;
74
75
static
bool
classof
(
const
LoadCommand
* cmd) {
76
return
cmd->
command
() ==
LoadCommand::TYPE::SUB_CLIENT
;
77
}
78
79
private
:
80
std::string client_;
81
};
82
83
}
84
85
#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_CLIENT
@ SUB_CLIENT
Definition
LoadCommand.hpp:68
LIEF::MachO::SubClient::print
std::ostream & print(std::ostream &os) const override
LIEF::MachO::SubClient::operator=
SubClient & operator=(const SubClient ©)=default
LIEF::MachO::SubClient::BinaryParser
friend class BinaryParser
Definition
SubClient.hpp:47
LIEF::MachO::SubClient::clone
std::unique_ptr< LoadCommand > clone() const override
Definition
SubClient.hpp:56
LIEF::MachO::SubClient::client
std::string_view client() const
Name of the client.
Definition
SubClient.hpp:61
LIEF::MachO::SubClient::SubClient
SubClient()=default
LIEF::MachO::SubClient::client
void client(std::string u)
Definition
SubClient.hpp:65
LIEF::MachO::SubClient::SubClient
SubClient(const details::sub_client_command &cmd)
LIEF::MachO::SubClient::accept
void accept(Visitor &visitor) const override
LIEF::MachO::SubClient::~SubClient
~SubClient() override=default
LIEF::MachO::SubClient::SubClient
SubClient(const SubClient ©)=default
LIEF::MachO::SubClient::classof
static bool classof(const LoadCommand *cmd)
Definition
SubClient.hpp:75
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