KEYCollector.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 KEYCOLLECTOR_H_INCLUDED
11 #define KEYCOLLECTOR_H_INCLUDED
12 
13 #include <string>
14 
15 #include <boost/optional.hpp>
16 
17 #include "libetonyek_utils.h"
18 #include "KEYPath_fwd.h"
19 #include "KEYTable.h"
20 #include "KEYTypes_fwd.h"
21 
22 namespace libetonyek
23 {
24 
25 class KEYDefaults;
26 class KEYPropertyMap;
27 struct KEYSize;
28 
30 {
31 public:
32  virtual ~KEYCollector() = 0;
33 
34  // collector functions
35 
36  virtual void collectCellStyle(const boost::optional<ID_t> &id,
37  const boost::optional<KEYPropertyMap> &props,
38  const boost::optional<std::string> &ident, const boost::optional<std::string> &parentIdent,
39  bool ref, bool anonymous) = 0;
40  virtual void collectCharacterStyle(const boost::optional<ID_t> &id,
41  const boost::optional<KEYPropertyMap> &props,
42  const boost::optional<std::string> &ident, const boost::optional<std::string> &parentIdent,
43  bool ref, bool anonymous) = 0;
44  virtual void collectConnectionStyle(const boost::optional<ID_t> &id,
45  const boost::optional<KEYPropertyMap> &props,
46  const boost::optional<std::string> &ident, const boost::optional<std::string> &parentIdent,
47  bool ref, bool anonymous) = 0;
48  virtual void collectGraphicStyle(const boost::optional<ID_t> &id,
49  const boost::optional<KEYPropertyMap> &props,
50  const boost::optional<std::string> &ident, const boost::optional<std::string> &parentIdent,
51  bool ref, bool anonymous) = 0;
52  virtual void collectLayoutStyle(const boost::optional<ID_t> &id,
53  const boost::optional<KEYPropertyMap> &props,
54  const boost::optional<std::string> &ident, const boost::optional<std::string> &parentIdent,
55  bool ref, bool anonymous) = 0;
56  virtual void collectListStyle(const boost::optional<ID_t> &id,
57  const boost::optional<KEYPropertyMap> &props,
58  const boost::optional<std::string> &ident, const boost::optional<std::string> &parentIdent,
59  bool ref, bool anonymous) = 0;
60  virtual void collectParagraphStyle(const boost::optional<ID_t> &id,
61  const boost::optional<KEYPropertyMap> &props,
62  const boost::optional<std::string> &ident, const boost::optional<std::string> &parentIdent,
63  bool ref, bool anonymous) = 0;
64  virtual void collectPlaceholderStyle(const boost::optional<ID_t> &id,
65  const boost::optional<KEYPropertyMap> &props,
66  const boost::optional<std::string> &ident, const boost::optional<std::string> &parentIdent,
67  bool ref, bool anonymous) = 0;
68  virtual void collectSlideStyle(const boost::optional<ID_t> &id,
69  const boost::optional<KEYPropertyMap> &props,
70  const boost::optional<std::string> &ident, const boost::optional<std::string> &parentIdent,
71  bool ref, bool anonymous) = 0;
72  virtual void collectTabularStyle(const boost::optional<ID_t> &id,
73  const boost::optional<KEYPropertyMap> &props,
74  const boost::optional<std::string> &ident, const boost::optional<std::string> &parentIdent,
75  bool ref, bool anonymous) = 0;
76  virtual void collectVectorStyle(const boost::optional<ID_t> &id,
77  const boost::optional<KEYPropertyMap> &props,
78  const boost::optional<std::string> &ident, const boost::optional<std::string> &parentIdent,
79  bool ref, bool anonymous) = 0;
80 
81  virtual void collectGeometry(boost::optional<ID_t> &id,
82  boost::optional<KEYSize> &naturalSize, boost::optional<KEYPosition> &position,
83  boost::optional<double> &angle,
84  boost::optional<double> &shearXAngle, boost::optional<double> &shearYAngle,
85  boost::optional<bool> &horizontalFlip, boost::optional<bool> &verticalFlip,
86  boost::optional<bool> &aspectRatioLocked, boost::optional<bool> &sizesLocked) = 0;
87 
88  virtual void collectBezier(const boost::optional<ID_t> &id, const KEYPathPtr_t &path, bool ref) = 0;
89  virtual void collectGroup(const boost::optional<ID_t> &id, const KEYGroupPtr_t &group) = 0;
90  virtual void collectImage(const boost::optional<ID_t> &id, const KEYImagePtr_t &image) = 0;
91  virtual void collectLine(const boost::optional<ID_t> &id, const KEYLinePtr_t &line) = 0;
92  virtual void collectShape(const boost::optional<ID_t> &id) = 0;
93 
94  virtual void collectBezierPath(const boost::optional<ID_t> &id) = 0;
95  virtual void collectPolygonPath(const boost::optional<ID_t> &id, const KEYSize &size, unsigned edges) = 0;
96  virtual void collectRoundedRectanglePath(const boost::optional<ID_t> &id, const KEYSize &size, double radius) = 0;
97  virtual void collectArrowPath(const boost::optional<ID_t> &id, const KEYSize &size, double headWidth, double stemRelYPos, bool doubleSided) = 0;
98  virtual void collectStarPath(const boost::optional<ID_t> &id, const KEYSize &size, unsigned points, double innerRadius) = 0;
99  virtual void collectConnectionPath(const boost::optional<ID_t> &id, const KEYSize &size, double middleX, double middleY) = 0;
100  virtual void collectCalloutPath(const boost::optional<ID_t> &id, const KEYSize &size, double radius, double tailSize, double tailX, double tailY, bool quoteBubble) = 0;
101 
102  virtual void collectData(const boost::optional<ID_t> &id, const WPXInputStreamPtr_t &stream, const boost::optional<std::string> &displayName, const boost::optional<unsigned> &type, bool ref) = 0;
103  virtual void collectUnfiltered(const boost::optional<ID_t> &id, const boost::optional<KEYSize> &size, bool ref) = 0;
104  virtual void collectFiltered(const boost::optional<ID_t> &id, const boost::optional<KEYSize> &size) = 0;
105  virtual void collectLeveled(const boost::optional<ID_t> &id, const boost::optional<KEYSize> &size) = 0;
106  virtual void collectFilteredImage(const boost::optional<ID_t> &id, bool ref) = 0;
107  virtual void collectMovieMedia(const boost::optional<ID_t> &id) = 0;
108  virtual void collectMedia(const boost::optional<ID_t> &id) = 0;
109 
110  virtual void collectPresentation(const boost::optional<KEYSize> &size) = 0;
111 
112  virtual void collectLayer(const boost::optional<ID_t> &id, bool ref) = 0;
113  virtual void collectPage(const boost::optional<ID_t> &id) = 0;
114  virtual void collectStylesheet(const boost::optional<ID_t> &id, const boost::optional<ID_t> &parent) = 0;
115 
116  virtual void collectText(const boost::optional<ID_t> &style, const std::string &text) = 0;
117  virtual void collectTab() = 0;
118  virtual void collectLineBreak() = 0;
119 
120  virtual void collectTextPlaceholder(const boost::optional<ID_t> &id, bool title, bool ref) = 0;
121 
122  virtual void collectTableSizes(const KEYTable::RowSizes_t &rowSizes, const KEYTable::ColumnSizes_t &columnSizes) = 0;
123  virtual void collectTableCell(unsigned row, unsigned column, const boost::optional<std::string> &content, unsigned rowSpan, unsigned columnSpan) = 0;
124  virtual void collectCoveredTableCell(unsigned row, unsigned column) = 0;
125  virtual void collectTableRow() = 0;
126  virtual void collectTable() = 0;
127 
128  virtual void collectNote() = 0;
129 
130  virtual void collectStickyNote() = 0;
131 
132  virtual void startPage() = 0;
133  virtual void endPage() = 0;
134  virtual void startLayer() = 0;
135  virtual void endLayer() = 0;
136  virtual void startGroup() = 0;
137  virtual void endGroup() = 0;
138 
139  virtual void startParagraph(const boost::optional<ID_t> &style) = 0;
140  virtual void endParagraph() = 0;
141 
150  virtual void startText(bool object) = 0;
151 
154  virtual void endText() = 0;
155 
156  // helper functions
157 
158  virtual void startSlides() = 0;
159  virtual void endSlides() = 0;
160  virtual void startThemes() = 0;
161  virtual void endThemes() = 0;
162 
163  virtual void startLevel() = 0;
164  virtual void endLevel() = 0;
165 };
166 
167 } // namespace libetonyek
168 
169 #endif // KEYCOLLECTOR_H_INCLUDED
170 
171 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: KEY2Token.h:220
virtual void endThemes()=0
Definition: KEY2Token.h:1077
virtual void startThemes()=0
virtual void collectCoveredTableCell(unsigned row, unsigned column)=0
virtual void collectCharacterStyle(const boost::optional< ID_t > &id, const boost::optional< KEYPropertyMap > &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent, bool ref, bool anonymous)=0
virtual void collectTabularStyle(const boost::optional< ID_t > &id, const boost::optional< KEYPropertyMap > &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent, bool ref, bool anonymous)=0
virtual ~KEYCollector()=0
Definition: KEYCollector.cpp:15
virtual void startText(bool object)=0
Start of a block that can contain text.
Definition: KEY1Token.h:39
virtual void endPage()=0
Definition: KEY1Token.h:85
virtual void collectFilteredImage(const boost::optional< ID_t > &id, bool ref)=0
virtual void collectStylesheet(const boost::optional< ID_t > &id, const boost::optional< ID_t > &parent)=0
virtual void collectTab()=0
Definition: KEY2Token.h:366
virtual void collectListStyle(const boost::optional< ID_t > &id, const boost::optional< KEYPropertyMap > &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent, bool ref, bool anonymous)=0
virtual void collectBezier(const boost::optional< ID_t > &id, const KEYPathPtr_t &path, bool ref)=0
virtual void collectImage(const boost::optional< ID_t > &id, const KEYImagePtr_t &image)=0
virtual void collectParagraphStyle(const boost::optional< ID_t > &id, const boost::optional< KEYPropertyMap > &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent, bool ref, bool anonymous)=0
Definition: KEY2Token.h:1113
Definition: KEY2Token.h:1079
virtual void collectCellStyle(const boost::optional< ID_t > &id, const boost::optional< KEYPropertyMap > &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent, bool ref, bool anonymous)=0
virtual void collectMedia(const boost::optional< ID_t > &id)=0
Definition: KEY2Token.h:854
virtual void collectRoundedRectanglePath(const boost::optional< ID_t > &id, const KEYSize &size, double radius)=0
virtual void endLevel()=0
virtual void startParagraph(const boost::optional< ID_t > &style)=0
Definition: KEY2Token.h:140
boost::shared_ptr< KEYPath > KEYPathPtr_t
Definition: KEYPath_fwd.h:17
Definition: KEY2Token.h:992
virtual void collectArrowPath(const boost::optional< ID_t > &id, const KEYSize &size, double headWidth, double stemRelYPos, bool doubleSided)=0
Definition: KEY2Token.h:1078
Definition: KEY2Token.h:796
virtual void collectConnectionStyle(const boost::optional< ID_t > &id, const boost::optional< KEYPropertyMap > &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent, bool ref, bool anonymous)=0
virtual void collectUnfiltered(const boost::optional< ID_t > &id, const boost::optional< KEYSize > &size, bool ref)=0
Definition: KEY2Token.h:910
virtual void collectTableCell(unsigned row, unsigned column, const boost::optional< std::string > &content, unsigned rowSpan, unsigned columnSpan)=0
virtual void collectGraphicStyle(const boost::optional< ID_t > &id, const boost::optional< KEYPropertyMap > &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent, bool ref, bool anonymous)=0
virtual void collectData(const boost::optional< ID_t > &id, const WPXInputStreamPtr_t &stream, const boost::optional< std::string > &displayName, const boost::optional< unsigned > &type, bool ref)=0
virtual void collectLeveled(const boost::optional< ID_t > &id, const boost::optional< KEYSize > &size)=0
Definition: KEY1Token.h:51
std::deque< double > RowSizes_t
Definition: KEYTable.h:37
virtual void collectCalloutPath(const boost::optional< ID_t > &id, const KEYSize &size, double radius, double tailSize, double tailX, double tailY, bool quoteBubble)=0
virtual void collectFiltered(const boost::optional< ID_t > &id, const boost::optional< KEYSize > &size)=0
virtual void collectVectorStyle(const boost::optional< ID_t > &id, const boost::optional< KEYPropertyMap > &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent, bool ref, bool anonymous)=0
boost::shared_ptr< WPXInputStream > WPXInputStreamPtr_t
Definition: libetonyek_utils.h:88
virtual void collectStarPath(const boost::optional< ID_t > &id, const KEYSize &size, unsigned points, double innerRadius)=0
virtual void collectNote()=0
Definition: KEYTypes.h:27
virtual void collectLineBreak()=0
virtual void collectPlaceholderStyle(const boost::optional< ID_t > &id, const boost::optional< KEYPropertyMap > &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent, bool ref, bool anonymous)=0
virtual void collectBezierPath(const boost::optional< ID_t > &id)=0
virtual void collectTextPlaceholder(const boost::optional< ID_t > &id, bool title, bool ref)=0
Definition: KEY1Token.h:49
virtual void endParagraph()=0
Definition: KEY1Token.h:92
virtual void collectStickyNote()=0
boost::shared_ptr< KEYImage > KEYImagePtr_t
Definition: KEYTypes_fwd.h:43
virtual void collectMovieMedia(const boost::optional< ID_t > &id)=0
virtual void startGroup()=0
virtual void collectShape(const boost::optional< ID_t > &id)=0
virtual void startPage()=0
Definition: KEY1Token.h:72
boost::shared_ptr< KEYLine > KEYLinePtr_t
Definition: KEYTypes_fwd.h:29
virtual void startSlides()=0
virtual void collectPolygonPath(const boost::optional< ID_t > &id, const KEYSize &size, unsigned edges)=0
virtual void collectTable()=0
virtual void collectLayer(const boost::optional< ID_t > &id, bool ref)=0
virtual void endGroup()=0
Definition: KEY2Token.h:325
virtual void endLayer()=0
virtual void collectPresentation(const boost::optional< KEYSize > &size)=0
virtual void collectConnectionPath(const boost::optional< ID_t > &id, const KEYSize &size, double middleX, double middleY)=0
Definition: KEY1Token.h:149
Definition: KEYCollector.h:29
virtual void endText()=0
End of a text block.
Definition: KEY2Token.h:1103
std::deque< double > ColumnSizes_t
Definition: KEYTable.h:36
virtual void collectGeometry(boost::optional< ID_t > &id, boost::optional< KEYSize > &naturalSize, boost::optional< KEYPosition > &position, boost::optional< double > &angle, boost::optional< double > &shearXAngle, boost::optional< double > &shearYAngle, boost::optional< bool > &horizontalFlip, boost::optional< bool > &verticalFlip, boost::optional< bool > &aspectRatioLocked, boost::optional< bool > &sizesLocked)=0
virtual void startLayer()=0
virtual void collectGroup(const boost::optional< ID_t > &id, const KEYGroupPtr_t &group)=0
virtual void collectText(const boost::optional< ID_t > &style, const std::string &text)=0
virtual void collectLayoutStyle(const boost::optional< ID_t > &id, const boost::optional< KEYPropertyMap > &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent, bool ref, bool anonymous)=0
virtual void startLevel()=0
Definition: KEY1Token.h:167
Definition: KEY2Token.h:1069
virtual void collectSlideStyle(const boost::optional< ID_t > &id, const boost::optional< KEYPropertyMap > &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent, bool ref, bool anonymous)=0
virtual void collectPage(const boost::optional< ID_t > &id)=0
virtual void collectTableRow()=0
Definition: KEY2Token.h:997
virtual void collectLine(const boost::optional< ID_t > &id, const KEYLinePtr_t &line)=0
Definition: KEY1Token.h:75
virtual void collectTableSizes(const KEYTable::RowSizes_t &rowSizes, const KEYTable::ColumnSizes_t &columnSizes)=0
Definition: KEY2Token.h:357
boost::shared_ptr< KEYGroup > KEYGroupPtr_t
Definition: KEYTypes_fwd.h:56
virtual void endSlides()=0

Generated for libetonyek by doxygen 1.8.5