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
26
27#include "RVNGStream.h"
28
29namespace librevenge
30{
31
33
41{
42 // disable copying
45
46public:
52 explicit RVNGDirectoryStream(const char *path);
53
54 virtual ~RVNGDirectoryStream();
55
63 static RVNGDirectoryStream *createForParent(const char *path);
64
69 static bool isDirectory(const char *path);
70
71 virtual bool isStructured();
72 virtual unsigned subStreamCount();
73 virtual const char *subStreamName(unsigned id);
74 virtual bool existsSubStream(const char *name);
75 virtual RVNGInputStream *getSubStreamByName(const char *name);
76 virtual RVNGInputStream *getSubStreamById(unsigned id);
77
78 virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
79 virtual int seek(long offset, RVNG_SEEK_TYPE seekType);
80 virtual long tell();
81 virtual bool isEnd();
82
83private:
85};
86
87}
88
89#endif // RVNGDIRECTORYSTREAM_H_INCLUDED
90
91/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
RVNGDirectoryStreamImpl * m_impl
Definition RVNGDirectoryStream.h:84
virtual bool existsSubStream(const char *name)
Definition RVNGDirectoryStream.cpp:163
static RVNGDirectoryStream * createForParent(const char *path)
Create a stream for parent directory of path.
Definition RVNGDirectoryStream.cpp:121
virtual RVNGInputStream * getSubStreamById(unsigned id)
Definition RVNGDirectoryStream.cpp:196
virtual bool isStructured()
Analyses the content of the input stream to see whether it is an OLE2 storage.
Definition RVNGDirectoryStream.cpp:141
virtual const char * subStreamName(unsigned id)
Definition RVNGDirectoryStream.cpp:156
virtual long tell()
Returns the actual position inside the input stream.
Definition RVNGDirectoryStream.cpp:214
virtual bool isEnd()
Determines whether the current position is at the end of the stream.
Definition RVNGDirectoryStream.cpp:221
virtual RVNGInputStream * getSubStreamByName(const char *name)
Extracts a named stream from an OLE2 storage.
Definition RVNGDirectoryStream.cpp:177
static bool isDirectory(const char *path)
Test whether path is a directory.
Definition RVNGDirectoryStream.cpp:136
RVNGDirectoryStream & operator=(const RVNGDirectoryStream &)
RVNGDirectoryStream(const RVNGDirectoryStream &)
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:203
virtual int seek(long offset, RVNG_SEEK_TYPE seekType)
Moves to the next location inside the input stream.
Definition RVNGDirectoryStream.cpp:209
virtual unsigned subStreamCount()
Definition RVNGDirectoryStream.cpp:148
RVNGInputStream()
Definition RVNGStream.h:36
#define REVENGE_STREAM_API
Definition librevenge-stream-api.h:34
Definition RVNGBinaryData.cpp:40
RVNG_SEEK_TYPE
Definition RVNGStream.h:27
Definition RVNGDirectoryStream.cpp:95

Generated for librevenge by doxygen 1.14.0