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
19namespace libqxp
20{
21
22class QXPHeader;
23
24struct CharFormat;
25struct ParagraphFormat;
26struct Text;
27
29{
30 // disable copying
31 QXPTextParser(const QXPTextParser &other) = delete;
32 QXPTextParser &operator=(const QXPTextParser &other) = delete;
33
34public:
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
41private:
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: */
Definition: QXPBlockParser.h:21
Definition: QXPTextParser.h:29
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
const char * m_encoding
Definition: QXPTextParser.h:44
const bool be
Definition: QXPTextParser.h:43
QXPBlockParser m_blockParser
Definition: QXPTextParser.h:45
QXPTextParser & operator=(const QXPTextParser &other)=delete
const std::shared_ptr< QXPHeader > m_header
Definition: QXPTextParser.h:42
QXPTextParser(const QXPTextParser &other)=delete
Definition: libqxp_utils.cpp:25

Generated for libqxp by doxygen 1.9.6