QXPTextParser.h Source File documentation

QXPTextParser.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 libqxp 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 QXPTEXTPARSER_H_INCLUDED
11 #define QXPTEXTPARSER_H_INCLUDED
12
13 #include <memory>
14 #include <vector>
15
16 #include "libqxp_utils.h"
17 #include "QXPBlockParser.h"
18
19 namespace libqxp
20 {
21
22 class QXPHeader;
23
24 struct CharFormat;
25 struct ParagraphFormat;
26 struct Text;
27
28 class QXPTextParser
29 {
30 // disable copying
31 QXPTextParser(const QXPTextParser &other) = delete;
32 QXPTextParser &operator=(const QXPTextParser &other) = delete;
33
34 public:
35 QXPTextParser(const std::shared_ptr<librevenge::RVNGInputStream> &input, const std::shared_ptr<QXPHeader> &header);
36
37 std::shared_ptr<Text> parseText(unsigned index,
38 const std::vector<std::shared_ptr<CharFormat>> &charFormats,
39 const std::vector<std::shared_ptr<ParagraphFormat>> &paragraphFormats);
40
41 private:
42 const std::shared_ptr<QXPHeader> m_header;
43 const bool be; // big endian
44 const char *m_encoding;
45 QXPBlockParser m_blockParser;
46 };
47
48 }
49
50 #endif // QXPTEXTPARSER_H_INCLUDED
51
52 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libqxp::QXPTextParser::QXPTextParser
QXPTextParser(const QXPTextParser &other)=delete
libqxp
Definition: libqxp_utils.cpp:24
libqxp::QXPTextParser::m_header
const std::shared_ptr< QXPHeader > m_header
Definition: QXPTextParser.h:42
libqxp::QXPTextParser
Definition: QXPTextParser.h:28
libqxp::QXPTextParser::parseText
std::shared_ptr< Text > parseText(unsigned index, const std::vector< std::shared_ptr< CharFormat >> &charFormats, const std::vector< std::shared_ptr< ParagraphFormat >> &paragraphFormats)
Definition: QXPTextParser.cpp:28
libqxp::QXPTextParser::operator=
QXPTextParser & operator=(const QXPTextParser &other)=delete
libqxp::QXPTextParser::m_blockParser
QXPBlockParser m_blockParser
Definition: QXPTextParser.h:45
libqxp_utils.h
libqxp::QXPTextParser::be
const bool be
Definition: QXPTextParser.h:43
libqxp::QXPTextParser::m_encoding
const char * m_encoding
Definition: QXPTextParser.h:44
QXPBlockParser.h
libqxp::QXPBlockParser
Definition: QXPBlockParser.h:20