Orcus
Loading...
Searching...
No Matches
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 INCLUDED_ORCUS_ORCUS_XML_HPP
9#define INCLUDED_ORCUS_ORCUS_XML_HPP
10
11#include "env.hpp"
12#include "spreadsheet/types.hpp"
13
14#include <ostream>
15#include <memory>
16
17namespace orcus {
18
19class xmlns_repository;
20
21namespace spreadsheet { namespace iface {
22 class import_factory;
23 class export_factory;
24}}
25
26class ORCUS_DLLPUBLIC orcus_xml
27{
28 struct impl;
29 std::unique_ptr<impl> mp_impl;
30
31public:
32 orcus_xml(const orcus_xml&) = delete;
33 orcus_xml& operator= (const orcus_xml&) = delete;
34
36 ~orcus_xml();
37
49 void set_namespace_alias(std::string_view alias, std::string_view uri, bool default_ns=false);
50
60 void set_cell_link(std::string_view xpath, std::string_view sheet, spreadsheet::row_t row, spreadsheet::col_t col);
61
70 void start_range(std::string_view sheet, spreadsheet::row_t row, spreadsheet::col_t col);
71
80 void append_field_link(std::string_view xpath, std::string_view label);
81
91 void set_range_row_group(std::string_view xpath);
92
97
103 void append_sheet(std::string_view name);
104
110 void read_stream(std::string_view stream);
111
119 void read_map_definition(std::string_view stream);
120
127 void detect_map_definition(std::string_view stream);
128
137 void write_map_definition(std::string_view stream, std::ostream& out) const;
138
149 void write(std::string_view stream, std::ostream& out) const;
150};
151
152}
153
154#endif
155/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: orcus_xml.hpp:27
void append_field_link(std::string_view xpath, std::string_view label)
void detect_map_definition(std::string_view stream)
void set_cell_link(std::string_view xpath, std::string_view sheet, spreadsheet::row_t row, spreadsheet::col_t col)
void set_range_row_group(std::string_view xpath)
void append_sheet(std::string_view name)
void set_namespace_alias(std::string_view alias, std::string_view uri, bool default_ns=false)
void start_range(std::string_view sheet, spreadsheet::row_t row, spreadsheet::col_t col)
void read_map_definition(std::string_view stream)
void write_map_definition(std::string_view stream, std::ostream &out) const
void write(std::string_view stream, std::ostream &out) const
void read_stream(std::string_view stream)
Definition: export_interface.hpp:27
Definition: import_interface.hpp:898
Definition: xml_namespace.hpp:27