Orcus
interface.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_INTERFACE_HPP
9 #define INCLUDED_ORCUS_INTERFACE_HPP
10 
11 #include "orcus/env.hpp"
12 #include "orcus/types.hpp"
13 
14 #include <string>
15 #include <memory>
16 
17 namespace orcus {
18 
19 struct config;
20 
21 namespace iface {
22 
23 class ORCUS_DLLPUBLIC import_filter
24 {
25  struct impl;
26  std::unique_ptr<impl> mp_impl;
27 
28 public:
29  import_filter(format_t input);
30  virtual ~import_filter();
31 
33  virtual void read_file(const std::string& filepath) = 0;
34 
36  virtual void read_stream(const char* content, size_t len) = 0;
37 
38  virtual const char* get_name() const = 0;
39 
40  void set_config(const orcus::config& v);
41  const orcus::config& get_config() const;
42 };
43 
44 class ORCUS_DLLPUBLIC document_dumper
45 {
46 public:
47  virtual ~document_dumper();
48  virtual void dump(dump_format_t format, const std::string& output) const = 0;
49  virtual void dump_check(std::ostream& os) const = 0;
50 };
51 
52 }}
53 
54 #endif
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: interface.hpp:44
Definition: config.hpp:18
Definition: base64.hpp:15
Definition: interface.hpp:23