WPSTextSubDocument.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwps
3 * Version: MPL 2.0 / LGPLv2.1+
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 * Major Contributor(s):
10 * Copyright (C) 2006, 2007 Andrew Ziem
11 * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
12 * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
13 *
14 * For minor contributions see the git repository.
15 *
16 * Alternatively, the contents of this file may be used under the terms
17 * of the GNU Lesser General Public License Version 2.1 or later
18 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
19 * applicable instead of those above.
20 *
21 * For further information visit http://libwps.sourceforge.net
22 */
23
24 #ifndef WPSTEXTSUBDOCUMENT_H
25 #define WPSTEXTSUBDOCUMENT_H
26
27 #include "libwps_internal.h"
28
29 #include "WPSSubDocument.h"
30
31 class WPSContentListener;
32 class WPSParser;
33
35 class WPSTextSubDocument : public WPSSubDocument
36 {
37 public:
39 WPSTextSubDocument(RVNGInputStreamPtr const &input, WPSParser *parser, int id=0);
41 ~WPSTextSubDocument() override;
42
44 RVNGInputStreamPtr const &getInput()
45 {
46 return m_input;
47 }
49 WPSParser *parser() const
50 {
51 return m_parser;
52 }
54 bool operator==(std::shared_ptr<WPSSubDocument> const &doc) const override;
55
59 virtual void parse(std::shared_ptr<WPSContentListener> &listener, libwps::SubDocumentType subDocumentType) = 0;
60
61 protected:
62 WPSParser *m_parser;
63 private:
64 explicit WPSTextSubDocument(const WPSTextSubDocument &) = delete;
65 WPSTextSubDocument &operator=(const WPSTextSubDocument &) = delete;
66 };
67 #endif
68 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
69
WPSTextSubDocument::~WPSTextSubDocument
~WPSTextSubDocument() override
destructor
Definition: WPSTextSubDocument.cpp:33
WPSTextSubDocument::m_parser
WPSParser * m_parser
Definition: WPSTextSubDocument.h:62
WPSSubDocument::m_input
RVNGInputStreamPtr m_input
Definition: WPSSubDocument.h:65
WPSSubDocument.h
WPSTextSubDocument::operator=
WPSTextSubDocument & operator=(const WPSTextSubDocument &)=delete
WPSContentListener
Definition: WPSContentListener.h:44
WPSParser
Definition: WPSParser.h:35
WPSSubDocument
virtual class to define a sub document
Definition: WPSSubDocument.h:33
WPSTextSubDocument::getInput
RVNGInputStreamPtr const & getInput()
returns the input
Definition: WPSTextSubDocument.h:44
WPSTextSubDocument::parser
WPSParser * parser() const
returns the parser
Definition: WPSTextSubDocument.h:49
libwps_internal.h
libwps::SubDocumentType
SubDocumentType
Definition: libwps_internal.h:248
WPSTextSubDocument::parse
virtual void parse(std::shared_ptr< WPSContentListener > &listener, libwps::SubDocumentType subDocumentType)=0
virtual parse function
WPSTextSubDocument::operator==
bool operator==(std::shared_ptr< WPSSubDocument > const &doc) const override
an operator =
Definition: WPSTextSubDocument.cpp:37
RVNGInputStreamPtr
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
WPSTextSubDocument
Basic class used to store a sub document.
Definition: WPSTextSubDocument.h:35
WPSTextSubDocument::WPSTextSubDocument
WPSTextSubDocument(RVNGInputStreamPtr const &input, WPSParser *parser, int id=0)
constructor
Definition: WPSTextSubDocument.cpp:27