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 IWORKTableNameMapPtr_t m_tableNameMap;
53 IWORKLanguageManager m_langManager;
54 std::shared_ptr<IWORKTable> m_currentTable;
55 std::shared_ptr<IWORKText> m_currentText;
56
57private:
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: */
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::IWORKTokenizer
Definition: IWORKTokenizer.h:17
libetonyek::IWORKXMLParserState
Definition: IWORKXMLParserState.h:32
libetonyek::IWORKXMLParserState::getCollector
IWORKCollector & getCollector() const
Definition: IWORKXMLParserState.cpp:48
libetonyek::IWORKXMLParserState::m_parser
IWORKParser & m_parser
Definition: IWORKXMLParserState.h:58
libetonyek::IWORKXMLParserState::m_langManager
IWORKLanguageManager m_langManager
Definition: IWORKXMLParserState.h:53
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:53
libetonyek::IWORKXMLParserState::m_currentText
std::shared_ptr< IWORKText > m_currentText
Definition: IWORKXMLParserState.h:55
libetonyek::IWORKXMLParserState::m_dict
IWORKDictionary & m_dict
Definition: IWORKXMLParserState.h:60
libetonyek::IWORKXMLParserState::getStyleByName
IWORKStylePtr_t getStyleByName(const char *const name, const IWORKStyleMap_t &mainMap, bool mustExist=true) const
Definition: IWORKXMLParserState.cpp:58
libetonyek::IWORKXMLParserState::m_tableNameMap
IWORKTableNameMapPtr_t m_tableNameMap
Definition: IWORKXMLParserState.h:52
libetonyek::IWORKXMLParserState::getDictionary
IWORKDictionary & getDictionary()
Definition: IWORKXMLParserState.cpp:43
libetonyek::IWORKXMLParserState::IWORKXMLParserState
IWORKXMLParserState(const IWORKXMLParserState &)
libetonyek::IWORKXMLParserState::m_currentTable
std::shared_ptr< IWORKTable > m_currentTable
Definition: IWORKXMLParserState.h:54
libetonyek::IWORKXMLParserState::m_collector
IWORKCollector & m_collector
Definition: IWORKXMLParserState.h:59
libetonyek::IWORKXMLParserState::getParser
IWORKParser & getParser()
Definition: IWORKXMLParserState.cpp:38
libetonyek::IWORKXMLParserState::operator=
IWORKXMLParserState & operator=(const IWORKXMLParserState &)
libetonyek
Definition: IWORKBezierElement.cpp:21
libetonyek::IWORKStylesheetPtr_t
std::shared_ptr< IWORKStylesheet > IWORKStylesheetPtr_t
Definition: IWORKStylesheet.h:20
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:34
libetonyek::IWORKTableDataPtr_t
std::shared_ptr< IWORKTableData > IWORKTableDataPtr_t
Definition: IWORKTypes_fwd.h:78
libetonyek::IWORKDictionary
A dictionary of all referenceable entities in the presentation.
Definition: IWORKDictionary.h:40