WPSHeader.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
00002 /* libwps
00003  * Version: MPL 2.0 / LGPLv2.1+
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  * Major Contributor(s):
00010  * Copyright (C) 2002 William Lachance (william.lachance@sympatico.ca)
00011  * Copyright (C) 2002-2003 Marc Maurer (uwog@uwog.net)
00012  *
00013  * For minor contributions see the git repository.
00014  *
00015  * Alternatively, the contents of this file may be used under the terms
00016  * of the GNU Lesser General Public License Version 2.1 or later
00017  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
00018  * applicable instead of those above.
00019  *
00020  * For further information visit http://libwps.sourceforge.net
00021  */
00022 
00023 #ifndef WPSHEADER_H
00024 #define WPSHEADER_H
00025 
00026 #include "libwps_internal.h"
00027 #include <librevenge-stream/librevenge-stream.h>
00028 
00029 #include "libwps/libwps.h"
00030 
00031 class WPSHeader
00032 {
00033 public:
00034         WPSHeader(RVNGInputStreamPtr &input, RVNGInputStreamPtr &fileInput, uint8_t majorVersion, libwps::WPSKind kind=libwps::WPS_TEXT, libwps::WPSCreator creator=libwps::WPS_MSWORKS);
00035         virtual ~WPSHeader();
00036 
00037         static WPSHeader *constructHeader(RVNGInputStreamPtr &input);
00038 
00039         RVNGInputStreamPtr &getInput()
00040         {
00041                 return m_input;
00042         }
00043 
00044         RVNGInputStreamPtr &getFileInput()
00045         {
00046                 return m_fileInput;
00047         }
00048 
00049         libwps::WPSCreator getCreator() const
00050         {
00051                 return m_creator;
00052         }
00053 
00054         void setCreator(libwps::WPSCreator creator)
00055         {
00056                 m_creator=creator;
00057         }
00058 
00059         libwps::WPSKind getKind() const
00060         {
00061                 return m_kind;
00062         }
00063 
00064         void setKind(libwps::WPSKind kind)
00065         {
00066                 m_kind=kind;
00067         }
00068 
00069         bool getNeedEncoding() const
00070         {
00071                 return m_needEncodingFlag;
00072         }
00073 
00074         void setNeedEncoding(bool needEncoding)
00075         {
00076                 m_needEncodingFlag=needEncoding;
00077         }
00078 
00079         uint8_t getMajorVersion() const
00080         {
00081                 return m_majorVersion;
00082         }
00083 
00084         void setMajorVersion(uint8_t version)
00085         {
00086                 m_majorVersion=version;
00087         }
00088 
00089 private:
00090         WPSHeader(const WPSHeader &);
00091         WPSHeader &operator=(const WPSHeader &);
00092         RVNGInputStreamPtr m_input;
00093         RVNGInputStreamPtr m_fileInput;
00094         uint8_t m_majorVersion;
00095         libwps::WPSKind m_kind;
00096         libwps::WPSCreator m_creator;
00098         bool m_needEncodingFlag;
00099 };
00100 
00101 #endif /* WPSHEADER_H */
00102 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */