EPUBXMLSink.h Source File documentation

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
20 namespace libepubgen
21 {
22
23 class EPUBXMLElement;
24
25 class EPUBXMLSink
26 {
27 typedef std::shared_ptr<EPUBXMLElement> EPUBXMLElementPtr_t;
28
29 public:
30 EPUBXMLSink();
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
45 private:
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: */
libepubgen::EPUBXMLSink::empty
bool empty() const
Definition: EPUBXMLSink.cpp:158
libepubgen
Definition: EPUBBinarySink.cpp:12
libepubgen::EPUBXMLSink::EPUBXMLElementPtr_t
std::shared_ptr< EPUBXMLElement > EPUBXMLElementPtr_t
Definition: EPUBXMLSink.h:27
libepubgen::EPUBXMLSink::m_elements
std::deque< EPUBXMLElementPtr_t > m_elements
Definition: EPUBXMLSink.h:46
libepubgen::EPUBXMLSink::insertCharacters
void insertCharacters(const librevenge::RVNGString &characters)
Definition: EPUBXMLSink.cpp:148
libepubgen::EPUBXMLSink::insertEmptyElement
void insertEmptyElement(const char *name, const librevenge::RVNGPropertyList &attributes=librevenge::RVNGPropertyList())
Definition: EPUBXMLSink.cpp:142
libepubgen::EPUBXMLSink::EPUBXMLSink
EPUBXMLSink()
Definition: EPUBXMLSink.cpp:127
libepubgen::EPUBXMLSink::append
void append(const EPUBXMLSink &other)
Definition: EPUBXMLSink.cpp:153
libepubgen::EPUBXMLSink::closeElement
void closeElement(const char *name)
Definition: EPUBXMLSink.cpp:137
libepubgen::EPUBXMLSink::writeTo
void writeTo(EPUBPackage &package, const char *name)
Definition: EPUBXMLSink.cpp:163
libepubgen::EPUBXMLSink
Definition: EPUBXMLSink.h:25
libepubgen::EPUBXMLSink::openElement
void openElement(const char *name, const librevenge::RVNGPropertyList &attributes=librevenge::RVNGPropertyList())
Definition: EPUBXMLSink.cpp:132