- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

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
29 class KEYCollector
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<KEYSize> &size,
83 boost::optional<KEYPosition> &position, 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 RVNGInputStreamPtr_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: */
libetonyek::KEY2Token::group
Definition: KEY2Token.h:220
libetonyek::KEYCollector::endThemes
virtual void endThemes()=0
libetonyek::KEYCollector::collectGeometry
virtual void collectGeometry(boost::optional< ID_t > &id, boost::optional< KEYSize > &naturalSize, boost::optional< KEYSize > &size, 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
libetonyek::KEY2Token::shearXAngle
Definition: KEY2Token.h:1077
libetonyek::KEYCollector::startThemes
virtual void startThemes()=0
libetonyek::KEYCollector::collectCoveredTableCell
virtual void collectCoveredTableCell(unsigned row, unsigned column)=0
libetonyek::KEYCollector::collectCharacterStyle
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
libetonyek::KEYCollector::collectTabularStyle
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
libetonyek::KEYCollector::~KEYCollector
virtual ~KEYCollector()=0
Definition: KEYCollector.cpp:15
libetonyek::KEYCollector::startText
virtual void startText(bool object)=0
Start of a block that can contain text.
libetonyek::KEY1Token::content
Definition: KEY1Token.h:39
KEYTypes_fwd.h
libetonyek::KEYCollector::endPage
virtual void endPage()=0
libetonyek::KEY1Token::title
Definition: KEY1Token.h:85
libetonyek::KEYCollector::collectFilteredImage
virtual void collectFilteredImage(const boost::optional< ID_t > &id, bool ref)=0
libetonyek::KEYCollector::collectStylesheet
virtual void collectStylesheet(const boost::optional< ID_t > &id, const boost::optional< ID_t > &parent)=0
libetonyek::KEYCollector::collectData
virtual void collectData(const boost::optional< ID_t > &id, const RVNGInputStreamPtr_t &stream, const boost::optional< std::string > &displayName, const boost::optional< unsigned > &type, bool ref)=0
libetonyek::KEYCollector::collectTab
virtual void collectTab()=0
libetonyek::KEY2Token::position
Definition: KEY2Token.h:366
libetonyek::KEYCollector::collectListStyle
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
libetonyek::KEYCollector::collectBezier
virtual void collectBezier(const boost::optional< ID_t > &id, const KEYPathPtr_t &path, bool ref)=0
libetonyek::KEYCollector::collectImage
virtual void collectImage(const boost::optional< ID_t > &id, const KEYImagePtr_t &image)=0
libetonyek::KEYCollector::collectParagraphStyle
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
libetonyek::KEY2Token::verticalFlip
Definition: KEY2Token.h:1113
libetonyek::KEY2Token::sizesLocked
Definition: KEY2Token.h:1079
libetonyek::KEYCollector::collectCellStyle
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
libetonyek::KEYCollector::collectMedia
virtual void collectMedia(const boost::optional< ID_t > &id)=0
libetonyek::KEY2Token::text
Definition: KEY2Token.h:854
libetonyek::KEYCollector::collectRoundedRectanglePath
virtual void collectRoundedRectanglePath(const boost::optional< ID_t > &id, const KEYSize &size, double radius)=0
libetonyek::KEYCollector::endLevel
virtual void endLevel()=0
libetonyek::KEYCollector::startParagraph
virtual void startParagraph(const boost::optional< ID_t > &style)=0
libetonyek::KEY2Token::column
Definition: KEY2Token.h:140
libetonyek::KEYPathPtr_t
boost::shared_ptr< KEYPath > KEYPathPtr_t
Definition: KEYPath_fwd.h:17
libetonyek::KEY2Token::horizontalFlip
Definition: KEY2Token.h:992
libetonyek::KEYCollector::collectArrowPath
virtual void collectArrowPath(const boost::optional< ID_t > &id, const KEYSize &size, double headWidth, double stemRelYPos, bool doubleSided)=0
KEYTable.h
libetonyek::KEY2Token::shearYAngle
Definition: KEY2Token.h:1078
libetonyek::KEY2Token::style
Definition: KEY2Token.h:796
libetonyek::KEYCollector::collectConnectionStyle
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
libetonyek::KEYCollector::collectUnfiltered
virtual void collectUnfiltered(const boost::optional< ID_t > &id, const boost::optional< KEYSize > &size, bool ref)=0
libetonyek::KEY2Token::aspectRatioLocked
Definition: KEY2Token.h:910
libetonyek::KEYCollector::collectTableCell
virtual void collectTableCell(unsigned row, unsigned column, const boost::optional< std::string > &content, unsigned rowSpan, unsigned columnSpan)=0
libetonyek::KEYCollector::collectGraphicStyle
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
libetonyek::KEYCollector::collectLeveled
virtual void collectLeveled(const boost::optional< ID_t > &id, const boost::optional< KEYSize > &size)=0
libetonyek::KEY1Token::line
Definition: KEY1Token.h:51
libetonyek::KEYTable::RowSizes_t
std::deque< double > RowSizes_t
Definition: KEYTable.h:37
libetonyek::KEYCollector::collectCalloutPath
virtual void collectCalloutPath(const boost::optional< ID_t > &id, const KEYSize &size, double radius, double tailSize, double tailX, double tailY, bool quoteBubble)=0
libetonyek::KEYCollector::collectFiltered
virtual void collectFiltered(const boost::optional< ID_t > &id, const boost::optional< KEYSize > &size)=0
libetonyek::KEYCollector::collectVectorStyle
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
libetonyek::KEYCollector::collectStarPath
virtual void collectStarPath(const boost::optional< ID_t > &id, const KEYSize &size, unsigned points, double innerRadius)=0
libetonyek::KEYCollector::collectNote
virtual void collectNote()=0
libetonyek::KEYSize
Definition: KEYTypes.h:27
libetonyek::KEYCollector::collectLineBreak
virtual void collectLineBreak()=0
libetonyek::KEYCollector::collectPlaceholderStyle
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
libetonyek::KEYCollector::collectBezierPath
virtual void collectBezierPath(const boost::optional< ID_t > &id)=0
libetonyek::KEYCollector::collectTextPlaceholder
virtual void collectTextPlaceholder(const boost::optional< ID_t > &id, bool title, bool ref)=0
libetonyek::KEY1Token::image
Definition: KEY1Token.h:49
libetonyek::KEYCollector::endParagraph
virtual void endParagraph()=0
libetonyek::KEY1Token::angle
Definition: KEY1Token.h:92
libetonyek::KEYCollector::collectStickyNote
virtual void collectStickyNote()=0
libetonyek::KEYImagePtr_t
boost::shared_ptr< KEYImage > KEYImagePtr_t
Definition: KEYTypes_fwd.h:43
libetonyek::KEYCollector::collectMovieMedia
virtual void collectMovieMedia(const boost::optional< ID_t > &id)=0
libetonyek::KEYCollector::startGroup
virtual void startGroup()=0
libetonyek::KEYCollector::collectShape
virtual void collectShape(const boost::optional< ID_t > &id)=0
libetonyek::KEYCollector::startPage
virtual void startPage()=0
libetonyek::KEY1Token::size
Definition: KEY1Token.h:72
libetonyek::KEYLinePtr_t
boost::shared_ptr< KEYLine > KEYLinePtr_t
Definition: KEYTypes_fwd.h:29
libetonyek::KEYCollector::startSlides
virtual void startSlides()=0
libetonyek::KEYCollector::collectPolygonPath
virtual void collectPolygonPath(const boost::optional< ID_t > &id, const KEYSize &size, unsigned edges)=0
libetonyek::KEYCollector::collectTable
virtual void collectTable()=0
libetonyek::KEYCollector::collectLayer
virtual void collectLayer(const boost::optional< ID_t > &id, bool ref)=0
libetonyek::KEYCollector::endGroup
virtual void endGroup()=0
libetonyek::KEY2Token::naturalSize
Definition: KEY2Token.h:325
libetonyek::KEYCollector::endLayer
virtual void endLayer()=0
libetonyek::KEYCollector::collectPresentation
virtual void collectPresentation(const boost::optional< KEYSize > &size)=0
type
EtonyekDocument::Type type
Definition: EtonyekDocument.cpp:62
libetonyek::KEYCollector::collectConnectionPath
virtual void collectConnectionPath(const boost::optional< ID_t > &id, const KEYSize &size, double middleX, double middleY)=0
libetonyek::RVNGInputStreamPtr_t
boost::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libetonyek_utils.h:88
libetonyek::KEY1Token::radius
Definition: KEY1Token.h:149
libetonyek::KEYCollector
Definition: KEYCollector.h:29
libetonyek::KEYCollector::endText
virtual void endText()=0
End of a text block.
libetonyek::KEY2Token::tailSize
Definition: KEY2Token.h:1103
libetonyek::KEYTable::ColumnSizes_t
std::deque< double > ColumnSizes_t
Definition: KEYTable.h:36
libetonyek::KEYCollector::startLayer
virtual void startLayer()=0
libetonyek::KEYCollector::collectGroup
virtual void collectGroup(const boost::optional< ID_t > &id, const KEYGroupPtr_t &group)=0
libetonyek::KEYCollector::collectText
virtual void collectText(const boost::optional< ID_t > &style, const std::string &text)=0
libetonyek::KEYCollector::collectLayoutStyle
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
libetonyek::KEYCollector::startLevel
virtual void startLevel()=0
libetonyek_utils.h
libetonyek::KEY2Token::row
Definition: KEY2Token.h:1069
KEYPath_fwd.h
libetonyek::KEYCollector::collectSlideStyle
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
libetonyek::KEYCollector::collectPage
virtual void collectPage(const boost::optional< ID_t > &id)=0
libetonyek::KEYCollector::collectTableRow
virtual void collectTableRow()=0
libetonyek::KEY2Token::ident
Definition: KEY2Token.h:997
libetonyek::KEYCollector::collectLine
virtual void collectLine(const boost::optional< ID_t > &id, const KEYLinePtr_t &line)=0
libetonyek::KEY1Token::string
Definition: KEY1Token.h:75
libetonyek::KEYCollector::collectTableSizes
virtual void collectTableSizes(const KEYTable::RowSizes_t &rowSizes, const KEYTable::ColumnSizes_t &columnSizes)=0
libetonyek::KEY2Token::path
Definition: KEY2Token.h:357
libetonyek::KEYGroupPtr_t
boost::shared_ptr< KEYGroup > KEYGroupPtr_t
Definition: KEYTypes_fwd.h:56
libetonyek::KEYCollector::endSlides
virtual void endSlides()=0