LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
ObjC
ObjC/Metadata.hpp
Go to the documentation of this file.
1
/* Copyright 2022 - 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_OBJC_METADATA_H
16
#define LIEF_OBJC_METADATA_H
17
#include <
LIEF/compiler_attributes.hpp
>
18
#include <
LIEF/visibility.h
>
19
#include <
LIEF/ObjC/Class.hpp
>
20
#include <
LIEF/ObjC/Protocol.hpp
>
21
#include <
LIEF/ObjC/Category.hpp
>
22
23
#include <
LIEF/iterators.hpp
>
24
#include <
LIEF/ObjC/DeclOpt.hpp
>
25
26
#include <memory>
27
28
namespace
LIEF
{
30
namespace
objc
{
31
32
namespace
details
{
33
class
Metadata;
34
}
35
39
class
LIEF_API
Metadata
{
40
public
:
41
using
classes_it
=
iterator_range<Class::Iterator>
;
42
using
protocols_it
=
iterator_range<Protocol::Iterator>
;
43
using
categories_it
=
iterator_range<Category::Iterator>
;
44
45
Metadata
(std::unique_ptr<details::Metadata> impl);
46
48
classes_it
classes
() const
LIEF_LIFETIMEBOUND
;
49
52
protocols_it
protocols
() const
LIEF_LIFETIMEBOUND
;
53
56
categories_it
categories
() const
LIEF_LIFETIMEBOUND
;
57
59
std::unique_ptr<
Class
>
60
get_class
(const std::
string
& name) const
LIEF_LIFETIMEBOUND
;
61
63
std::unique_ptr<
Protocol
>
64
get_protocol
(const std::
string
& name) const
LIEF_LIFETIMEBOUND
;
65
69
std::
string
to_decl
(const
DeclOpt
& opt =
DeclOpt
()) const;
70
71
~
Metadata
();
72
73
private:
74
std::unique_ptr<
details
::
Metadata
> impl_;
75
};
76
77
}
78
}
79
#endif
Category.hpp
DeclOpt.hpp
Class.hpp
Protocol.hpp
LIEF::iterator_range
Definition
iterators.hpp:603
LIEF::objc::Class
This class represents an Objective-C class (@interface).
Definition
ObjC/Class.hpp:39
LIEF::objc::Metadata::protocols_it
iterator_range< Protocol::Iterator > protocols_it
Definition
ObjC/Metadata.hpp:42
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:41
LIEF::objc::Metadata::classes
classes_it classes() const
Return an iterator over the different Objective-C classes (@interface).
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::categories
categories_it categories() const
Return an iterator over the Objective-C categories declared in this binary (e.g. @interface NSString ...
LIEF::objc::Metadata::categories_it
iterator_range< Category::Iterator > categories_it
Definition
ObjC/Metadata.hpp:43
LIEF::objc::Metadata::Metadata
Metadata(std::unique_ptr< details::Metadata > impl)
LIEF::objc::Protocol
This class represents an Objective-C @protocol.
Definition
Protocol.hpp:37
compiler_attributes.hpp
LIEF_LIFETIMEBOUND
#define LIEF_LIFETIMEBOUND
Definition
compiler_attributes.hpp:72
iterators.hpp
LIEF::objc::details
Definition
Category.hpp:32
LIEF::objc
Namespace related to ObjC metadata.
Definition
MachO/Binary.hpp:43
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:41
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:45
Generated by
1.17.0