PAGCollector.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 libetonyek 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 PAGCOLLECTOR_H_INCLUDED
11 #define PAGCOLLECTOR_H_INCLUDED
12 
13 #include "IWORKCollector.h"
14 
15 namespace libetonyek
16 {
17 
18 class IWORKDocumentInterface;
19 
21 {
22  struct Section
23  {
24  Section();
25 
26  void clear();
27 
28  boost::optional<double> m_width;
29  boost::optional<double> m_height;
30  boost::optional<double> m_horizontalMargin;
31  boost::optional<double> m_verticalMargin;
32  };
33 
34 public:
36 
37  // collector functions
38 
39  void collectTextBody();
40  void collectAttachment(const IWORKZoneID_t &id);
41 
42  // helper functions
43  void startDocument();
44  void endDocument();
45 
46  void openSection(double width, double height, double horizontalMargin, double verticalMargin);
47  void closeSection();
48 
49 private:
51 };
52 
53 } // namespace libetonyek
54 
55 #endif // PAGCOLLECTOR_H_INCLUDED
56 
57 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: IWORKToken.h:236
Definition: PAGCollector.h:20
void collectAttachment(const IWORKZoneID_t &id)
Definition: PAGCollector.cpp:63
boost::optional< double > m_verticalMargin
Definition: PAGCollector.h:31
void collectTextBody()
Definition: PAGCollector.cpp:45
boost::optional< double > m_width
Definition: PAGCollector.h:28
Definition: IWORKDocumentInterface.h:18
void closeSection()
Definition: PAGCollector.cpp:87
boost::optional< double > m_height
Definition: PAGCollector.h:29
void openSection(double width, double height, double horizontalMargin, double verticalMargin)
Definition: PAGCollector.cpp:79
void startDocument()
Definition: PAGCollector.cpp:69
Section m_currentSection
Definition: PAGCollector.h:50
void clear()
Definition: PAGCollector.cpp:31
Definition: IWORKCollector.h:39
void endDocument()
Definition: PAGCollector.cpp:74
Definition: IWORKToken.h:215
Section()
Definition: PAGCollector.cpp:23
unsigned IWORKZoneID_t
Definition: IWORKTypes_fwd.h:22
Definition: NUM1Token.h:34
PAGCollector(IWORKDocumentInterface *document)
Definition: PAGCollector.cpp:39
Definition: PAGCollector.h:22
boost::optional< double > m_horizontalMargin
Definition: PAGCollector.h:30

Generated for libetonyek by doxygen 1.8.5