00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 00002 /* 00003 * This file is part of the libqxp project. 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 */ 00009 00010 #ifndef QXPCOLLECTOR_H_INCLUDED 00011 #define QXPCOLLECTOR_H_INCLUDED 00012 00013 #include "libqxp_utils.h" 00014 00015 namespace libqxp 00016 { 00017 00018 struct Box; 00019 struct Group; 00020 struct Line; 00021 struct Page; 00022 struct QXPDocumentProperties; 00023 struct Text; 00024 struct TextBox; 00025 struct TextPath; 00026 00027 class QXPCollector 00028 { 00029 // disable copying 00030 QXPCollector(const QXPCollector &other) = delete; 00031 QXPCollector &operator=(const QXPCollector &other) = delete; 00032 00033 public: 00034 QXPCollector() = default; 00035 virtual ~QXPCollector() = default; 00036 00037 virtual void startDocument() { } 00038 virtual void endDocument() { } 00039 00040 virtual void startPage(const Page &) { } 00041 virtual void endPage() { } 00042 00043 virtual void collectDocumentProperties(const QXPDocumentProperties &) { } 00044 00045 virtual void collectLine(const std::shared_ptr<Line> &) { } 00046 virtual void collectBox(const std::shared_ptr<Box> &) { } 00047 virtual void collectTextBox(const std::shared_ptr<TextBox> &) { } 00048 virtual void collectTextPath(const std::shared_ptr<TextPath> &) { } 00049 virtual void collectGroup(const std::shared_ptr<Group> &) { } 00050 00051 virtual void collectText(const std::shared_ptr<Text> &, const unsigned) { } 00052 }; 00053 00054 class QXPDummyCollector : public QXPCollector 00055 { 00056 public: 00057 QXPDummyCollector() = default; 00058 }; 00059 00060 } 00061 00062 #endif // QXPCOLLECTOR_H_INCLUDED 00063 00064 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */