PDXLZ77Stream.h Source File documentation

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: */
libebook::PDXLZ77Stream
Definition: PDXLZ77Stream.h:20
libebook::PDXLZ77Stream::subStreamName
virtual const char * subStreamName(unsigned id)
Definition: PDXLZ77Stream.cpp:119
libebook::PDXLZ77Stream::getSubStreamByName
virtual librevenge::RVNGInputStream * getSubStreamByName(const char *name)
Definition: PDXLZ77Stream.cpp:129
libebook::PDXLZ77Stream::isStructured
virtual bool isStructured()
Definition: PDXLZ77Stream.cpp:109
libebook::PDXLZ77Stream::PDXLZ77Stream
PDXLZ77Stream(const PDXLZ77Stream &other)
libebook::PDXLZ77Stream::existsSubStream
virtual bool existsSubStream(const char *name)
Definition: PDXLZ77Stream.cpp:124
offset
unsigned offset
Definition: IMPParser.cpp:73
libebook::PDXLZ77Stream::tell
virtual long tell()
Definition: PDXLZ77Stream.cpp:149
name
string name
Definition: CHMStream.cpp:80
libebook::PDXLZ77Stream::getSubStreamById
virtual RVNGInputStream * getSubStreamById(unsigned id)
Definition: PDXLZ77Stream.cpp:134
libebook::PDXLZ77Stream::isEnd
virtual bool isEnd()
Definition: PDXLZ77Stream.cpp:154
libebook
Definition: CHMParser.cpp:20
libebook::PDXLZ77Stream::operator=
PDXLZ77Stream & operator=(const PDXLZ77Stream &other)
stream
RVNGInputStreamPtr_t stream
Definition: CHMStream.cpp:79
libebook::PDXLZ77Stream::subStreamCount
virtual unsigned subStreamCount()
Definition: PDXLZ77Stream.cpp:114
libebook::PDXLZ77Stream::seek
virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: PDXLZ77Stream.cpp:144
libebook::PDXLZ77Stream::~PDXLZ77Stream
virtual ~PDXLZ77Stream()
Definition: PDXLZ77Stream.cpp:105
libebook::PDXLZ77Stream::read
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: PDXLZ77Stream.cpp:139
libebook::PDXLZ77Stream::m_stream
boost::scoped_ptr< librevenge::RVNGInputStream > m_stream
Definition: PDXLZ77Stream.h:43