WPSStream.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) 2006, 2007 Andrew Ziem
11 * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
12 * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
13 *
14 * For minor contributions see the git repository.
15 *
16 * Alternatively, the contents of this file may be used under the terms
17 * of the GNU Lesser General Public License Version 2.1 or later
18 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
19 * applicable instead of those above.
20 */
21
22 #ifndef WPS_STREAM_H
23 #define WPS_STREAM_H
24
25 #include "libwps_internal.h"
26 #include "WPSDebug.h"
27
29 struct WPSStream
30 {
32 WPSStream(RVNGInputStreamPtr input, libwps::DebugFile &ascii);
34 explicit WPSStream(RVNGInputStreamPtr input);
36 ~WPSStream();
38 bool checkFilePosition(long pos) const
39 {
40 return pos<=m_eof;
41 }
43 RVNGInputStreamPtr m_input;
45 libwps::DebugFile &m_ascii;
47 long m_eof;
48 protected:
50 libwps::DebugFile m_asciiFile;
51 };
52
53 #endif /* WPS_STREAM_H */
54 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPSStream::m_eof
long m_eof
the last position
Definition: WPSStream.h:47
WPSStream::checkFilePosition
bool checkFilePosition(long pos) const
return true if the position is in the file
Definition: WPSStream.h:38
libwps::DebugFile
Definition: WPSDebug.h:207
WPSStream::~WPSStream
~WPSStream()
destructor
Definition: WPSStream.cpp:48
libwps_internal.h
WPSStream::WPSStream
WPSStream(RVNGInputStreamPtr input, libwps::DebugFile &ascii)
constructor with an ascii file
Definition: WPSStream.cpp:24
RVNGInputStreamPtr
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
WPSStream::m_input
RVNGInputStreamPtr m_input
the stream
Definition: WPSStream.h:43
WPSStream::m_ascii
libwps::DebugFile & m_ascii
the ascii file
Definition: WPSStream.h:45
WPSStream
small structure use to store a stream and it debug file
Definition: WPSStream.h:29
WPSDebug.h
WPSStream::m_asciiFile
libwps::DebugFile m_asciiFile
the local file(if not, is given)
Definition: WPSStream.h:50