Debian Codegraph @

src/lib/EPUBXMLContent.h

raw
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_EPUBXMLCONTENT_H
11 #define INCLUDED_EPUBXMLCONTENT_H
12
13 #include <deque>
14 #include <memory>
15
16 #include <librevenge/librevenge.h>
17
18 namespace libepubgen
19 {
20
21 class EPUBPackage;
22 class EPUBXMLElement;
23
24 class EPUBXMLContent
25 {
26 public:
27 EPUBXMLContent();
28
29 void openElement(const char *name, const librevenge::RVNGPropertyList &attributes = librevenge::RVNGPropertyList());
30 void closeElement(const char *name);
31
32 void insertEmptyElement(const char *name, const librevenge::RVNGPropertyList &attributes = librevenge::RVNGPropertyList());
33
34 void insertCharacters(const librevenge::RVNGString &characters);
35
36 void append(const EPUBXMLContent &other);
37
38 void writeTo(EPUBPackage &package, const char *name);
39
40 bool empty() const;
41
42 private:
43 std::deque<std::shared_ptr<EPUBXMLElement>> m_elements;
44 };
45
46 }
47
48 #endif // INCLUDED_EPUBXMLCONTENT_H
49
50 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */