LIEF: Library to Instrument Executable Formats Version 0.15.1
Loading...
Searching...
No Matches
VDEX/File.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2024 R. Thomas
2 * Copyright 2017 - 2024 Quarkslab
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef LIEF_VDEX_FILE_H
17#define LIEF_VDEX_FILE_H
18#include <ostream>
19
20#include "LIEF/VDEX/Header.hpp"
22
23#include "LIEF/visibility.h"
24#include "LIEF/Object.hpp"
25#include "LIEF/iterators.hpp"
26
27#include <vector>
28#include <memory>
29
30namespace LIEF {
31namespace DEX {
32class File;
33}
34namespace OAT {
35class Binary;
36}
37
38namespace VDEX {
39class Parser;
40
42class LIEF_API File : public Object {
43 friend class Parser;
44 friend class OAT::Binary;
45
46 public:
47 using dex_files_t = std::vector<std::unique_ptr<DEX::File>>;
50
51 File& operator=(const File& copy) = delete;
52 File(const File& copy) = delete;
53
55 const Header& header() const;
57
61
63
64 std::string dex2dex_json_info();
65
66 void accept(Visitor& visitor) const override;
67
68
69 ~File() override;
70
71 LIEF_API friend std::ostream& operator<<(std::ostream& os, const File& vdex_file);
72
73 private:
74 File();
75
76 Header header_;
77 dex_files_t dex_files_;
78};
79
80}
81}
82
83#endif
Definition OAT/Binary.hpp:41
Definition Object.hpp:25
Main class for the VDEX module which represents a VDEX file.
Definition VDEX/File.hpp:42
std::string dex2dex_json_info()
std::vector< std::unique_ptr< DEX::File > > dex_files_t
Definition VDEX/File.hpp:47
it_dex_files dex_files()
Iterator over LIEF::DEX::Files registered.
~File() override
File(const File &copy)=delete
File & operator=(const File &copy)=delete
it_const_dex_files dex_files() const
const Header & header() const
VDEX Header.
friend std::ostream & operator<<(std::ostream &os, const File &vdex_file)
void accept(Visitor &visitor) const override
dex2dex_info_t dex2dex_info() const
Header & header()
Definition VDEX/Header.hpp:29
Class which parse an VDEX file and transform into a VDEX::File object.
Definition VDEX/Parser.hpp:32
Definition Visitor.hpp:224
Iterator which returns reference on container's values.
Definition iterators.hpp:48
std::unordered_map< const DEX::File *, DEX::dex2dex_info_t > dex2dex_info_t
Definition VDEX/type_traits.hpp:29
LIEF namespace.
Definition Abstract/Binary.hpp:32
#define LIEF_API
Definition visibility.h:41