Main Page
Namespaces
Classes
Files
File List
File Members
WPSParser.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2
/* libwps
3
* Version: MPL 2.0 / LGPLv2.1+
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
* Major Contributor(s):
10
* Copyright (C) 2002 William Lachance (william.lachance@sympatico.ca)
11
* Copyright (C) 2002 Marc Maurer (uwog@uwog.net)
12
*
13
* For minor contributions see the git repository.
14
*
15
* Alternatively, the contents of this file may be used under the terms
16
* of the GNU Lesser General Public License Version 2.1 or later
17
* (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
18
* applicable instead of those above.
19
*
20
* For further information visit http://libwps.sourceforge.net
21
*/
22
23
#ifndef WPSPARSER_H
24
#define WPSPARSER_H
25
26
#include <map>
27
#include <string>
28
29
#include "
libwps_internal.h
"
30
31
#include "
WPSDebug.h
"
32
33
class
WPXDocumentInterface;
34
35
class
WPSEntry
;
36
class
WPSHeader
;
37
typedef
shared_ptr<WPSHeader>
WPSHeaderPtr
;
38
39
class
WPSTextParser
;
40
41
class
WPSParser
42
{
43
friend
class
WPSTextParser
;
44
public
:
45
WPSParser
(
WPXInputStreamPtr
&input,
WPSHeaderPtr
&header);
46
virtual
~WPSParser
();
47
48
virtual
void
parse
(WPXDocumentInterface *documentInterface) = 0;
49
51
typedef
std::multimap<std::string, WPSEntry>
NameMultiMap
;
52
53
protected
:
54
WPXInputStreamPtr
&
getInput
()
55
{
56
return
m_input
;
57
}
58
WPSHeaderPtr
&
getHeader
()
59
{
60
return
m_header
;
61
}
62
int
version
()
const
63
{
64
return
m_version
;
65
}
66
void
setVersion
(
int
vers)
67
{
68
m_version
=vers;
69
}
70
NameMultiMap
&
getNameEntryMap
()
71
{
72
return
m_nameMultiMap
;
73
}
74
NameMultiMap
const
&
getNameEntryMap
()
const
75
{
76
return
m_nameMultiMap
;
77
}
79
libwps::DebugFile
&
ascii
()
80
{
81
return
m_asciiFile
;
82
}
83
84
private
:
85
WPSParser
(
const
WPSParser
&);
86
WPSParser
&
operator=
(
const
WPSParser
&);
87
88
// the main input
89
WPXInputStreamPtr
m_input
;
90
// the header
91
WPSHeaderPtr
m_header
;
92
// the file version
93
int
m_version
;
95
NameMultiMap
m_nameMultiMap
;
97
libwps::DebugFile
m_asciiFile
;
98
};
99
100
#endif
/* WPSPARSER_H */
101
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
Generated on Sat May 25 2013 14:26:21 for libwps by
doxygen
1.8.3.1