WPSHeader.h Source File documentation

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

WPSHeader.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-2003 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 WPSHEADER_H
24 #define WPSHEADER_H
25
26 #include "libwps_internal.h"
27 #include <librevenge-stream/librevenge-stream.h>
28
29 #include "libwps/libwps.h"
30
31 class WPSHeader
32 {
33 public:
34 WPSHeader(RVNGInputStreamPtr &input, RVNGInputStreamPtr &fileInput, uint8_t majorVersion, libwps::WPSKind kind=libwps::WPS_TEXT, libwps::WPSCreator creator=libwps::WPS_MSWORKS);
35 virtual ~WPSHeader();
36
37 static WPSHeader *constructHeader(RVNGInputStreamPtr &input);
38
39 RVNGInputStreamPtr &getInput()
40 {
41 return m_input;
42 }
43
44 RVNGInputStreamPtr &getFileInput()
45 {
46 return m_fileInput;
47 }
48
49 libwps::WPSCreator getCreator() const
50 {
51 return m_creator;
52 }
53
54 void setCreator(libwps::WPSCreator creator)
55 {
56 m_creator=creator;
57 }
58
59 libwps::WPSKind getKind() const
60 {
61 return m_kind;
62 }
63
64 void setKind(libwps::WPSKind kind)
65 {
66 m_kind=kind;
67 }
68
69 bool getNeedEncoding() const
70 {
71 return m_needEncodingFlag;
72 }
73
74 void setNeedEncoding(bool needEncoding)
75 {
76 m_needEncodingFlag=needEncoding;
77 }
78
79 uint8_t getMajorVersion() const
80 {
81 return m_majorVersion;
82 }
83
84 void setMajorVersion(uint8_t version)
85 {
86 m_majorVersion=version;
87 }
88
89 private:
90 WPSHeader(const WPSHeader &);
91 WPSHeader &operator=(const WPSHeader &);
92 RVNGInputStreamPtr m_input;
93 RVNGInputStreamPtr m_fileInput;
94 uint8_t m_majorVersion;
95 libwps::WPSKind m_kind;
96 libwps::WPSCreator m_creator;
98 bool m_needEncodingFlag;
99 };
100
101 #endif /* WPSHEADER_H */
102 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPSHeader::getInput
RVNGInputStreamPtr & getInput()
Definition: WPSHeader.h:39
WPSHeader::m_majorVersion
uint8_t m_majorVersion
Definition: WPSHeader.h:94
WPSHeader::setCreator
void setCreator(libwps::WPSCreator creator)
Definition: WPSHeader.h:54
libwps::WPS_TEXT
Definition: WPSDocument.h:58
WPSHeader::getFileInput
RVNGInputStreamPtr & getFileInput()
Definition: WPSHeader.h:44
WPSHeader::WPSHeader
WPSHeader(RVNGInputStreamPtr &input, RVNGInputStreamPtr &fileInput, uint8_t majorVersion, libwps::WPSKind kind=libwps::WPS_TEXT, libwps::WPSCreator creator=libwps::WPS_MSWORKS)
Definition: WPSHeader.cpp:31
WPSHeader::constructHeader
static WPSHeader * constructHeader(RVNGInputStreamPtr &input)
So far, we have identified three categories of Works documents.
Definition: WPSHeader.cpp:50
WPSHeader::m_kind
libwps::WPSKind m_kind
Definition: WPSHeader.h:95
WPSHeader::getNeedEncoding
bool getNeedEncoding() const
Definition: WPSHeader.h:69
libwps_internal.h
WPSHeader::setMajorVersion
void setMajorVersion(uint8_t version)
Definition: WPSHeader.h:84
WPSHeader::m_input
RVNGInputStreamPtr m_input
Definition: WPSHeader.h:92
WPSHeader
Definition: WPSHeader.h:31
WPSHeader::setNeedEncoding
void setNeedEncoding(bool needEncoding)
Definition: WPSHeader.h:74
WPSHeader::~WPSHeader
virtual ~WPSHeader()
Definition: WPSHeader.cpp:37
libwps::WPSCreator
WPSCreator
Definition: WPSDocument.h:48
WPSHeader::getCreator
libwps::WPSCreator getCreator() const
Definition: WPSHeader.h:49
WPSHeader::operator=
WPSHeader & operator=(const WPSHeader &)
libwps.h
RVNGInputStreamPtr
shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
WPSHeader::m_needEncodingFlag
bool m_needEncodingFlag
a flag to know if we need to have the character set encoding
Definition: WPSHeader.h:98
WPSHeader::getKind
libwps::WPSKind getKind() const
Definition: WPSHeader.h:59
WPSHeader::getMajorVersion
uint8_t getMajorVersion() const
Definition: WPSHeader.h:79
libwps::WPSKind
WPSKind
Definition: WPSDocument.h:58
WPSHeader::m_creator
libwps::WPSCreator m_creator
Definition: WPSHeader.h:96
libwps::WPS_MSWORKS
Microsoft Works documents (all wps, wks and wdb)
Definition: WPSDocument.h:48
WPSHeader::setKind
void setKind(libwps::WPSKind kind)
Definition: WPSHeader.h:64
WPSHeader::m_fileInput
RVNGInputStreamPtr m_fileInput
Definition: WPSHeader.h:93