Orcus
orcus_xls_xml.hpp
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6  */
7 
8 #ifndef INCLUDED_ORCUS_ORCUS_XLS_XML_HPP
9 #define INCLUDED_ORCUS_ORCUS_XLS_XML_HPP
10 
11 #include "interface.hpp"
12 #include <memory>
13 
14 namespace orcus {
15 
16 namespace spreadsheet { namespace iface { class import_factory; }}
17 
18 struct orcus_xls_xml_impl;
19 
20 class ORCUS_DLLPUBLIC orcus_xls_xml : public iface::import_filter
21 {
22  struct impl;
23  std::unique_ptr<impl> mp_impl;
24 
25 public:
27  ~orcus_xls_xml();
28 
29  orcus_xls_xml(const orcus_xls_xml&) = delete;
30  orcus_xls_xml& operator= (const orcus_xls_xml&) = delete;
31 
32  static bool detect(const unsigned char* blob, size_t size);
33 
34  virtual void read_file(const std::string& filepath) override;
35  virtual void read_stream(std::string_view stream) override;
36 
37  virtual std::string_view get_name() const override;
38 };
39 
40 }
41 
42 #endif
43 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: interface.hpp:24
Definition: orcus_xls_xml.hpp:21
virtual void read_stream(std::string_view stream) override
expects the whole content of the file
virtual void read_file(const std::string &filepath) override
expects a system path to a local file
Definition: import_interface.hpp:898