EPUBXMLSink.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 libepubgen 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 INCLUDED_EPUBXMLSINK_H
11#define INCLUDED_EPUBXMLSINK_H
12
13#include <deque>
14#include <memory>
15
16#include <librevenge/librevenge.h>
17
18#include <libepubgen/libepubgen.h>
19
20namespace libepubgen
21{
22
23class EPUBXMLElement;
24
26{
27 typedef std::shared_ptr<EPUBXMLElement> EPUBXMLElementPtr_t;
28
29public:
31
32 void openElement(const char *name, const librevenge::RVNGPropertyList &attributes = librevenge::RVNGPropertyList());
33 void closeElement(const char *name);
34
35 void insertEmptyElement(const char *name, const librevenge::RVNGPropertyList &attributes = librevenge::RVNGPropertyList());
36
37 void insertCharacters(const librevenge::RVNGString &characters);
38
39 void append(const EPUBXMLSink &other);
40
41 void writeTo(EPUBPackage &package, const char *name);
42
43 bool empty() const;
44
45private:
46 std::deque<EPUBXMLElementPtr_t> m_elements;
47};
48
49}
50
51#endif // INCLUDED_EPUBXMLSINK_H
52
53/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition EPUBXMLSink.h:26
void closeElement(const char *name)
Definition EPUBXMLSink.cpp:137
std::shared_ptr< EPUBXMLElement > EPUBXMLElementPtr_t
Definition EPUBXMLSink.h:27
bool empty() const
Definition EPUBXMLSink.cpp:158
void append(const EPUBXMLSink &other)
Definition EPUBXMLSink.cpp:153
void insertCharacters(const librevenge::RVNGString &characters)
Definition EPUBXMLSink.cpp:148
void writeTo(EPUBPackage &package, const char *name)
Definition EPUBXMLSink.cpp:163
std::deque< EPUBXMLElementPtr_t > m_elements
Definition EPUBXMLSink.h:46
void openElement(const char *name, const librevenge::RVNGPropertyList &attributes=librevenge::RVNGPropertyList())
Definition EPUBXMLSink.cpp:132
EPUBXMLSink()
Definition EPUBXMLSink.cpp:127
void insertEmptyElement(const char *name, const librevenge::RVNGPropertyList &attributes=librevenge::RVNGPropertyList())
Definition EPUBXMLSink.cpp:142
Definition EPUBBinarySink.cpp:13
std::unique_ptr< T > make_unique(Args &&... args)
Definition libepubgen_utils.h:60

Generated for libepubgen by doxygen 1.9.8