ABWZlibStream.h Source File documentation

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

ABWZlibStream.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libabw project.
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
10 #ifndef __ABWZLIBSTREAM_H__
11 #define __ABWZLIBSTREAM_H__
12
13 #include <vector>
14 #include <librevenge-stream/librevenge-stream.h>
15
16 namespace libabw
17 {
18
19 class ABWZlibStream : public librevenge::RVNGInputStream
20 {
21 public:
22 ABWZlibStream(librevenge::RVNGInputStream *input);
23 ~ABWZlibStream() {}
24
25 bool isStructured()
26 {
27 return false;
28 }
29 unsigned subStreamCount()
30 {
31 return 0;
32 }
33 const char *subStreamName(unsigned)
34 {
35 return 0;
36 }
37 bool existsSubStream(const char *)
38 {
39 return false;
40 }
41 librevenge::RVNGInputStream *getSubStreamByName(const char *)
42 {
43 return 0;
44 }
45 librevenge::RVNGInputStream *getSubStreamById(unsigned)
46 {
47 return 0;
48 }
49 const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
50 int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType);
51 long tell();
52 bool isEnd();
53 unsigned long getSize() const
54 {
55 return m_buffer.size();
56 }
57 private:
58 librevenge::RVNGInputStream *m_input;
59 volatile long m_offset;
60 std::vector<unsigned char> m_buffer;
61 ABWZlibStream(const ABWZlibStream &);
62 ABWZlibStream &operator=(const ABWZlibStream &);
63 };
64
65 } // namespace libabw
66
67 #endif // __ABWZLIBSTREAM_H__
68 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libabw::ABWZlibStream::read
const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: ABWZlibStream.cpp:97
libabw::ABWZlibStream::operator=
ABWZlibStream & operator=(const ABWZlibStream &)
libabw::ABWZlibStream::m_offset
volatile long m_offset
Definition: ABWZlibStream.h:59
libabw::ABWZlibStream::isEnd
bool isEnd()
Definition: ABWZlibStream.cpp:157
libabw::ABWZlibStream::getSubStreamById
librevenge::RVNGInputStream * getSubStreamById(unsigned)
Definition: ABWZlibStream.h:45
libabw
Definition: ABWCollector.h:17
libabw::ABWZlibStream
Definition: ABWZlibStream.h:19
libabw::ABWZlibStream::~ABWZlibStream
~ABWZlibStream()
Definition: ABWZlibStream.h:23
libabw::ABWZlibStream::m_input
librevenge::RVNGInputStream * m_input
Definition: ABWZlibStream.h:58
libabw::ABWZlibStream::ABWZlibStream
ABWZlibStream(librevenge::RVNGInputStream *input)
Definition: ABWZlibStream.cpp:79
libabw::ABWZlibStream::subStreamCount
unsigned subStreamCount()
Definition: ABWZlibStream.h:29
libabw::ABWZlibStream::existsSubStream
bool existsSubStream(const char *)
Definition: ABWZlibStream.h:37
libabw::ABWZlibStream::getSubStreamByName
librevenge::RVNGInputStream * getSubStreamByName(const char *)
Definition: ABWZlibStream.h:41
libabw::ABWZlibStream::tell
long tell()
Definition: ABWZlibStream.cpp:149
libabw::ABWZlibStream::subStreamName
const char * subStreamName(unsigned)
Definition: ABWZlibStream.h:33
libabw::ABWZlibStream::seek
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: ABWZlibStream.cpp:125
libabw::ABWZlibStream::isStructured
bool isStructured()
Definition: ABWZlibStream.h:25
libabw::ABWZlibStream::getSize
unsigned long getSize() const
Definition: ABWZlibStream.h:53
libabw::ABWZlibStream::m_buffer
std::vector< unsigned char > m_buffer
Definition: ABWZlibStream.h:60