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
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() = delete;
33 orcus_xml(const orcus_xml&) = delete;
34 orcus_xml& operator= (const orcus_xml&) = delete;
35
37 ~orcus_xml();
38
39 static bool detect(std::string_view strm);
40
50 static bool has_range(std::string_view stream);
51
63 void set_namespace_alias(std::string_view alias, std::string_view uri, bool default_ns=false);
64
74 void set_cell_link(std::string_view xpath, std::string_view sheet, spreadsheet::row_t row, spreadsheet::col_t col);
75
84 void start_range(std::string_view sheet, spreadsheet::row_t row, spreadsheet::col_t col);
85
94 void append_field_link(std::string_view xpath, std::string_view label);
95
105 void set_range_row_group(std::string_view xpath);
106
111
117 void append_sheet(std::string_view name);
118
124 void read_stream(std::string_view stream);
125
133 void read_map_definition(std::string_view stream);
134
141 void detect_map_definition(std::string_view stream);
142
151 void write_map_definition(std::string_view stream, std::ostream& out) const;
152
163 void write(std::string_view stream, std::ostream& out) const;
164};
165
166}
167
168#endif
169/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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)
static bool has_range(std::string_view stream)
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:40
Definition import_interface.hpp:1184
Definition xml_namespace.hpp:30