IWORKXMLParserState.h Source File documentation

IWORKXMLParserState.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 IWORKXMLPARSERSTATE_H_INCLUDED
11 #define IWORKXMLPARSERSTATE_H_INCLUDED
12
13 #include <memory>
14
15 #include "IWORKStylesheet.h"
16 #include "IWORKLanguageManager.h"
17 #include "IWORKStyle_fwd.h"
18 #include "IWORKTypes.h"
19 #include "IWORKTypes_fwd.h"
20
21 namespace libetonyek
22 {
23
24 class IWORKCollector;
25 struct IWORKDictionary;
26 class IWORKParser;
27 class IWORKTable;
28 class IWORKText;
29 class IWORKTokenizer;
30
31 class IWORKXMLParserState
32 {
33 // not copyable
34 IWORKXMLParserState(const IWORKXMLParserState &);
35 IWORKXMLParserState &operator=(const IWORKXMLParserState &);
36
37 public:
38 IWORKXMLParserState(IWORKParser &parser, IWORKCollector &collector, IWORKDictionary &dict);
39
40 IWORKParser &getParser();
41 IWORKDictionary &getDictionary();
42 IWORKCollector &getCollector() const;
43 const IWORKTokenizer &getTokenizer() const;
44 IWORKStylePtr_t getStyleByName(const char *const name, const IWORKStyleMap_t &mainMap, bool mustExist=true) const;
45
46 public:
47 IWORKTableDataPtr_t m_tableData;
48 IWORKStylesheetPtr_t m_stylesheet;
49 // When false, nothing should be sent to collector. This is used to
50 // gather referenceable entities in skipped parts of the file.
51 bool m_enableCollector;
52 IWORKTableNameMapPtr_t m_tableNameMap;
53 IWORKLanguageManager m_langManager;
54 std::shared_ptr<IWORKTable> m_currentTable;
55 std::shared_ptr<IWORKText> m_currentText;
56
57 private:
58 IWORKParser &m_parser;
59 IWORKCollector &m_collector;
60 IWORKDictionary &m_dict;
61 };
62
63 }
64
65 #endif // IWORKXMLPARSERSTATE_H_INCLUDED
66
67 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::IWORKXMLParserState::m_stylesheet
IWORKStylesheetPtr_t m_stylesheet
Definition: IWORKXMLParserState.h:48
IWORKDictionary.h
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKLanguageManager
Definition: IWORKLanguageManager.h:23
m_tableNameMap
const IWORKTableNameMapPtr_t & m_tableNameMap
Definition: IWORKOutputElements.cpp:334
libetonyek::IWORKTableNameMapPtr_t
std::shared_ptr< IWORKTableNameMap_t > IWORKTableNameMapPtr_t
Definition: IWORKTypes_fwd.h:34
libetonyek::IWORKStyleMap_t
std::unordered_map< ID_t, IWORKStylePtr_t > IWORKStyleMap_t
Definition: IWORKStyle_fwd.h:24
libetonyek::IWORKXMLParserState::m_enableCollector
bool m_enableCollector
Definition: IWORKXMLParserState.h:51
libetonyek::IWORKTokenizer
Definition: IWORKTokenizer.h:16
libetonyek::IWORKXMLParserState::m_langManager
IWORKLanguageManager m_langManager
Definition: IWORKXMLParserState.h:53
libetonyek::IWORKXMLParserState::m_tableData
IWORKTableDataPtr_t m_tableData
Definition: IWORKXMLParserState.h:47
libetonyek::IWORKParser::getTokenizer
virtual const IWORKTokenizer & getTokenizer() const =0
ETONYEK_DEBUG_MSG
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
IWORKTypes_fwd.h
IWORKTable.h
libetonyek::IWORKXMLParserState::operator=
IWORKXMLParserState & operator=(const IWORKXMLParserState &)
IWORKLanguageManager.h
libetonyek::IWORKXMLParserState::m_currentTable
std::shared_ptr< IWORKTable > m_currentTable
Definition: IWORKXMLParserState.h:54
libetonyek::IWORKParser
Definition: IWORKParser.h:23
libetonyek::IWORKXMLParserState::getCollector
IWORKCollector & getCollector() const
Definition: IWORKXMLParserState.cpp:48
libetonyek::IWORKStylesheetPtr_t
std::shared_ptr< IWORKStylesheet > IWORKStylesheetPtr_t
Definition: IWORKStylesheet.h:19
libetonyek::IWORKXMLParserState
Definition: IWORKXMLParserState.h:31
libetonyek::IWORKXMLParserState::m_parser
IWORKParser & m_parser
Definition: IWORKXMLParserState.h:58
libetonyek::IWORKXMLParserState::m_tableNameMap
IWORKTableNameMapPtr_t m_tableNameMap
Definition: IWORKXMLParserState.h:52
libetonyek::IWORKDictionary
A dictionary of all referenceable entities in the presentation.
Definition: IWORKDictionary.h:38
libetonyek::IWORKXMLParserState::getParser
IWORKParser & getParser()
Definition: IWORKXMLParserState.cpp:38
libetonyek::IWORKTableDataPtr_t
std::shared_ptr< IWORKTableData > IWORKTableDataPtr_t
Definition: IWORKTypes_fwd.h:76
libetonyek::IWORKXMLParserState::m_collector
IWORKCollector & m_collector
Definition: IWORKXMLParserState.h:59
libetonyek::IWORKXMLParserState::getTokenizer
const IWORKTokenizer & getTokenizer() const
Definition: IWORKXMLParserState.cpp:53
IWORKStylesheet.h
IWORKText.h
IWORKTypes.h
libetonyek::IWORKCollector
Definition: IWORKCollector.h:41
libetonyek::IWORKXMLParserState::m_dict
IWORKDictionary & m_dict
Definition: IWORKXMLParserState.h:60
IWORKXMLParserState.h
IWORKCollector.h
IWORKParser.h
libetonyek::IWORKTableNameMap_t
std::unordered_map< std::string, std::string > IWORKTableNameMap_t
Definition: IWORKTypes_fwd.h:32
libetonyek::KEY1Token::dict
@ dict
Definition: KEY1Token.h:51
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
libetonyek::IWORKXMLParserState::getStyleByName
IWORKStylePtr_t getStyleByName(const char *const name, const IWORKStyleMap_t &mainMap, bool mustExist=true) const
Definition: IWORKXMLParserState.cpp:58
m_dict
std::unordered_map< ID_t, std::deque< IWORKTableCell > > m_dict
Definition: IWORKTableInfoElement.cpp:357
libetonyek::IWORKXMLParserState::IWORKXMLParserState
IWORKXMLParserState(const IWORKXMLParserState &)
libetonyek::IWORKXMLParserState::getDictionary
IWORKDictionary & getDictionary()
Definition: IWORKXMLParserState.cpp:43
libetonyek::IWORKXMLParserState::m_currentText
std::shared_ptr< IWORKText > m_currentText
Definition: IWORKXMLParserState.h:55
IWORKStyle_fwd.h
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:578
m_collector
IWORKCollector & m_collector
Definition: IWORKRecorder.cpp:340
m_stylesheet
const IWORKStylesheetPtr_t m_stylesheet
Definition: IWORKRecorder.cpp:127