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 
17 namespace libebook
18 {
19 
20 class PDBLZ77Stream : public librevenge::RVNGInputStream
21 {
22 // disable copying
25 
26 public:
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 
42 private:
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: */
PDBLZ77Stream.h
libebook::PDBLZ77Stream::PDBLZ77Stream
PDBLZ77Stream(const PDBLZ77Stream &other)
libebook::PDBLZ77Stream::subStreamCount
unsigned subStreamCount() override
Definition: PDBLZ77Stream.cpp:114
libebook::PDBLZ77Stream::~PDBLZ77Stream
~PDBLZ77Stream() override
Definition: PDBLZ77Stream.cpp:105
libebook::PDBLZ77Stream::getSubStreamById
RVNGInputStream * getSubStreamById(unsigned id) override
Definition: PDBLZ77Stream.cpp:134
m_stream
std::unique_ptr< librevenge::RVNGInputStream > m_stream
Definition: PeanutPressParser.cpp:74
libebook
Definition: BBeBCollector.cpp:19
libebook::PDBLZ77Stream
Definition: PDBLZ77Stream.h:21
libebook_utils.h
libebook::EBOOKMemoryStream
Definition: EBOOKMemoryStream.h:21
libebook::PDBLZ77Stream::tell
long tell() override
Definition: PDBLZ77Stream.cpp:149
EBOOKMemoryStream.h
offset
unsigned offset
Definition: SoftBookParser.cpp:74
libebook::EBOOKHTMLToken::i
@ i
Definition: EBOOKHTMLToken.h:86
stream
RVNGInputStreamPtr_t stream
Definition: HTMLHelpStream.cpp:79
libebook::PDBLZ77Stream::isStructured
bool isStructured() override
Definition: PDBLZ77Stream.cpp:109
libebook::PDBLZ77Stream::m_stream
std::unique_ptr< librevenge::RVNGInputStream > m_stream
Definition: PDBLZ77Stream.h:43
libebook::readU8
uint8_t readU8(librevenge::RVNGInputStream *input, bool)
Definition: libebook_utils.cpp:45
libebook::EndOfStreamException
Definition: libebook_utils.h:100
name
string name
Definition: HTMLHelpStream.cpp:80
libebook::PDBLZ77Stream::subStreamName
const char * subStreamName(unsigned id) override
Definition: PDBLZ77Stream.cpp:119
libebook::PDBLZ77Stream::read
const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead) override
Definition: PDBLZ77Stream.cpp:139
libebook::PDBLZ77Stream::existsSubStream
bool existsSubStream(const char *name) override
Definition: PDBLZ77Stream.cpp:124
libebook::PDBLZ77Stream::isEnd
bool isEnd() override
Definition: PDBLZ77Stream.cpp:154
libebook::PDBLZ77Stream::getSubStreamByName
librevenge::RVNGInputStream * getSubStreamByName(const char *name) override
Definition: PDBLZ77Stream.cpp:129
libebook::PDBLZ77Stream::seek
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override
Definition: PDBLZ77Stream.cpp:144
libebook::GenericException
Definition: libebook_utils.h:106
length
unsigned length
Definition: SoftBookParser.cpp:73
libebook::PDBLZ77Stream::operator=
PDBLZ77Stream & operator=(const PDBLZ77Stream &other)

Generated for libe-book by doxygen 1.8.20