LIEF: Library to Instrument Executable Formats Version 0.16.0
Loading...
Searching...
No Matches
Metadata.hpp
Go to the documentation of this file.
1/* Copyright 2022 - 2024 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>
20
21#include <LIEF/iterators.hpp>
22
23#include <memory>
24
25namespace LIEF {
26namespace objc {
27
28namespace details {
29class Metadata;
30}
31
36 public:
39
40 Metadata(std::unique_ptr<details::Metadata> impl);
41
44
47
49 std::unique_ptr<Class> get_class(const std::string& name) const;
50
52 std::unique_ptr<Protocol> get_protocol(const std::string& name) const;
53
56 std::string to_decl() const;
57
59 private:
60 std::unique_ptr<details::Metadata> impl_;
61};
62
63}
64}
65#endif
Definition iterators.hpp:486
This class is the main interface to inspect Objective-C metadata.
Definition Metadata.hpp:35
protocols_it protocols() const
Return an iterator over the Objective-C protocols declared in this binary (@protocol).
std::unique_ptr< Protocol > get_protocol(const std::string &name) const
Try to find the Objective-C protocol with the given mangled name.
classes_it classes() const
Return an iterator over the different Objective-C classes (@interface)
std::unique_ptr< Class > get_class(const std::string &name) const
Try to find the Objective-C class with the given mangled name.
std::string to_decl() const
Generate a header-like of all the Objective-C metadata identified in the binary.
Metadata(std::unique_ptr< details::Metadata > impl)
LIEF namespace.
Definition Abstract/Binary.hpp:32
#define LIEF_API
Definition visibility.h:41