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: */
libqxp::QXPTextParser::m_encoding
const char * m_encoding
Definition: QXPTextParser.h:44
libqxp::readU16
uint16_t readU16(librevenge::RVNGInputStream *input, bool bigEndian)
Definition: libqxp_utils.cpp:111
libqxp::QXP_4
Definition: QXPHeader.h:29
libqxp
Definition: libqxp_utils.cpp:24
libqxp_utils.h
libqxp::QXPTextParser::QXPTextParser
QXPTextParser(const QXPTextParser &other)=delete
QXPBlockParser.h
libqxp::readU32
uint32_t readU32(librevenge::RVNGInputStream *input, bool bigEndian)
Definition: libqxp_utils.cpp:127
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:64
QXP_DEBUG_MSG
#define QXP_DEBUG_MSG(M)
Definition: libqxp_utils.h:53
libqxp::QXPTextParser::operator=
QXPTextParser & operator=(const QXPTextParser &other)=delete
libqxp::QXPBlockParser::getBlock
std::shared_ptr< librevenge::RVNGInputStream > getBlock(const uint32_t index)
Definition: QXPBlockParser.cpp:56
QXPTypes.h
libqxp::QXPBlockParser
Definition: QXPBlockParser.h:20
libqxp::QXPTextParser
Definition: QXPTextParser.h:28
libqxp::QXPBlockParser::getChain
std::shared_ptr< librevenge::RVNGInputStream > getChain(const uint32_t index)
Definition: QXPBlockParser.cpp:69
libqxp::readString
std::string readString(librevenge::RVNGInputStream *input, const unsigned length)
Definition: libqxp_utils.cpp:217
libqxp::QXPTextParser::m_header
const std::shared_ptr< QXPHeader > m_header
Definition: QXPTextParser.h:42
libqxp::QXPTextParser::be
const bool be
Definition: QXPTextParser.h:43
libqxp::skip
void skip(librevenge::RVNGInputStream *input, unsigned long numBytes)
Definition: libqxp_utils.cpp:234
libqxp::QXPTextParser::m_blockParser
QXPBlockParser m_blockParser
Definition: QXPTextParser.h:45
QXPTextParser.h
QXPHeader.h
libqxp::getRemainingLength
unsigned long getRemainingLength(librevenge::RVNGInputStream *const input)
Definition: libqxp_utils.cpp:259

Generated for libqxp by doxygen 1.8.16