- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

RVNGDirectoryStream.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* librevenge
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-2005 William Lachance (wrlach@gmail.com)
11 * Copyright (C) 2002 Marc Maurer (uwog@uwog.net)
12 * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
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 RVNGDIRECTORYSTREAM_H_INCLUDED
23 #define RVNGDIRECTORYSTREAM_H_INCLUDED
24
25 #include "RVNGStream.h"
26
27 namespace librevenge
28 {
29
30 struct RVNGDirectoryStreamImpl;
31
32 class RVNGDirectoryStream : public RVNGInputStream
33 {
34 // disable copying
35 RVNGDirectoryStream(const RVNGDirectoryStream &);
36 RVNGDirectoryStream &operator=(const RVNGDirectoryStream &);
37
38 public:
39 explicit RVNGDirectoryStream(const char *path);
40 virtual ~RVNGDirectoryStream();
41
42 static RVNGDirectoryStream *createForParent(const char *path);
43 static bool isDirectory(const char *path);
44
45 virtual bool isStructured();
46 virtual unsigned subStreamCount();
47 virtual const char *subStreamName(unsigned id);
48 virtual bool existsSubStream(const char *name);
49 virtual RVNGInputStream *getSubStreamByName(const char *name);
50 virtual RVNGInputStream *getSubStreamById(unsigned id);
51
52 virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
53 virtual int seek(long offset, RVNG_SEEK_TYPE seekType);
54 virtual long tell();
55 virtual bool isEnd();
56
57 private:
58 RVNGDirectoryStreamImpl *m_impl;
59 };
60
61 }
62
63 #endif // RVNGDIRECTORYSTREAM_H_INCLUDED
64
65 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
librevenge::RVNGDirectoryStream::m_impl
RVNGDirectoryStreamImpl * m_impl
Definition: RVNGDirectoryStream.h:58
librevenge::RVNGDirectoryStream::RVNGDirectoryStream
RVNGDirectoryStream(const RVNGDirectoryStream &)
librevenge::RVNGDirectoryStream::subStreamCount
virtual unsigned subStreamCount()
Definition: RVNGDirectoryStream.cpp:85
offset
unsigned offset
Definition: RVNGZipStream.cpp:74
librevenge::RVNGDirectoryStream::tell
virtual long tell()
Returns the actual position inside the input stream.
Definition: RVNGDirectoryStream.cpp:137
librevenge::RVNGDirectoryStreamImpl
Definition: RVNGDirectoryStream.cpp:43
librevenge::RVNGDirectoryStream::getSubStreamById
virtual RVNGInputStream * getSubStreamById(unsigned id)
Definition: RVNGDirectoryStream.cpp:119
librevenge::RVNG_SEEK_TYPE
RVNG_SEEK_TYPE
Definition: RVNGStream.h:26
librevenge::RVNGDirectoryStream::getSubStreamByName
virtual RVNGInputStream * getSubStreamByName(const char *name)
Extracts a named stream from an OLE2 storage.
Definition: RVNGDirectoryStream.cpp:107
librevenge::RVNGDirectoryStream::createForParent
static RVNGDirectoryStream * createForParent(const char *path)
Definition: RVNGDirectoryStream.cpp:67
librevenge::RVNGDirectoryStream::~RVNGDirectoryStream
virtual ~RVNGDirectoryStream()
Definition: RVNGDirectoryStream.cpp:62
librevenge::RVNGDirectoryStream::isDirectory
static bool isDirectory(const char *path)
Definition: RVNGDirectoryStream.cpp:75
librevenge::RVNGDirectoryStream::subStreamName
virtual const char * subStreamName(unsigned id)
Definition: RVNGDirectoryStream.cpp:91
librevenge::RVNGDirectoryStream::isEnd
virtual bool isEnd()
Determines whether the current position is at the end of the stream.
Definition: RVNGDirectoryStream.cpp:142
librevenge::RVNGDirectoryStream::operator=
RVNGDirectoryStream & operator=(const RVNGDirectoryStream &)
librevenge::RVNGDirectoryStream::existsSubStream
virtual bool existsSubStream(const char *name)
Definition: RVNGDirectoryStream.cpp:98
librevenge::RVNGDirectoryStream::read
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Tries to read a given number of bytes starting from the current position inside the input stream...
Definition: RVNGDirectoryStream.cpp:126
librevenge::RVNGDirectoryStream::isStructured
virtual bool isStructured()
Analyses the content of the input stream to see whether it is an OLE2 storage.
Definition: RVNGDirectoryStream.cpp:80
librevenge::RVNGDirectoryStream::seek
virtual int seek(long offset, RVNG_SEEK_TYPE seekType)
Moves to the next location inside the input stream.
Definition: RVNGDirectoryStream.cpp:132
librevenge::RVNGInputStream
Definition: RVNGStream.h:33
librevenge::RVNGDirectoryStream
Definition: RVNGDirectoryStream.h:32
RVNGStream.h