XMLStylesheet.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 libe-book 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 XMLSTYLESHEET_H_INCLUDED
11#define XMLSTYLESHEET_H_INCLUDED
12
13#include <deque>
14#include <string>
15
16#include <librevenge-stream/librevenge-stream.h>
17
18#include "libebook_libcss.h"
19
20namespace libebook
21{
22
24{
25public:
26 enum Source
27 {
31 };
32
33public:
34 explicit XMLStylesheet(Source source, bool quirks = false, librevenge::RVNGInputStream *input = 0);
35
36 void append(const std::string &selector, const std::string &rule);
37
38 bool isQuirks() const;
39 Source getSource() const;
40
41 CSSStylesheetPtr_t get() const;
42
43private:
44 std::deque<std::string> m_data;
46 const bool m_quirks;
47 mutable bool m_changed;
49};
50
51typedef std::deque<XMLStylesheet> XMLStylesheets_t;
52
53}
54
55#endif // XMLSTYLESHEET_H_INCLUDED
56
57/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: XMLStylesheet.h:24
std::deque< std::string > m_data
Definition: XMLStylesheet.h:44
void append(const std::string &selector, const std::string &rule)
Definition: XMLStylesheet.cpp:33
const Source m_source
Definition: XMLStylesheet.h:45
XMLStylesheet(Source source, bool quirks=false, librevenge::RVNGInputStream *input=0)
Definition: XMLStylesheet.cpp:21
CSSStylesheetPtr_t get() const
Definition: XMLStylesheet.cpp:51
Source getSource() const
Definition: XMLStylesheet.cpp:46
CSSStylesheetPtr_t m_compiled
Definition: XMLStylesheet.h:48
const bool m_quirks
Definition: XMLStylesheet.h:46
Source
Definition: XMLStylesheet.h:27
@ SOURCE_USER
Definition: XMLStylesheet.h:29
@ SOURCE_UA
Definition: XMLStylesheet.h:28
@ SOURCE_AUTHOR
Definition: XMLStylesheet.h:30
bool isQuirks() const
Definition: XMLStylesheet.cpp:41
bool m_changed
Definition: XMLStylesheet.h:47
@ input
Definition: EBOOKHTMLToken.h:89
@ source
Definition: EBOOKHTMLToken.h:131
Definition: BBeBCollector.cpp:19
std::deque< XMLStylesheet > XMLStylesheets_t
Definition: XMLStylesheet.h:51
std::shared_ptr< css_stylesheet > CSSStylesheetPtr_t
Definition: libebook_libcss.h:23

Generated for libe-book by doxygen 1.9.3