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

Generated for libe-book by doxygen 1.8.8