QXPCollector.h Source File documentation

QXPCollector.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 QXPCOLLECTOR_H_INCLUDED
11 #define QXPCOLLECTOR_H_INCLUDED
12
13 #include "libqxp_utils.h"
14
15 namespace libqxp
16 {
17
18 struct Box;
19 struct Group;
20 struct Line;
21 struct Page;
22 struct QXPDocumentProperties;
23 struct Text;
24 struct TextBox;
25 struct TextPath;
26
27 class QXPCollector
28 {
29 // disable copying
30 QXPCollector(const QXPCollector &other) = delete;
31 QXPCollector &operator=(const QXPCollector &other) = delete;
32
33 public:
34 QXPCollector() = default;
35 virtual ~QXPCollector() = default;
36
37 virtual void startDocument() { }
38 virtual void endDocument() { }
39
40 virtual void startPage(const Page &) { }
41 virtual void endPage() { }
42
43 virtual void collectDocumentProperties(const QXPDocumentProperties &) { }
44
45 virtual void collectLine(const std::shared_ptr<Line> &) { }
46 virtual void collectBox(const std::shared_ptr<Box> &) { }
47 virtual void collectTextBox(const std::shared_ptr<TextBox> &) { }
48 virtual void collectTextPath(const std::shared_ptr<TextPath> &) { }
49 virtual void collectGroup(const std::shared_ptr<Group> &) { }
50
51 virtual void collectText(const std::shared_ptr<Text> &, const unsigned) { }
52 };
53
54 class QXPDummyCollector : public QXPCollector
55 {
56 public:
57 QXPDummyCollector() = default;
58 };
59
60 }
61
62 #endif // QXPCOLLECTOR_H_INCLUDED
63
64 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libqxp::QXPCollector::operator=
QXPCollector & operator=(const QXPCollector &other)=delete
libqxp::Page
Definition: QXPTypes.h:546
libqxp::QXPCollector::QXPCollector
QXPCollector(const QXPCollector &other)=delete
libqxp::QXPCollector::endDocument
virtual void endDocument()
Definition: QXPCollector.h:38
libqxp::QXPCollector::collectBox
virtual void collectBox(const std::shared_ptr< Box > &)
Definition: QXPCollector.h:46
libqxp
Definition: libqxp_utils.cpp:25
libqxp::QXPCollector::collectTextBox
virtual void collectTextBox(const std::shared_ptr< TextBox > &)
Definition: QXPCollector.h:47
libqxp::QXPDummyCollector::QXPDummyCollector
QXPDummyCollector()=default
libqxp::QXPCollector::startPage
virtual void startPage(const Page &)
Definition: QXPCollector.h:40
libqxp::QXPCollector::~QXPCollector
virtual ~QXPCollector()=default
libqxp::QXPCollector
Definition: QXPCollector.h:28
libqxp_utils.h
libqxp::QXPDummyCollector
Definition: QXPCollector.h:55
libqxp::QXPCollector::QXPCollector
QXPCollector()=default
libqxp::QXPDocumentProperties
Definition: QXPTypes.h:561
libqxp::QXPCollector::collectLine
virtual void collectLine(const std::shared_ptr< Line > &)
Definition: QXPCollector.h:45
libqxp::QXPCollector::collectText
virtual void collectText(const std::shared_ptr< Text > &, const unsigned)
Definition: QXPCollector.h:51
libqxp::QXPCollector::collectTextPath
virtual void collectTextPath(const std::shared_ptr< TextPath > &)
Definition: QXPCollector.h:48
libqxp::QXPCollector::startDocument
virtual void startDocument()
Definition: QXPCollector.h:37
libqxp::QXPCollector::endPage
virtual void endPage()
Definition: QXPCollector.h:41
libqxp::QXPCollector::collectDocumentProperties
virtual void collectDocumentProperties(const QXPDocumentProperties &)
Definition: QXPCollector.h:43
libqxp::QXPCollector::collectGroup
virtual void collectGroup(const std::shared_ptr< Group > &)
Definition: QXPCollector.h:49