QXPDetector.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003  * This file is part of the libqxp project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  */
00009 
00010 #ifndef QXPDETECTOR_H_INCLUDED
00011 #define QXPDETECTOR_H_INCLUDED
00012 
00013 #include <memory>
00014 
00015 #include <librevenge-stream/librevenge-stream.h>
00016 
00017 #include <libqxp/libqxp.h>
00018 
00019 namespace libqxp
00020 {
00021 
00022 class QXPHeader;
00023 
00024 class QXPDetector
00025 {
00026 public:
00027   QXPDetector();
00028   ~QXPDetector() = default;
00029 
00030   void detect(const std::shared_ptr<librevenge::RVNGInputStream> &input);
00031 
00032   const std::shared_ptr<librevenge::RVNGInputStream> &input() const;
00033   const std::shared_ptr<QXPHeader> &header() const;
00034   bool isSupported() const;
00035   QXPDocument::Type type() const;
00036 
00037 private:
00038   std::shared_ptr<librevenge::RVNGInputStream> m_input;
00039   std::shared_ptr<QXPHeader> m_header;
00040   QXPDocument::Type m_type;
00041   bool m_supported;
00042 };
00043 
00044 }
00045 
00046 #endif // QXPDETECTOR_H_INCLUDED
00047 
00048 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */