IWORKParser.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 IWORKPARSER_H_INCLUDED
11#define IWORKPARSER_H_INCLUDED
12
13#include "libetonyek_utils.h"
14#include "IWORKXMLContext.h"
15
16 namespace libetonyek
17{
18
19 struct IWORKDictionary;
20 class IWORKTokenizer;
21 class IWORKXMLParserState;
22
23 class IWORKParser
24{
25 // -Weffc++
26 IWORKParser(const IWORKParser &);
27 IWORKParser &operator=(const IWORKParser &);
28
29 public:
30 IWORKParser(const RVNGInputStreamPtr_t &input, const RVNGInputStreamPtr_t &package);
31 virtual ~IWORKParser() = 0;
32 bool parse();
33
34 RVNGInputStreamPtr_t &getInput();
35 RVNGInputStreamPtr_t getInput() const;
36 RVNGInputStreamPtr_t &getPackage();
37 RVNGInputStreamPtr_t getPackage() const;
38
39 virtual const IWORKTokenizer &getTokenizer() const = 0;
40
41 protected:
42 void setInput(const RVNGInputStreamPtr_t &input);
43
44 private:
45 virtual IWORKXMLContextPtr_t createDocumentContext() = 0;
46 virtual IWORKXMLContextPtr_t createDiscardContext() = 0;
47
48 private:
49 RVNGInputStreamPtr_t m_input;
50 RVNGInputStreamPtr_t m_package;
51};
52
53} // namespace libetonyek
54
55#endif // IWORKPARSER_H_INCLUDED
56
57/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
IWORKXMLContext.h
libetonyek::IWORKParser::getInput
RVNGInputStreamPtr_t & getInput()
Definition IWORKParser.cpp:148
libetonyek::IWORKParser::IWORKParser
IWORKParser(const IWORKParser &)
libetonyek::IWORKParser::getPackage
RVNGInputStreamPtr_t & getPackage()
Definition IWORKParser.cpp:163
libetonyek::IWORKParser::getTokenizer
virtual const IWORKTokenizer & getTokenizer() const =0
libetonyek::IWORKParser::~IWORKParser
virtual ~IWORKParser()=0
Definition IWORKParser.cpp:48
libetonyek::IWORKParser::operator=
IWORKParser & operator=(const IWORKParser &)
libetonyek::IWORKParser::createDiscardContext
virtual IWORKXMLContextPtr_t createDiscardContext()=0
libetonyek::IWORKParser::setInput
void setInput(const RVNGInputStreamPtr_t &input)
Definition IWORKParser.cpp:158
libetonyek::IWORKParser::createDocumentContext
virtual IWORKXMLContextPtr_t createDocumentContext()=0
libetonyek::IWORKParser::m_input
RVNGInputStreamPtr_t m_input
Definition IWORKParser.h:49
libetonyek::IWORKParser::parse
bool parse()
Definition IWORKParser.cpp:52
libetonyek::IWORKParser::m_package
RVNGInputStreamPtr_t m_package
Definition IWORKParser.h:50
libetonyek::IWORKTokenizer
Definition IWORKTokenizer.h:17
libetonyek::IWORKXMLParserState
Definition IWORKXMLParserState.h:32
libetonyek_utils.h
libetonyek
Definition IWORKBezierElement.cpp:21
libetonyek::RVNGInputStreamPtr_t
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition libetonyek_utils.h:82
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition IWORKXMLContext.h:20
libetonyek::IWORKDictionary
A dictionary of all referenceable entities in the presentation.
Definition IWORKDictionary.h:40