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 
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;
46 };
47 
48 }
49 
50 #endif // QXPTEXTPARSER_H_INCLUDED
51 
52 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
QXPTextParser(const QXPTextParser &other)=delete
Definition: libqxp_utils.cpp:24
const std::shared_ptr< QXPHeader > m_header
Definition: QXPTextParser.h:42
Definition: QXPTextParser.h:28
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:64
QXPTextParser & operator=(const QXPTextParser &other)=delete
QXPBlockParser m_blockParser
Definition: QXPTextParser.h:45
const bool be
Definition: QXPTextParser.h:43
const char * m_encoding
Definition: QXPTextParser.h:44
Definition: QXPBlockParser.h:20

Generated for libqxp by doxygen 1.8.15