libopenraw  0.3.7
metadata.hpp
1 /*
2  * libopenraw - metadata.hpp
3  *
4  * Copyright (C) 2020 Hubert Figuière
5  *
6  * This library is free software: you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License
8  * as published by the Free Software Foundation, either version 3 of
9  * the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library. If not, see
18  * <http://www.gnu.org/licenses/>.
19  */
20 
21 
22 #pragma once
23 
24 #include <vector>
25 
26 #include "ifddir.hpp"
27 
28 namespace OpenRaw {
29 
30 class RawFile;
31 
34 {
35 public:
37  bool next();
38  bool isInitialized() const
39  {
40  return m_is_initialized;
41  }
42  bool isValid() const
43  {
44  return m_is_valid;
45  }
52  MetaValue* getMetaValue() const;
53 
54 private:
55  Internals::IfdDir::Ref nextIfd();
56 
58  bool m_is_initialized;
60  bool m_is_valid;
62  size_t m_next_ifd;
63  Internals::IfdDir::Ref m_current_ifd;
64  Internals::IfdDir::Entries::const_iterator m_current_entry;
65  std::vector<Internals::IfdDir::Ref> m_ifds;
66 };
67 
68 }
std::shared_ptr< IfdDir > Ref
Shared ptr of an IfdDir.
Definition: ifddir.hpp:56
Metadata value.
Definition: metavalue.hpp:35
Iterator for the metadata.
Definition: metadata.hpp:34
Option< ExifTagType > getEntryType() const
Get the type of the current entry.
Definition: metadata.cpp:106
Internals::IfdDir::Ref getIfd() const
Get the IFD for the current entry.
Definition: metadata.cpp:97
Option< uint16_t > getEntryId() const
Get the ID of the current entry.
Definition: metadata.cpp:115
RAW file.
Definition: rawfile.hpp:66
An option type inspired by Rust.
Definition: option.hpp:47
Global namespace for libopenraw.
Definition: arwfile.cpp:29