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

- File List
- File Members

KEY2TableParser.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 KEY2TABLEPARSER_H_INCLUDED
11 #define KEY2TABLEPARSER_H_INCLUDED
12
13 #include "KEY2ParserUtils.h"
14 #include "KEYTable.h"
15 #include "KEYXMLReader.h"
16
17 namespace libetonyek
18 {
19
20 class KEYCollector;
21 class KEY2Parser;
22
23 class KEY2TableParser : public KEY2ParserUtils
24 {
25 public:
26 explicit KEY2TableParser(KEY2Parser &parser);
27
28 void parse(const KEYXMLReader &reader);
29
30 private:
31 void parseTabularModel(const KEYXMLReader &reader);
32 void parseGrid(const KEYXMLReader &reader);
33 void parseColumns(const KEYXMLReader &reader);
34 void parseGridColumn(const KEYXMLReader &reader);
35 void parseRows(const KEYXMLReader &reader);
36 void parseGridRow(const KEYXMLReader &reader);
37
38 void parseDatasource(const KEYXMLReader &reader);
39 void parseD(const KEYXMLReader &reader);
40 void parseDu(const KEYXMLReader &reader);
41 void parseF(const KEYXMLReader &reader);
42 void parseG(const KEYXMLReader &reader);
43 void parseN(const KEYXMLReader &reader);
44 void parseS(const KEYXMLReader &reader);
45 void parseT(const KEYXMLReader &reader);
46 void parseCt(const KEYXMLReader &reader);
47 void parseSo(const KEYXMLReader &reader);
48
49 void parseCommonCellAttribute(const KEYXMLReader::AttributeIterator &attr);
50
51 void emitCell(bool covered = false);
52
53 KEYCollector *getCollector();
54
55 private:
56 KEY2Parser &m_parser;
57 KEYTable::ColumnSizes_t m_columnSizes;
58 KEYTable::RowSizes_t m_rowSizes;
59
60 unsigned m_column;
61 unsigned m_row;
62
63 boost::optional<unsigned> m_columnSpan;
64 boost::optional<unsigned> m_rowSpan;
65 boost::optional<unsigned> m_cellMove;
66 boost::optional<std::string> m_content;
67 };
68
69 }
70
71 #endif // KEY2TABLEPARSER_H_INCLUDED
72
73 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::KEY2TableParser::parseGridRow
void parseGridRow(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:164
libetonyek::KEY2TableParser::m_rowSizes
KEYTable::RowSizes_t m_rowSizes
Definition: KEY2TableParser.h:58
libetonyek::KEY2TableParser::parseD
void parseD(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:227
KEY2ParserUtils.h
libetonyek::KEY2TableParser::parseN
void parseN(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:281
libetonyek::KEY2TableParser::parseGridColumn
void parseGridColumn(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:125
libetonyek::KEY2TableParser::m_row
unsigned m_row
Definition: KEY2TableParser.h:61
libetonyek::KEY2TableParser::parseSo
void parseSo(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:388
libetonyek::KEY2TableParser::emitCell
void emitCell(bool covered=false)
Definition: KEY2TableParser.cpp:422
libetonyek::KEY2TableParser::parseCommonCellAttribute
void parseCommonCellAttribute(const KEYXMLReader::AttributeIterator &attr)
Definition: KEY2TableParser.cpp:406
libetonyek::KEY2TableParser::m_columnSpan
boost::optional< unsigned > m_columnSpan
Definition: KEY2TableParser.h:63
libetonyek::KEY2TableParser::parseT
void parseT(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:325
libetonyek::KEY2TableParser::m_rowSpan
boost::optional< unsigned > m_rowSpan
Definition: KEY2TableParser.h:64
libetonyek::KEY2TableParser::getCollector
KEYCollector * getCollector()
Definition: KEY2TableParser.cpp:463
libetonyek::KEY2TableParser::parseF
void parseF(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:253
KEYTable.h
libetonyek::KEY2TableParser::parseDatasource
void parseDatasource(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:185
libetonyek::KEY2TableParser::parseG
void parseG(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:268
libetonyek::KEYTable::RowSizes_t
std::deque< double > RowSizes_t
Definition: KEYTable.h:37
libetonyek::KEY2TableParser::m_content
boost::optional< std::string > m_content
Definition: KEY2TableParser.h:66
libetonyek::KEY2TableParser::m_cellMove
boost::optional< unsigned > m_cellMove
Definition: KEY2TableParser.h:65
libetonyek::KEY2ParserUtils
A "mixin" containing a set of helper functions used in parser classes.
Definition: KEY2ParserUtils.h:28
libetonyek::KEY2TableParser::parseS
void parseS(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:303
libetonyek::KEY2TableParser::parseCt
void parseCt(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:353
libetonyek::KEY2TableParser::parseRows
void parseRows(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:145
libetonyek::KEY2TableParser::parseTabularModel
void parseTabularModel(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:64
libetonyek::KEYXMLReader
Definition: KEYXMLReader.h:20
libetonyek::KEY2TableParser::parseGrid
void parseGrid(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:82
libetonyek::KEY2TableParser::parseDu
void parseDu(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:240
libetonyek::KEYCollector
Definition: KEYCollector.h:29
libetonyek::KEY2TableParser::parseColumns
void parseColumns(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:106
libetonyek::KEYXMLReader::AttributeIterator
Definition: KEYXMLReader.h:57
libetonyek::KEYTable::ColumnSizes_t
std::deque< double > ColumnSizes_t
Definition: KEYTable.h:36
libetonyek::KEY2TableParser
Definition: KEY2TableParser.h:23
libetonyek::KEY2TableParser::parse
void parse(const KEYXMLReader &reader)
Definition: KEY2TableParser.cpp:37
libetonyek::KEY2TableParser::m_columnSizes
KEYTable::ColumnSizes_t m_columnSizes
Definition: KEY2TableParser.h:57
KEYXMLReader.h
libetonyek::KEY2Parser
Definition: KEY2Parser.h:22
libetonyek::KEY2TableParser::m_column
unsigned m_column
Definition: KEY2TableParser.h:60
libetonyek::KEY2TableParser::m_parser
KEY2Parser & m_parser
Definition: KEY2TableParser.h:56
libetonyek::KEY2TableParser::KEY2TableParser
KEY2TableParser(KEY2Parser &parser)
Definition: KEY2TableParser.cpp:24