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
23  PDBLZ77Stream(const PDBLZ77Stream &other);
24  PDBLZ77Stream &operator=(const PDBLZ77Stream &other);
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(const PDBLZ77Stream &other)
unsigned offset
Definition: SoftBookParser.cpp:74
librevenge::RVNGInputStream * getSubStreamByName(const char *name) override
Definition: PDBLZ77Stream.cpp:129
RVNGInputStreamPtr_t stream
Definition: HTMLHelpStream.cpp:79
const char * subStreamName(unsigned id) override
Definition: PDBLZ77Stream.cpp:119
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override
Definition: PDBLZ77Stream.cpp:144
bool isStructured() override
Definition: PDBLZ77Stream.cpp:109
const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead) override
Definition: PDBLZ77Stream.cpp:139
PDBLZ77Stream & operator=(const PDBLZ77Stream &other)
unsigned subStreamCount() override
Definition: PDBLZ77Stream.cpp:114
std::unique_ptr< librevenge::RVNGInputStream > m_stream
Definition: PDBLZ77Stream.h:43
const char * name
Definition: EBOOKHTMLToken.cpp:44
bool isEnd() override
Definition: PDBLZ77Stream.cpp:154
~PDBLZ77Stream() override
Definition: PDBLZ77Stream.cpp:105
Definition: BBeBCollector.cpp:18
Definition: PDBLZ77Stream.h:20
bool existsSubStream(const char *name) override
Definition: PDBLZ77Stream.cpp:124
long tell() override
Definition: PDBLZ77Stream.cpp:149
RVNGInputStream * getSubStreamById(unsigned id) override
Definition: PDBLZ77Stream.cpp:134

Generated for libe-book by doxygen 1.8.14