libopenraw
makernotedir.hpp
1/*
2 * libopenraw - makernotedir.h
3 *
4 * Copyright (C) 2010-2015 Hubert Figuiere
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#ifndef OR_INTERNALS_MAKERNOTEDIR_H_
23#define OR_INTERNALS_MAKERNOTEDIR_H_
24
25#include <stddef.h>
26#include <sys/types.h>
27#include <memory>
28#include <string>
29
30#include "ifddir.hpp"
31
32namespace OpenRaw {
33namespace Internals {
34
35class IfdFileContainer;
36
38 : public IfdDir
39{
40public:
41 typedef std::shared_ptr<MakerNoteDir> Ref;
42
44 static Ref createMakerNote(off_t offset,
45 IfdFileContainer & container);
46
47 MakerNoteDir(off_t _offset, IfdFileContainer & _container,
48 off_t mnote_offset, const std::string & id);
49 virtual ~MakerNoteDir();
50
51 off_t getMnoteOffset() const
52 { return m_mnote_offset; }
53
54 const std::string & getId() const
55 { return m_id; }
56protected:
57 MakerNoteDir(const char* magic, size_t hlen,
58 off_t _offset,
59 IfdFileContainer & _container,
60 off_t mnote_offset,
61 const std::string & id);
62
63 std::string m_magic;
64 size_t m_hlen;
65 off_t m_mnote_offset;
66 std::string m_id;
67};
68
69}
70}
71
72/*
73 Local Variables:
74 mode:c++
75 c-file-style:"stroustrup"
76 c-file-offsets:((innamespace . 0))
77 indent-tabs-mode:nil
78 fill-column:80
79 End:
80*/
81
82
83#endif
off_t offset() const
Definition: ifddir.hpp:56
static Ref createMakerNote(off_t offset, IfdFileContainer &container)
CIFF is the container for CRW files. It is an attempt from Canon to make this a standard....
Definition: arwfile.cpp:30