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 
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 private:
44  std::deque<EPUBXMLElementPtr_t> m_elements;
45 };
46 
47 }
48 
49 #endif // INCLUDED_EPUBXMLSINK_H
50 
51 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: EPUBBinarySink.cpp:12
std::shared_ptr< EPUBXMLElement > EPUBXMLElementPtr_t
Definition: EPUBXMLSink.h:27
std::deque< EPUBXMLElementPtr_t > m_elements
Definition: EPUBXMLSink.h:44
void insertCharacters(const librevenge::RVNGString &characters)
Definition: EPUBXMLSink.cpp:148
void insertEmptyElement(const char *name, const librevenge::RVNGPropertyList &attributes=librevenge::RVNGPropertyList())
Definition: EPUBXMLSink.cpp:142
EPUBXMLSink()
Definition: EPUBXMLSink.cpp:127
void append(const EPUBXMLSink &other)
Definition: EPUBXMLSink.cpp:153
void closeElement(const char *name)
Definition: EPUBXMLSink.cpp:137
void writeTo(EPUBPackage &package, const char *name)
Definition: EPUBXMLSink.cpp:158
Definition: EPUBXMLSink.h:25
void openElement(const char *name, const librevenge::RVNGPropertyList &attributes=librevenge::RVNGPropertyList())
Definition: EPUBXMLSink.cpp:132

Generated for libepubgen by doxygen 1.8.11