RVNGStreamImplementation.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) 2006 Ariya Hidayat (ariya@kde.org)
11 *
12 * For minor contributions see the git repository.
13 *
14 * Alternatively, the contents of this file may be used under the terms
15 * of the GNU Lesser General Public License Version 2.1 or later
16 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
17 * applicable instead of those above.
18 */
19
20#ifndef RVNGSTREAMIMPLEMENTATION_H
21#define RVNGSTREAMIMPLEMENTATION_H
22
24
25#include "RVNGStream.h"
26
27namespace librevenge
28{
29
31
33{
34public:
35 explicit RVNGFileStream(const char *filename);
37
38 const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
39 long tell();
40 int seek(long offset, RVNG_SEEK_TYPE seekType);
41 bool isEnd();
42
43 bool isStructured();
44 unsigned subStreamCount();
45 const char *subStreamName(unsigned id);
46 bool existsSubStream(const char *name);
48 RVNGInputStream *getSubStreamByName(const char *name);
49
50private:
52 RVNGFileStream(const RVNGFileStream &); // copy is not allowed
53 RVNGFileStream &operator=(const RVNGFileStream &); // assignment is not allowed
54};
55
57
59{
60public:
61 RVNGStringStream(const unsigned char *data, const unsigned int dataSize);
63
64 const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
65 long tell();
66 int seek(long offset, RVNG_SEEK_TYPE seekType);
67 bool isEnd();
68
69 bool isStructured();
70 unsigned subStreamCount();
71 const char *subStreamName(unsigned);
72 bool existsSubStream(const char *name);
73 RVNGInputStream *getSubStreamByName(const char *name);
75
76private:
78 RVNGStringStream(const RVNGStringStream &); // copy is not allowed
79 RVNGStringStream &operator=(const RVNGStringStream &); // assignment is not allowed
80};
81
82}
83
84#endif // RVNGSTREAMIMPLEMENTATION_H
85/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
Definition RVNGStreamImplementation.cpp:45
RVNGFileStream(const RVNGFileStream &)
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 RVNGStreamImplementation.cpp:148
RVNGFileStream(const char *filename)
Definition RVNGStreamImplementation.cpp:109
bool existsSubStream(const char *name)
Definition RVNGStreamImplementation.cpp:323
RVNGInputStream * getSubStreamByName(const char *name)
Extracts a named stream from an OLE2 storage.
Definition RVNGStreamImplementation.cpp:346
long tell()
Returns the actual position inside the input stream.
Definition RVNGStreamImplementation.cpp:221
int seek(long offset, RVNG_SEEK_TYPE seekType)
Moves to the next location inside the input stream.
Definition RVNGStreamImplementation.cpp:228
RVNGFileStream & operator=(const RVNGFileStream &)
RVNGFileStreamPrivate * d
Definition RVNGStreamImplementation.h:51
unsigned subStreamCount()
Definition RVNGStreamImplementation.cpp:310
bool isStructured()
Analyses the content of the input stream to see whether it is an OLE2 storage.
Definition RVNGStreamImplementation.cpp:274
bool isEnd()
Determines whether the current position is at the end of the stream.
Definition RVNGStreamImplementation.cpp:267
const char * subStreamName(unsigned id)
Definition RVNGStreamImplementation.cpp:316
RVNGInputStream * getSubStreamById(unsigned id)
Definition RVNGStreamImplementation.cpp:341
RVNGInputStream()
Definition RVNGStream.h:36
Definition RVNGStreamImplementation.cpp:62
RVNGStringStreamPrivate * d
Definition RVNGStreamImplementation.h:77
bool isEnd()
Determines whether the current position is at the end of the stream.
Definition RVNGStreamImplementation.cpp:447
RVNGStringStream & operator=(const RVNGStringStream &)
int seek(long offset, RVNG_SEEK_TYPE seekType)
Moves to the next location inside the input stream.
Definition RVNGStreamImplementation.cpp:424
RVNGStringStream(const RVNGStringStream &)
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 RVNGStreamImplementation.cpp:393
RVNGInputStream * getSubStreamByName(const char *name)
Extracts a named stream from an OLE2 storage.
Definition RVNGStreamImplementation.cpp:524
const char * subStreamName(unsigned)
Definition RVNGStreamImplementation.cpp:494
RVNGInputStream * getSubStreamById(unsigned)
Definition RVNGStreamImplementation.cpp:519
bool existsSubStream(const char *name)
Definition RVNGStreamImplementation.cpp:501
unsigned subStreamCount()
Definition RVNGStreamImplementation.cpp:488
long tell()
Returns the actual position inside the input stream.
Definition RVNGStreamImplementation.cpp:419
RVNGStringStream(const unsigned char *data, const unsigned int dataSize)
Definition RVNGStreamImplementation.cpp:382
bool isStructured()
Analyses the content of the input stream to see whether it is an OLE2 storage.
Definition RVNGStreamImplementation.cpp:455
#define REVENGE_STREAM_API
Definition librevenge-stream-api.h:34
Definition RVNGBinaryData.cpp:40
RVNG_SEEK_TYPE
Definition RVNGStream.h:27

Generated for librevenge by doxygen 1.14.0