PDBLZ77Stream.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 libe-book 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 PDBLZ77STREAM_H_INCLUDED
11#define PDBLZ77STREAM_H_INCLUDED
12
13#include <memory>
14
15#include <librevenge-stream/librevenge-stream.h>
16
17namespace libebook
18{
19
20class PDBLZ77Stream : public librevenge::RVNGInputStream
21{
22// disable copying
25
26public:
27 PDBLZ77Stream(librevenge::RVNGInputStream *stream);
28 ~PDBLZ77Stream() override;
29
30 bool isStructured() override;
31 unsigned subStreamCount() override;
32 const char *subStreamName(unsigned id) override;
33 bool existsSubStream(const char *name) override;
34 librevenge::RVNGInputStream *getSubStreamByName(const char *name) override;
35 RVNGInputStream *getSubStreamById(unsigned id) override;
36
37 const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) override;
38 int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
39 long tell() override;
40 bool isEnd() override;
41
42private:
43 std::unique_ptr<librevenge::RVNGInputStream> m_stream;
44};
45
46}
47
48#endif // PDBLZ77STREAM_H_INCLUDED
49
50/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
RVNGInputStreamPtr_t stream
Definition HTMLHelpStream.cpp:79
string name
Definition HTMLHelpStream.cpp:80
unsigned offset
Definition SoftBookParser.cpp:74
Definition PDBLZ77Stream.h:21
unsigned subStreamCount() override
Definition PDBLZ77Stream.cpp:114
const char * subStreamName(unsigned id) override
Definition PDBLZ77Stream.cpp:119
bool isEnd() override
Definition PDBLZ77Stream.cpp:154
long tell() override
Definition PDBLZ77Stream.cpp:149
bool isStructured() override
Definition PDBLZ77Stream.cpp:109
std::unique_ptr< librevenge::RVNGInputStream > m_stream
Definition PDBLZ77Stream.h:43
librevenge::RVNGInputStream * getSubStreamByName(const char *name) override
Definition PDBLZ77Stream.cpp:129
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override
Definition PDBLZ77Stream.cpp:144
RVNGInputStream * getSubStreamById(unsigned id) override
Definition PDBLZ77Stream.cpp:134
PDBLZ77Stream & operator=(const PDBLZ77Stream &other)
const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead) override
Definition PDBLZ77Stream.cpp:139
~PDBLZ77Stream() override
Definition PDBLZ77Stream.cpp:105
PDBLZ77Stream(const PDBLZ77Stream &other)
bool existsSubStream(const char *name) override
Definition PDBLZ77Stream.cpp:124
Definition BBeBCollector.cpp:19

Generated for libe-book by doxygen 1.9.7