libvisio_xml.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/*
3 * This file is part of the libvisio project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#ifndef __LIBVISIO_XML_H__
11#define __LIBVISIO_XML_H__
12
13#include <memory>
14
15#include <librevenge-stream/librevenge-stream.h>
16
17#include <libxml/xmlreader.h>
18
19namespace libvisio
20{
21
22struct Colour;
23
25{
26 // disable copying
29
30public:
32
33 bool isError() const;
34 void setError();
35
36private:
37 bool m_error;
38};
39
40// create an xmlTextReader from a librevenge::RVNGInputStream
41std::unique_ptr<xmlTextReader, void (*)(xmlTextReaderPtr)>
42xmlReaderForStream(librevenge::RVNGInputStream *input, XMLErrorWatcher *watcher = nullptr, bool recover = true);
43
44Colour xmlStringToColour(const xmlChar *s);
45Colour xmlStringToColour(const std::shared_ptr<xmlChar> &s);
46
47long xmlStringToLong(const xmlChar *s);
48long xmlStringToLong(const std::shared_ptr<xmlChar> &s);
49
50double xmlStringToDouble(const xmlChar *s);
51double xmlStringToDouble(const std::shared_ptr<xmlChar> &s);
52
53bool xmlStringToBool(const xmlChar *s);
54bool xmlStringToBool(const std::shared_ptr<xmlChar> &s);
55
56} // namespace libvisio
57
58#endif // __LIBVISIO_XML_H__
59
60/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition libvisio_xml.h:25
void setError()
Definition libvisio_xml.cpp:94
XMLErrorWatcher & operator=(const XMLErrorWatcher &)
bool isError() const
Definition libvisio_xml.cpp:89
bool m_error
Definition libvisio_xml.h:37
XMLErrorWatcher()
Definition libvisio_xml.cpp:84
XMLErrorWatcher(const XMLErrorWatcher &)
Definition libvisio_utils.h:49
std::unique_ptr< xmlTextReader, void(*)(xmlTextReaderPtr)> xmlReaderForStream(librevenge::RVNGInputStream *input, XMLErrorWatcher *const watcher, bool recover)
Definition libvisio_xml.cpp:100
double xmlStringToDouble(const xmlChar *s)
Definition libvisio_xml.cpp:175
bool xmlStringToBool(const xmlChar *s)
Definition libvisio_xml.cpp:193
Colour xmlStringToColour(const xmlChar *s)
Definition libvisio_xml.cpp:115
long xmlStringToLong(const xmlChar *s)
Definition libvisio_xml.cpp:151
Definition VSDTypes.h:71

Generated for libvisio by doxygen 1.14.0