Orcus
orcus_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 __ORCUS_ORCUS_XML_HPP__
9 #define __ORCUS_ORCUS_XML_HPP__
10 
11 #include "env.hpp"
12 #include "spreadsheet/types.hpp"
13 
14 namespace orcus {
15 
16 class pstring;
17 class xmlns_repository;
18 struct orcus_xml_impl;
19 
20 namespace spreadsheet { namespace iface {
21  class import_factory;
22  class export_factory;
23 }}
24 
25 class ORCUS_DLLPUBLIC orcus_xml
26 {
27  orcus_xml(const orcus_xml&); // disabled
28  orcus_xml& operator= (const orcus_xml&); // disabled
29 
30  void read_impl();
31 
32 public:
34  ~orcus_xml();
35 
36  void set_namespace_alias(const pstring& alias, const pstring& uri);
37 
38  void set_cell_link(const pstring& xpath, const pstring& sheet, spreadsheet::row_t row, spreadsheet::col_t col);
39 
40  void start_range(const pstring& sheet, spreadsheet::row_t row, spreadsheet::col_t col);
41  void append_field_link(const pstring& xpath);
42  void commit_range();
43 
44  void append_sheet(const pstring& name);
45 
46  void read_file(const char* filepath);
47  void read_stream(const char* p, size_t n);
48  void write_file(const char* filepath);
49 
50 private:
51  orcus_xml_impl* mp_impl;
52 };
53 
54 }
55 
56 #endif
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: pstring.hpp:24
Definition: orcus_xml.hpp:25
Definition: export_interface.hpp:26
Definition: import_interface.hpp:773
Definition: xml_namespace.hpp:26
Definition: base64.hpp:15