RBStream.h Source File documentation

RBStream.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 * For further information visit http://libebook.sourceforge.net
8 */
9
10 #ifndef RBSTREAM_H_INCLUDED
11 #define RBSTREAM_H_INCLUDED
12
13 #include <boost/scoped_ptr.hpp>
14
15 #include <librevenge-stream/librevenge-stream.h>
16
17 #include "libebook_utils.h"
18
19 namespace libebook
20 {
21
22 class RBHeader;
23
24 class RBStream : public librevenge::RVNGInputStream
25 {
26 // disable copying
27 RBStream(const RBStream &other);
28 RBStream &operator=(const RBStream &other);
29
30 struct Impl;
31
32 public:
33 RBStream(const RVNGInputStreamPtr_t &input, const RBHeader &header);
34 virtual ~RBStream();
35
36 virtual bool isStructured();
37 virtual unsigned subStreamCount();
38 virtual const char *subStreamName(unsigned id);
39 virtual bool existsSubStream(const char *name);
40 virtual librevenge::RVNGInputStream *getSubStreamByName(const char *name);
41 virtual librevenge::RVNGInputStream *getSubStreamById(unsigned id);
42
43 virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
44 virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType);
45 virtual long tell();
46 virtual bool isEnd();
47
48 private:
49 boost::scoped_ptr<Impl> m_impl;
50 };
51
52 }
53
54 #endif // RBSTREAM_H_INCLUDED
55
56 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::EBOOKHTMLToken::input
Definition: EBOOKHTMLToken.h:91
libebook::RVNGInputStreamPtr_t
boost::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libebook_utils.h:82
libebook::RBStream
Definition: RBStream.h:24
libebook::RBStream::Impl
Definition: RBStream.cpp:97
libebook::RBStream::subStreamName
virtual const char * subStreamName(unsigned id)
Definition: RBStream.cpp:130
libebook::RBStream::getSubStreamByName
virtual librevenge::RVNGInputStream * getSubStreamByName(const char *name)
Definition: RBStream.cpp:142
libebook::RBStream::existsSubStream
virtual bool existsSubStream(const char *name)
Definition: RBStream.cpp:137
libebook::RBStream::tell
virtual long tell()
Definition: RBStream.cpp:167
libebook::RBStream::subStreamCount
virtual unsigned subStreamCount()
Definition: RBStream.cpp:125
libebook_utils.h
libebook::RBStream::isStructured
virtual bool isStructured()
Definition: RBStream.cpp:120
libebook::RBHeader
Definition: RBHeader.h:21
libebook::RBStream::~RBStream
virtual ~RBStream()
Definition: RBStream.cpp:116
libebook::RBStream::operator=
RBStream & operator=(const RBStream &other)
libebook::RBStream::RBStream
RBStream(const RBStream &other)
libebook::RBStream::seek
virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: RBStream.cpp:162
libebook::EBOOKHTMLToken::header
Definition: EBOOKHTMLToken.h:84
offset
unsigned offset
Definition: IMPParser.cpp:73
name
string name
Definition: CHMStream.cpp:80
libebook::RBStream::read
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: RBStream.cpp:157
libebook::RBStream::m_impl
boost::scoped_ptr< Impl > m_impl
Definition: RBStream.h:49
libebook::RBStream::getSubStreamById
virtual librevenge::RVNGInputStream * getSubStreamById(unsigned id)
Definition: RBStream.cpp:150
libebook
Definition: CHMParser.cpp:20
libebook::RBStream::isEnd
virtual bool isEnd()
Definition: RBStream.cpp:172