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
ObjC
ObjC/Metadata.hpp
Go to the documentation of this file.
1
/* Copyright 2022 - 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_OBJC_METADATA_H
16
#define LIEF_OBJC_METADATA_H
17
#include <
LIEF/visibility.h
>
18
#include <
LIEF/ObjC/Class.hpp
>
19
#include <
LIEF/ObjC/Protocol.hpp
>
20
21
#include <
LIEF/iterators.hpp
>
22
#include <
LIEF/ObjC/DeclOpt.hpp
>
23
24
#include <memory>
25
26
namespace
LIEF
{
28
namespace
objc
{
29
30
namespace
details
{
31
class
Metadata;
32
}
33
37
class
LIEF_API
Metadata
{
38
public
:
39
using
classes_it
=
iterator_range<Class::Iterator>
;
40
using
protocols_it
=
iterator_range<Protocol::Iterator>
;
41
42
Metadata
(std::unique_ptr<details::Metadata> impl);
43
45
classes_it
classes
()
const
;
46
48
protocols_it
protocols
()
const
;
49
51
std::unique_ptr<Class>
get_class
(
const
std::string& name)
const
;
52
54
std::unique_ptr<Protocol>
get_protocol
(
const
std::string& name)
const
;
55
59
std::string
to_decl
(
const
DeclOpt
& opt =
DeclOpt
())
const
;
60
61
~Metadata
();
62
private
:
63
std::unique_ptr<details::Metadata> impl_;
64
};
65
66
}
67
}
68
#endif
DeclOpt.hpp
Class.hpp
Protocol.hpp
LIEF::iterator_range
Definition
iterators.hpp:486
LIEF::objc::Metadata::protocols_it
iterator_range< Protocol::Iterator > protocols_it
Definition
ObjC/Metadata.hpp:40
LIEF::objc::Metadata::protocols
protocols_it protocols() const
Return an iterator over the Objective-C protocols declared in this binary (@protocol).
LIEF::objc::Metadata::get_protocol
std::unique_ptr< Protocol > get_protocol(const std::string &name) const
Try to find the Objective-C protocol with the given mangled name.
LIEF::objc::Metadata::to_decl
std::string to_decl(const DeclOpt &opt=DeclOpt()) const
Generate a header-like of all the Objective-C metadata identified in the binary. The generated output...
LIEF::objc::Metadata::classes_it
iterator_range< Class::Iterator > classes_it
Definition
ObjC/Metadata.hpp:39
LIEF::objc::Metadata::classes
classes_it classes() const
Return an iterator over the different Objective-C classes (@interface).
LIEF::objc::Metadata::~Metadata
~Metadata()
LIEF::objc::Metadata::get_class
std::unique_ptr< Class > get_class(const std::string &name) const
Try to find the Objective-C class with the given mangled name.
LIEF::objc::Metadata::Metadata
Metadata(std::unique_ptr< details::Metadata > impl)
iterators.hpp
LIEF::objc::details
Definition
ObjC/Class.hpp:32
LIEF::objc
Namespace related to ObjC metadata.
Definition
MachO/Binary.hpp:41
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
LIEF::objc::DeclOpt
This structure wraps options to tweak the generated output of functions like LIEF::objc::Metadata::to...
Definition
DeclOpt.hpp:22
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0