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::EPUBTextGenerator::Impl::m_inPageSpan
bool m_inPageSpan
Definition: EPUBTextGenerator.cpp:73
libepubgen::EPUBXMLElement::writeTo
virtual void writeTo(EPUBPackage &package) const =0
libepubgen::EPUBXMLContent::openElement
void openElement(const char *name, const librevenge::RVNGPropertyList &attributes=librevenge::RVNGPropertyList())
Definition: EPUBXMLContent.cpp:134
EPUBGEN_DEBUG_MSG
#define EPUBGEN_DEBUG_MSG(M)
Definition: libepubgen_utils.h:41
libepubgen::EPUBXMLContent::insertCharacters
void insertCharacters(const librevenge::RVNGString &characters)
Definition: EPUBXMLContent.cpp:150
libepubgen::EPUBTextGenerator::Impl::endHtmlFile
void endHtmlFile() override
Definition: EPUBTextGenerator.cpp:112
libepubgen::EPUBTextGenerator::Impl::m_inHeader
bool m_inHeader
Definition: EPUBTextGenerator.cpp:74
libepubgen::EPUBTextGenerator::Impl::Impl
Impl(const Impl &)
libepubgen::EPUBTextGenerator::Impl::m_inFooter
bool m_inFooter
Definition: EPUBTextGenerator.cpp:75
libepubgen::EPUBXMLElement
Definition: EPUBXMLContent.cpp:23
m_characters
const RVNGString m_characters
Definition: EPUBXMLContent.cpp:114
libepubgen::EPUBTextGenerator::Impl::m_imageHandlers
ImageHandlerMap_t m_imageHandlers
Definition: EPUBTextGenerator.cpp:82
libepubgen
Definition: EPUBBinaryContent.cpp:15
libepubgen::EPUBTextGenerator::Impl::m_breakAfterPara
bool m_breakAfterPara
Definition: EPUBTextGenerator.cpp:84
libepubgen::EPUBTextGenerator::Impl::operator=
Impl & operator=(const Impl &)
m_attributes
const RVNGPropertyList m_attributes
Definition: EPUBXMLContent.cpp:51
libepubgen::EPUBTextGenerator::Impl::m_currentHeader
shared_ptr< EPUBTextElements > m_currentHeader
Definition: EPUBTextGenerator.cpp:78
libepubgen::EPUBTextGenerator::Impl::m_currentFooter
shared_ptr< EPUBTextElements > m_currentFooter
Definition: EPUBTextGenerator.cpp:79
EPUBSplitGuard.h
libepubgen::EPUBXMLContent::writeTo
void writeTo(EPUBPackage &package, const char *name)
Definition: EPUBXMLContent.cpp:165
libepubgen::EPUBXMLContent::insertEmptyElement
void insertEmptyElement(const char *name, const librevenge::RVNGPropertyList &attributes=librevenge::RVNGPropertyList())
Definition: EPUBXMLContent.cpp:144
m_name
const std::string m_name
Definition: EPUBXMLContent.cpp:50
libepubgen::EPUBGenerator
Definition: EPUBGenerator.h:34
libepubgen::EPUBTextGenerator::Impl::m_pageSpanProps
RVNGPropertyList m_pageSpanProps
Definition: EPUBTextGenerator.cpp:77
libepubgen::EPUBTextGenerator::Impl::startHtmlFile
void startHtmlFile() override
Definition: EPUBTextGenerator.cpp:106
libepubgen::EPUBXMLElement::~EPUBXMLElement
virtual ~EPUBXMLElement()=0
Definition: EPUBXMLContent.cpp:30
libepubgen::EPUBTextGenerator::Impl
Definition: EPUBTextGenerator.cpp:65
libepubgen::EPUBTextGenerator::Impl::m_currentHeaderOrFooter
shared_ptr< EPUBTextElements > m_currentHeaderOrFooter
Definition: EPUBTextGenerator.cpp:80
libepubgen::EPUBXMLContent::empty
bool empty() const
Definition: EPUBXMLContent.cpp:160
libepubgen::EPUBXMLContent::EPUBXMLContent
EPUBXMLContent()
Definition: EPUBXMLContent.cpp:129
EPUBTextElements.h
EPUBXMLContent.h
EPUBGenerator.h
EPUBHTMLGenerator.h
libepubgen::EPUBTextGenerator::Impl::Impl
Impl(EPUBPackage *package, int version)
Definition: EPUBTextGenerator.cpp:92
libepubgen::EPUBXMLContent::m_elements
std::deque< std::shared_ptr< EPUBXMLElement > > m_elements
Definition: EPUBXMLContent.h:43
EPUBHTMLManager.h
libepubgen_utils.h
libepubgen::EPUBXMLContent::append
void append(const EPUBXMLContent &other)
Definition: EPUBXMLContent.cpp:155
libepubgen::EPUBXMLContent::closeElement
void closeElement(const char *name)
Definition: EPUBXMLContent.cpp:139
libepubgen::isValidMimeType
static bool isValidMimeType(const RVNGString &mediaType)
Checks if the media type is an EPUB 3 Core Media Type or not.
Definition: EPUBTextGenerator.cpp:637
libepubgen::EPUBXMLContent
Definition: EPUBXMLContent.h:25