EPUBXMLContent.h Source File documentation

EPUBXMLContent.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_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: */
libepubgen::EPUBXMLContent
Definition: EPUBXMLContent.h:24
libepubgen::EPUBXMLContent::insertEmptyElement
void insertEmptyElement(const char *name, const librevenge::RVNGPropertyList &attributes=librevenge::RVNGPropertyList())
Definition: EPUBXMLContent.cpp:144
libepubgen
Definition: EPUBBinaryContent.cpp:14
libepubgen::EPUBXMLContent::m_elements
std::deque< std::shared_ptr< EPUBXMLElement > > m_elements
Definition: EPUBXMLContent.h:43
libepubgen::EPUBXMLContent::append
void append(const EPUBXMLContent &other)
Definition: EPUBXMLContent.cpp:155
libepubgen::EPUBXMLContent::insertCharacters
void insertCharacters(const librevenge::RVNGString &characters)
Definition: EPUBXMLContent.cpp:150
libepubgen::EPUBXMLContent::openElement
void openElement(const char *name, const librevenge::RVNGPropertyList &attributes=librevenge::RVNGPropertyList())
Definition: EPUBXMLContent.cpp:134
libepubgen::EPUBXMLContent::closeElement
void closeElement(const char *name)
Definition: EPUBXMLContent.cpp:139
libepubgen::EPUBXMLContent::EPUBXMLContent
EPUBXMLContent()
Definition: EPUBXMLContent.cpp:129
libepubgen::EPUBXMLContent::empty
bool empty() const
Definition: EPUBXMLContent.cpp:160
libepubgen::EPUBXMLContent::writeTo
void writeTo(EPUBPackage &package, const char *name)
Definition: EPUBXMLContent.cpp:165