KEY1TableElement.h Source File documentation

KEY1TableElement.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 KEY1TABLEELEMENT_H_INCLUDED
11 #define KEY1TABLEELEMENT_H_INCLUDED
12
13 #include <string>
14
15 #include <boost/optional.hpp>
16 #include <boost/shared_ptr.hpp>
17
18 #include "KEY1XMLContextBase.h"
19
20 #include "IWORKTypes.h"
21
22 namespace libetonyek
23 {
24 class IWORKText;
25 class KEY1ParserState;
26
27 class KEY1TableElement : public KEY1XMLElementContextBase
28 {
29 public:
30 struct TableData;
31
32 explicit KEY1TableElement(KEY1ParserState &state, boost::optional<IWORKSize> &size);
33
34 protected:
35 void attribute(int name, const char *value) override;
36 void startOfElement() override;
37 IWORKXMLContextPtr_t element(int name) override;
38 void endOfElement() override;
39
40 private:
41 boost::optional<std::string> m_key;
42 boost::optional<IWORKSize> &m_size;
43 boost::shared_ptr<TableData> m_tableData;
44 };
45
46 }
47
48 #endif // KEY1TABLEELEMENT_H_INCLUDED
49
50 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
DECLARE_STRING_CONVERTER
#define DECLARE_STRING_CONVERTER(type)
Definition: KEY1TableElement.cpp:42
m_table
KEY1TableElement::TableData & m_table
Definition: KEY1TableElement.cpp:157
m_horizontal
bool m_horizontal
Definition: KEY1TableElement.cpp:121
libetonyek::IWORKToken::double_
@ double_
Definition: IWORKToken.h:655
libetonyek::KEY1TableElement::m_size
boost::optional< IWORKSize > & m_size
Definition: KEY1TableElement.h:42
m_br
unsigned m_br
Definition: KEY1TableElement.cpp:107
libetonyek::KEY1Token::horizontal
@ horizontal
Definition: KEY1Token.h:223
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKToken::none
@ none
Definition: IWORKToken.h:666
m_position
boost::optional< IWORKPosition > m_position
Definition: KEY1TableElement.cpp:159
libetonyek::IWORKColumnRowSize
Definition: IWORKTypes.h:213
libetonyek::KEY1TableElement
Definition: KEY1TableElement.h:27
libetonyek::KEY1Token::table
@ table
Definition: KEY1Token.h:198
KEY1Token.h
m_isText
bool m_isText
Definition: KEY1TableElement.cpp:219
libetonyek::IWORKCollector::startLevel
void startLevel()
Definition: IWORKCollector.cpp:635
m_tableNameMap
const IWORKTableNameMapPtr_t & m_tableNameMap
Definition: IWORKOutputElements.cpp:334
IWORKTokenizer.h
libetonyek::KEY1Token::tr
@ tr
Definition: KEY1Token.h:206
IWORKProperties.h
libetonyek::KEY1TableElement::startOfElement
void startOfElement() override
Definition: KEY1TableElement.cpp:406
libetonyek::IWORKToken::type
@ type
Definition: IWORKToken.h:486
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
libetonyek::KEY1TableElement::m_key
boost::optional< std::string > m_key
Definition: KEY1TableElement.h:41
libetonyek::KEY1TableElement::TableData::m_elements
std::deque< Element > m_elements
Definition: KEY1TableElement.cpp:129
libetonyek::IWORKToken::ident
@ ident
Definition: IWORKToken.h:559
ETONYEK_DEBUG_MSG
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
KEYCollector.h
libetonyek::IWORKToken::row
@ row
Definition: IWORKToken.h:383
KEY1ContentElement.h
libetonyek::KEY1TableElement::TableData::m_verticalSegments
std::deque< TableSegment > m_verticalSegments
Definition: KEY1TableElement.cpp:131
libetonyek::IWORKTextPtr_t
std::shared_ptr< IWORKText > IWORKTextPtr_t
Definition: IWORKText_fwd.h:18
IWORKTable.h
libetonyek::IWORKXMLParserState::m_currentTable
std::shared_ptr< IWORKTable > m_currentTable
Definition: IWORKXMLParserState.h:54
libetonyek::IWORKCollector::endLevel
void endLevel()
Definition: IWORKCollector.cpp:656
libetonyek::KEY1TableElement::element
IWORKXMLContextPtr_t element(int name) override
Definition: KEY1TableElement.cpp:417
libetonyek::try_int_cast
boost::optional< int > try_int_cast(const char *value)
Definition: libetonyek_xml.cpp:99
m_content
IWORKTextPtr_t m_content
Definition: KEY1TableElement.cpp:108
m_size
optional< IWORKSize > m_size
Definition: IWORKPathElement.cpp:48
libetonyek::IWORKXMLContextBase< Base, KEY1ParserState, KEYCollector >::isCollector
bool isCollector() const
Definition: IWORKXMLContextBase.h:59
KEY1ParserState.h
libetonyek::IWORKToken::d
@ d
Definition: IWORKToken.h:173
libetonyek::IWORKToken::size
@ size
Definition: IWORKToken.h:395
libetonyek::IWORKCollector::createTable
virtual std::shared_ptr< IWORKTable > createTable(const IWORKTableNameMapPtr_t &tableNameMap, const IWORKLanguageManager &langManager) const
Definition: IWORKCollector.cpp:625
KEY1TableElement.h
libetonyek::IWORKToken::line
@ line
Definition: IWORKToken.h:298
libetonyek::KEY1Token::node
@ node
Definition: KEY1Token.h:70
libetonyek::IWORKToken::content
@ content
Definition: IWORKToken.h:163
libetonyek::KEY1Token::size
@ size
Definition: KEY1Token.h:91
libetonyek::IWORKXMLContextBase< Base, KEY1ParserState, KEYCollector >::getCollector
KEYCollector & getCollector() const
Definition: IWORKXMLContextBase.h:49
libetonyek::KEY1XMLContextBase
Definition: KEY1XMLContextBase.h:22
libetonyek::KEY1Token::vertical
@ vertical
Definition: KEY1Token.h:239
libetonyek::KEY1TableElement::TableData::m_horizontalSegments
std::deque< TableSegment > m_horizontalSegments
Definition: KEY1TableElement.cpp:130
libetonyek::IWORKToken::val
@ val
Definition: IWORKToken.h:623
libetonyek::KEY1TableElement::KEY1TableElement
KEY1TableElement(KEY1ParserState &state, boost::optional< IWORKSize > &size)
Definition: KEY1TableElement.cpp:381
libetonyek::KEY1Token::version
@ version
Definition: KEY1Token.h:213
m_startPoint
unsigned m_startPoint
Definition: KEY1TableElement.cpp:119
libetonyek::KEY1Token::bl
@ bl
Definition: KEY1Token.h:115
KEY1XMLContextBase.h
libetonyek::IWORKToken::element
@ element
Definition: IWORKToken.h:188
libetonyek::IWORKToken::br
@ br
Definition: IWORKToken.h:119
libetonyek::KEY1ParserState
Definition: KEY1ParserState.h:44
libetonyek::KEY1XMLElementContextBase
KEY1XMLContextBase< IWORKXMLContextElement > KEY1XMLElementContextBase
Definition: KEY1XMLContextBase.h:39
libetonyek::KEY1TableElement::TableData::m_idToPositionMap
std::unordered_map< unsigned, IWORKPosition > m_idToPositionMap
Definition: KEY1TableElement.cpp:133
libetonyek::KEY1Token::key
@ key
Definition: KEY1Token.h:153
libetonyek::IWORKToken::string
@ string
Definition: IWORKToken.h:411
IWORKText.h
libetonyek::IWORKToken::pos
@ pos
Definition: IWORKToken.h:592
m_tr
unsigned m_tr
Definition: KEY1TableElement.cpp:107
libetonyek::IWORKToken::column
@ column
Definition: IWORKToken.h:152
libetonyek::KEY1TableElement::endOfElement
void endOfElement() override
Definition: KEY1TableElement.cpp:433
IWORKTypes.h
libetonyek::KEY1Token::segment
@ segment
Definition: KEY1Token.h:85
m_segment
TableSegment m_segment
Definition: KEY1TableElement.cpp:317
m_elements
deque< IWORKShadow > & m_elements
Definition: IWORKPropertyMapElement.cpp:659
libetonyek::IWORKToken::start
@ start
Definition: IWORKToken.h:405
KEY1StringConverter.h
libetonyek::IWORKToken::first
@ first
Definition: IWORKToken.h:524
m_index
boost::optional< unsigned > m_index
Definition: KEY1TableElement.cpp:158
libetonyek::KEY1TableElement::attribute
void attribute(int name, const char *value) override
Definition: KEY1TableElement.cpp:389
libetonyek::KEY1Token::dict
@ dict
Definition: KEY1Token.h:51
libetonyek::KEY1Token::element
@ element
Definition: KEY1Token.h:54
libetonyek::IWORKToken::end
@ end
Definition: IWORKToken.h:189
libetonyek::int_cast
int int_cast(const char *value)
Definition: libetonyek_xml.cpp:94
libetonyek::KEY1TableElement::TableData
Definition: KEY1TableElement.cpp:125
libetonyek::IWORKToken::direction
@ direction
Definition: IWORKToken.h:518
libetonyek::KEY1Token::NS_URI_KEY
@ NS_URI_KEY
Definition: KEY1Token.h:248
libetonyek::KEY1TableElement::m_tableData
boost::shared_ptr< TableData > m_tableData
Definition: KEY1TableElement.h:43
m_bl
unsigned m_bl
Definition: KEY1TableElement.cpp:107
libetonyek::get
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition: IWAField.h:190
m_key
boost::optional< std::string > m_key
Definition: KEY1Parser.cpp:1245
libetonyek::IWORKToken::getTokenizer
const IWORKTokenizer & getTokenizer()
Definition: IWORKToken.cpp:57
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:578
m_tl
unsigned m_tl
Definition: KEY1TableElement.cpp:107
m_endPoint
unsigned m_endPoint
Definition: KEY1TableElement.cpp:120
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:624
libetonyek::KEY1Token::tl
@ tl
Definition: KEY1Token.h:205
libetonyek::KEY1TableElement::TableData::TableData
TableData()
Definition: KEY1TableElement.cpp:136
libetonyek_xml.h
libetonyek::IWORKToken::text
@ text
Definition: IWORKToken.h:465
libetonyek::IWORKXMLContextBase< Base, KEY1ParserState, KEYCollector >::getState
KEY1ParserState & getState()
Definition: IWORKXMLContextBase.h:43