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
SubClient.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2025 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>
18
#include <ostream>
19
20
#include "
LIEF/visibility.h
"
21
22
#include "
LIEF/MachO/LoadCommand.hpp
"
23
24
namespace
LIEF
{
25
namespace
MachO
{
26
27
class
BinaryParser
;
28
29
namespace
details
{
30
struct
sub_client_command;
31
}
32
43
class
LIEF_API
SubClient
:
public
LoadCommand
{
44
friend
class
BinaryParser
;
45
public
:
46
SubClient
() =
default
;
47
SubClient
(
const
details::sub_client_command& cmd);
48
49
SubClient
&
operator=
(
const
SubClient
& copy) =
default
;
50
SubClient
(
const
SubClient
& copy) =
default
;
51
52
std::unique_ptr<LoadCommand>
clone
()
const override
{
53
return
std::unique_ptr<SubClient>(
new
SubClient
(*
this
));
54
}
55
57
const
std::string&
client
()
const
{
58
return
client_;
59
}
60
61
void
client
(std::string u) {
62
client_ = std::move(u);
63
}
64
65
~SubClient
()
override
=
default
;
66
67
void
accept
(
Visitor
& visitor)
const override
;
68
69
std::ostream&
print
(std::ostream& os)
const override
;
70
71
static
bool
classof
(
const
LoadCommand
* cmd) {
72
return
cmd->
command
() ==
LoadCommand::TYPE::SUB_CLIENT
;
73
}
74
75
private
:
76
std::string client_;
77
};
78
79
}
80
}
81
#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_CLIENT
@ SUB_CLIENT
Definition
LoadCommand.hpp:65
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:44
LIEF::MachO::SubClient::clone
std::unique_ptr< LoadCommand > clone() const override
Definition
SubClient.hpp:52
LIEF::MachO::SubClient::SubClient
SubClient()=default
LIEF::MachO::SubClient::client
const std::string & client() const
Name of the client.
Definition
SubClient.hpp:57
LIEF::MachO::SubClient::client
void client(std::string u)
Definition
SubClient.hpp:61
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:71
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