EPUBHTMLManager.h Source File documentation

EPUBHTMLManager.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_EPUBHTMLMANAGER_H
11#define INCLUDED_EPUBHTMLMANAGER_H
12
13#include <string>
14#include <vector>
15
16#include <librevenge/librevenge.h>
17
18#include "EPUBCounter.h"
19#include "EPUBHTMLGenerator.h"
20#include "EPUBPath.h"
21#include "EPUBXMLSink.h"
22
23namespace libepubgen
24{
25
26class EPUBImageManager;
27class EPUBListStyleManager;
28class EPUBParagraphStyleManager;
29class EPUBSpanStyleManager;
30class EPUBTableStyleManager;
31class EPUBManifest;
32class EPUBPackage;
33class EPUBGenerator;
34
35 class EPUBHTMLManager
36{
37 // disable copying
38 EPUBHTMLManager(const EPUBHTMLManager &);
39 EPUBHTMLManager &operator=(const EPUBHTMLManager &);
40
41public:
42 explicit EPUBHTMLManager(EPUBManifest &manifest);
43
44 const EPUBHTMLGeneratorPtr_t create(EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version);
45
46 void writeTo(EPUBPackage &package);
47
48 void writeSpineTo(EPUBXMLSink &sink);
49 void writeTocTo(EPUBXMLSink &sink, const EPUBPath &tocPath, int version, EPUBLayoutMethod layout);
50
52 void insertHeadingText(const std::string &text);
53
55 bool hasHeadingText() const;
56
57private:
58 EPUBManifest &m_manifest;
59 std::vector<EPUBPath> m_paths;
60 std::vector<EPUBXMLSink> m_contents;
61 std::vector<std::string> m_ids;
62 EPUBCounter m_number;
63};
64
65}
66
67#endif // INCLUDED_EPUBHTMLMANAGER
68
69/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
EPUBCounter.h
EPUBHTMLGenerator.h
EPUBPath.h
EPUBXMLSink.h
libepubgen::EPUBCounter
Definition EPUBCounter.h:17
libepubgen::EPUBFontManager
Manages embedded fonts.
Definition EPUBImageManager.h:78
libepubgen::EPUBGenerator
Definition EPUBGenerator.h:30
libepubgen::EPUBHTMLManager::create
const EPUBHTMLGeneratorPtr_t create(EPUBImageManager &imageManager, EPUBFontManager &fontManager, EPUBListStyleManager &listStyleManager, EPUBParagraphStyleManager &paragraphStyleManager, EPUBSpanStyleManager &spanStyleManager, EPUBTableStyleManager &tableStyleManager, const EPUBPath &stylesheetPath, EPUBStylesMethod stylesMethod, EPUBLayoutMethod layoutMethod, int version)
Definition EPUBHTMLManager.cpp:50
libepubgen::EPUBHTMLManager::m_contents
std::vector< EPUBXMLSink > m_contents
Definition EPUBHTMLManager.h:60
libepubgen::EPUBHTMLManager::m_paths
std::vector< EPUBPath > m_paths
Definition EPUBHTMLManager.h:59
libepubgen::EPUBHTMLManager::insertHeadingText
void insertHeadingText(const std::string &text)
Appends text to the title of the current heading.
Definition EPUBHTMLManager.cpp:135
libepubgen::EPUBHTMLManager::EPUBHTMLManager
EPUBHTMLManager(const EPUBHTMLManager &)
libepubgen::EPUBHTMLManager::hasHeadingText
bool hasHeadingText() const
If the current heading has a title.
Definition EPUBHTMLManager.cpp:143
libepubgen::EPUBHTMLManager::writeTo
void writeTo(EPUBPackage &package)
Definition EPUBHTMLManager.cpp:69
libepubgen::EPUBHTMLManager::m_manifest
EPUBManifest & m_manifest
Definition EPUBHTMLManager.h:58
libepubgen::EPUBHTMLManager::m_ids
std::vector< std::string > m_ids
Definition EPUBHTMLManager.h:61
libepubgen::EPUBHTMLManager::m_number
EPUBCounter m_number
Definition EPUBHTMLManager.h:62
libepubgen::EPUBHTMLManager::operator=
EPUBHTMLManager & operator=(const EPUBHTMLManager &)
libepubgen::EPUBHTMLManager::writeSpineTo
void writeSpineTo(EPUBXMLSink &sink)
Definition EPUBHTMLManager.cpp:80
libepubgen::EPUBHTMLManager::writeTocTo
void writeTocTo(EPUBXMLSink &sink, const EPUBPath &tocPath, int version, EPUBLayoutMethod layout)
Definition EPUBHTMLManager.cpp:90
libepubgen::EPUBImageManager
Definition EPUBImageManager.h:31
libepubgen::EPUBListStyleManager
Small class to manage the list style.
Definition EPUBListStyleManager.h:32
libepubgen::EPUBManifest
Definition EPUBManifest.h:24
libepubgen::EPUBParagraphStyleManager
Small class to manage the paragraph style.
Definition EPUBParagraphStyleManager.h:30
libepubgen::EPUBPath
Representation of a path in the package.
Definition EPUBPath.h:22
libepubgen::EPUBSpanStyleManager
Small class to manage the span style.
Definition EPUBSpanStyleManager.h:30
libepubgen::EPUBTableStyleManager
Small class to manage the tables style.
Definition EPUBTableStyleManager.h:30
libepubgen::EPUBXMLSink
Definition EPUBXMLSink.h:26
libepubgen
Definition EPUBBinarySink.cpp:13
libepubgen::EPUBHTMLGeneratorPtr_t
std::shared_ptr< EPUBHTMLGenerator > EPUBHTMLGeneratorPtr_t
Definition EPUBHTMLGenerator.h:131