00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 00002 /* 00003 * This file is part of the libetonyek project. 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 */ 00009 00010 #ifndef IWORKXMLPARSERSTATE_H_INCLUDED 00011 #define IWORKXMLPARSERSTATE_H_INCLUDED 00012 00013 #include <boost/shared_ptr.hpp> 00014 00015 #include "IWORKStylesheet.h" 00016 #include "IWORKLanguageManager.h" 00017 #include "IWORKTypes.h" 00018 #include "IWORKTypes_fwd.h" 00019 00020 namespace libetonyek 00021 { 00022 00023 class IWORKCollector; 00024 struct IWORKDictionary; 00025 class IWORKParser; 00026 class IWORKTable; 00027 class IWORKText; 00028 class IWORKTokenizer; 00029 00030 class IWORKXMLParserState 00031 { 00032 // not copyable 00033 IWORKXMLParserState(const IWORKXMLParserState &); 00034 IWORKXMLParserState &operator=(const IWORKXMLParserState &); 00035 00036 public: 00037 IWORKXMLParserState(IWORKParser &parser, IWORKCollector &collector, IWORKDictionary &dict); 00038 00039 IWORKParser &getParser(); 00040 IWORKDictionary &getDictionary(); 00041 IWORKCollector &getCollector() const; 00042 const IWORKTokenizer &getTokenizer() const; 00043 00044 public: 00045 IWORKTableDataPtr_t m_tableData; 00046 IWORKStylesheetPtr_t m_stylesheet; 00047 // When false, nothing should be sent to collector. This is used to 00048 // gather referenceable entities in skipped parts of the file. 00049 bool m_enableCollector; 00050 IWORKTableNameMapPtr_t m_tableNameMap; 00051 IWORKLanguageManager m_langManager; 00052 boost::shared_ptr<IWORKTable> m_currentTable; 00053 boost::shared_ptr<IWORKText> m_currentText; 00054 00055 private: 00056 IWORKParser &m_parser; 00057 IWORKCollector &m_collector; 00058 IWORKDictionary &m_dict; 00059 }; 00060 00061 } 00062 00063 #endif // IWORKXMLPARSERSTATE_H_INCLUDED 00064 00065 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */