QXPDetector.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libqxp project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10 #ifndef QXPDETECTOR_H_INCLUDED
11 #define QXPDETECTOR_H_INCLUDED
12
13 #include <memory>
14
15 #include <librevenge-stream/librevenge-stream.h>
16
17 #include <libqxp/libqxp.h>
18
19 namespace libqxp
20 {
21
22 class QXPHeader;
23
24 class QXPDetector
25 {
26 public:
27 QXPDetector();
28 ~QXPDetector() = default;
29
30 void detect(const std::shared_ptr<librevenge::RVNGInputStream> &input);
31
32 const std::shared_ptr<librevenge::RVNGInputStream> &input() const;
33 const std::shared_ptr<QXPHeader> &header() const;
34 bool isSupported() const;
35 QXPDocument::Type type() const;
36
37 private:
38 std::shared_ptr<librevenge::RVNGInputStream> m_input;
39 std::shared_ptr<QXPHeader> m_header;
40 QXPDocument::Type m_type;
41 bool m_supported;
42 };
43
44 }
45
46 #endif // QXPDETECTOR_H_INCLUDED
47
48 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libqxp::QXPDetector::m_header
std::shared_ptr< QXPHeader > m_header
Definition: QXPDetector.h:39
libqxp::QXPDetector::m_input
std::shared_ptr< librevenge::RVNGInputStream > m_input
Definition: QXPDetector.h:38
libqxp::QXPMacFileParser
Definition: QXPMacFileParser.h:21
libqxp::QXPMacFileParser::parse
bool parse(const std::shared_ptr< librevenge::RVNGInputStream > &input)
Definition: QXPMacFileParser.cpp:1240
libqxp::QXPDetector::m_type
QXPDocument::Type m_type
Definition: QXPDetector.h:40
libqxp::QXP_33
Definition: QXPHeader.h:28
QXPDetector.h
libqxp::QXP_4
Definition: QXPHeader.h:29
libqxp
Definition: libqxp_utils.cpp:24
QXP1Header.h
QXP3HeaderBase.h
libqxp::QXPDetector::m_supported
bool m_supported
Definition: QXPDetector.h:41
libqxp::QXPDetector::~QXPDetector
~QXPDetector()=default
libqxp::QXPDetector::type
QXPDocument::Type type() const
Definition: QXPDetector.cpp:145
QXP4Header.h
libqxp::QXPDetector
Definition: QXPDetector.h:24
libqxp::QXPDetector::input
const std::shared_ptr< librevenge::RVNGInputStream > & input() const
Definition: QXPDetector.cpp:130
libqxp::QXP_31
Definition: QXPHeader.h:27
QXPMacFileParser.h
libqxp::QXPDetector::detect
void detect(const std::shared_ptr< librevenge::RVNGInputStream > &input)
Definition: QXPDetector.cpp:79
libqxp::QXPDetector::header
const std::shared_ptr< QXPHeader > & header() const
Definition: QXPDetector.cpp:135
libqxp::QXP_31_MAC
Definition: QXPHeader.h:26
QXPParser.h
libqxp::QXPDetector::isSupported
bool isSupported() const
Definition: QXPDetector.cpp:140
libqxp::QXPDetector::QXPDetector
QXPDetector()
Definition: QXPDetector.cpp:71
QXP33Header.h