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  * Copyright (C) 2002 William Lachance (william.lachance@sympatico.ca)
00004  * Copyright (C) 2002-2003 Marc Maurer (uwog@uwog.net)
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
00019  *
00020  * For further information visit http://libwps.sourceforge.net
00021  */
00022 
00023 /*
00024  * This file is in sync with CVS
00025  * /libwpd2/src/lib/WPXHeader.cpp 1.17
00026  */
00027 
00028 #ifndef WPSHEADER_H
00029 #define WPSHEADER_H
00030 
00031 #include "libwps_internal.h"
00032 #include <libwpd-stream/libwpd-stream.h>
00033 
00034 class WPSHeader
00035 {
00036 public:
00037         WPSHeader(WPXInputStreamPtr &input, uint8_t majorVersion);
00038         virtual ~WPSHeader();
00039 
00040         static WPSHeader *constructHeader(WPXInputStreamPtr &input);
00041 
00042         WPXInputStreamPtr &getInput()
00043         {
00044                 return m_input;
00045         }
00046 
00047         uint8_t getMajorVersion() const
00048         {
00049                 return m_majorVersion;
00050         }
00051 
00052 private:
00053         WPSHeader(const WPSHeader &);
00054         WPSHeader &operator=(const WPSHeader &);
00055         WPXInputStreamPtr m_input;
00056         uint8_t m_majorVersion;
00057 };
00058 
00059 typedef shared_ptr<WPSHeader> WPSHeaderPtr;
00060 
00061 #endif /* WPSHEADER_H */
00062 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */