Debian Codegraph @

src/lib/QXPDetector.h

raw
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: */