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 
16 namespace orcus {
17 
18 struct config;
19 
20 namespace iface {
21 
22 class ORCUS_DLLPUBLIC import_filter
23 {
24  struct impl;
25  impl* mp_impl;
26 
27 public:
28  import_filter(format_t input);
29  virtual ~import_filter();
30 
32  virtual void read_file(const std::string& filepath) = 0;
33 
35  virtual void read_stream(const char* content, size_t len) = 0;
36 
37  virtual const char* get_name() const = 0;
38 
39  void set_config(const orcus::config& v);
40  const orcus::config& get_config() const;
41 };
42 
43 class ORCUS_DLLPUBLIC document_dumper
44 {
45 public:
46  virtual ~document_dumper();
47  virtual void dump_flat(const std::string& outdir) const = 0;
48  virtual void dump_html(const std::string& outdir) const = 0;
49  virtual void dump_json(const std::string& outdir) const = 0;
50  virtual void dump_csv(const std::string& outdir) const = 0;
51  virtual void dump_check(std::ostream& os) const = 0;
52 };
53 
54 }}
55 
56 #endif
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: interface.hpp:43
Definition: config.hpp:18
Definition: interface.hpp:22