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
21namespace libetonyek
22{
23
24class IWORKCollector;
25struct IWORKDictionary;
26class IWORKParser;
27class IWORKTable;
28class IWORKText;
29class IWORKTokenizer;
30
31 class IWORKXMLParserState
32{
33 // not copyable
34 IWORKXMLParserState(const IWORKXMLParserState &);
35 IWORKXMLParserState &operator=(const IWORKXMLParserState &);
36
37public:
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
46public:
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 IWORKFormatNameMap m_formatNameMap;
53 IWORKTableNameMapPtr_t m_tableNameMap;
54 IWORKLanguageManager m_langManager;
55 std::shared_ptr<IWORKTable> m_currentTable;
56 std::shared_ptr<IWORKText> m_currentText;
57
58private:
59 IWORKParser &m_parser;
60 IWORKCollector &m_collector;
61 IWORKDictionary &m_dict;
62};
63
64}
65
66#endif // IWORKXMLPARSERSTATE_H_INCLUDED
67
68/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IWORKLanguageManager.h
IWORKStyle_fwd.h
IWORKStylesheet.h
IWORKTypes.h
IWORKTypes_fwd.h
libetonyek::IWORKCollector
Definition IWORKCollector.h:42
libetonyek::IWORKLanguageManager
Definition IWORKLanguageManager.h:24
libetonyek::IWORKParser
Definition IWORKParser.h:24
libetonyek::IWORKTable
Definition IWORKTable.h:32
libetonyek::IWORKText
Definition IWORKText.h:34
libetonyek::IWORKTokenizer
Definition IWORKTokenizer.h:17
libetonyek::IWORKXMLParserState::getCollector
IWORKCollector & getCollector() const
Definition IWORKXMLParserState.cpp:49
libetonyek::IWORKXMLParserState::m_parser
IWORKParser & m_parser
Definition IWORKXMLParserState.h:59
libetonyek::IWORKXMLParserState::m_langManager
IWORKLanguageManager m_langManager
Definition IWORKXMLParserState.h:54
libetonyek::IWORKXMLParserState::m_stylesheet
IWORKStylesheetPtr_t m_stylesheet
Definition IWORKXMLParserState.h:48
libetonyek::IWORKXMLParserState::m_tableData
IWORKTableDataPtr_t m_tableData
Definition IWORKXMLParserState.h:47
libetonyek::IWORKXMLParserState::m_enableCollector
bool m_enableCollector
Definition IWORKXMLParserState.h:51
libetonyek::IWORKXMLParserState::getTokenizer
const IWORKTokenizer & getTokenizer() const
Definition IWORKXMLParserState.cpp:54
libetonyek::IWORKXMLParserState::m_currentText
std::shared_ptr< IWORKText > m_currentText
Definition IWORKXMLParserState.h:56
libetonyek::IWORKXMLParserState::m_dict
IWORKDictionary & m_dict
Definition IWORKXMLParserState.h:61
libetonyek::IWORKXMLParserState::getStyleByName
IWORKStylePtr_t getStyleByName(const char *const name, const IWORKStyleMap_t &mainMap, bool mustExist=true) const
Definition IWORKXMLParserState.cpp:59
libetonyek::IWORKXMLParserState::m_formatNameMap
IWORKFormatNameMap m_formatNameMap
Definition IWORKXMLParserState.h:52
libetonyek::IWORKXMLParserState::m_tableNameMap
IWORKTableNameMapPtr_t m_tableNameMap
Definition IWORKXMLParserState.h:53
libetonyek::IWORKXMLParserState::getDictionary
IWORKDictionary & getDictionary()
Definition IWORKXMLParserState.cpp:44
libetonyek::IWORKXMLParserState::IWORKXMLParserState
IWORKXMLParserState(const IWORKXMLParserState &)
libetonyek::IWORKXMLParserState::m_currentTable
std::shared_ptr< IWORKTable > m_currentTable
Definition IWORKXMLParserState.h:55
libetonyek::IWORKXMLParserState::m_collector
IWORKCollector & m_collector
Definition IWORKXMLParserState.h:60
libetonyek::IWORKXMLParserState::getParser
IWORKParser & getParser()
Definition IWORKXMLParserState.cpp:39
libetonyek::IWORKXMLParserState::operator=
IWORKXMLParserState & operator=(const IWORKXMLParserState &)
libetonyek::IWORKToken::name
@ name
Definition IWORKToken.h:585
libetonyek::KEY1Token::dict
@ dict
Definition KEY1Token.h:51
libetonyek
Definition IWORKBezierElement.cpp:21
libetonyek::IWORKStylesheetPtr_t
std::shared_ptr< IWORKStylesheet > IWORKStylesheetPtr_t
Definition IWORKStylesheet.h:20
libetonyek::IWORKFormatNameMap
std::unordered_map< std::string, std::string > IWORKFormatNameMap
Definition IWORKTypes_fwd.h:32
libetonyek::IWORKStyleMap_t
std::unordered_map< ID_t, IWORKStylePtr_t > IWORKStyleMap_t
Definition IWORKStyle_fwd.h:24
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition IWORKStyle_fwd.h:23
libetonyek::IWORKTableNameMapPtr_t
std::shared_ptr< IWORKTableNameMap_t > IWORKTableNameMapPtr_t
Definition IWORKTypes_fwd.h:36
libetonyek::IWORKTableDataPtr_t
std::shared_ptr< IWORKTableData > IWORKTableDataPtr_t
Definition IWORKTypes_fwd.h:80
libetonyek::IWORKDictionary
A dictionary of all referenceable entities in the presentation.
Definition IWORKDictionary.h:40