WPSStream.h Source File documentation

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 }
42
43 RVNGInputStreamPtr m_input;
45 libwps::DebugFile &m_ascii;
47 long m_eof;
48protected:
50 libwps::DebugFile m_asciiFile;
51};
52
53#endif /* WPS_STREAM_H */
54/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPSDebug.h
libwps::DebugFile
Definition WPSDebug.h:208
libwps_internal.h
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::~WPSStream
~WPSStream()
destructor
Definition WPSStream.cpp:48
WPSStream::WPSStream
WPSStream(RVNGInputStreamPtr input, libwps::DebugFile &ascii)
constructor with an ascii file
Definition WPSStream.cpp:24
WPSStream::checkFilePosition
bool checkFilePosition(long pos) const
return true if the position is in the file
Definition WPSStream.h:38
WPSStream::m_eof
long m_eof
the last position
Definition WPSStream.h:47
WPSStream::m_asciiFile
libwps::DebugFile m_asciiFile
the local file(if not, is given)
Definition WPSStream.h:50