LITStream.h Source File documentation

LITStream.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 LITSTREAM_H_INCLUDED
11 #define LITSTREAM_H_INCLUDED
12
13 #include <librevenge-stream/librevenge-stream.h>
14
15 #include "libebook_utils.h"
16
17 namespace libebook
18 {
19
20 class LITStream : public librevenge::RVNGInputStream
21 {
22 // disable copying
23 LITStream(const LITStream &other);
24 LITStream &operator=(const LITStream &other);
25
26 struct Impl;
27
28 public:
29 LITStream(const RVNGInputStreamPtr_t &input);
30 virtual ~LITStream();
31
32 virtual bool isStructured();
33 virtual unsigned subStreamCount();
34 virtual const char *subStreamName(unsigned id);
35 virtual bool existsSubStream(const char *name);
36 virtual librevenge::RVNGInputStream *getSubStreamByName(const char *name);
37 virtual librevenge::RVNGInputStream *getSubStreamById(unsigned id);
38
39 virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
40 virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType);
41 virtual long tell();
42 virtual bool isEnd();
43
44 private:
45 std::unique_ptr<Impl> m_impl;
46 };
47
48 }
49
50 #endif // LITSTREAM_H_INCLUDED
51
52 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::LITStream::tell
virtual long tell()
Definition: LITStream.cpp:87
libebook::LITStream::subStreamCount
virtual unsigned subStreamCount()
Definition: LITStream.cpp:43
libebook::LITStream::subStreamName
virtual const char * subStreamName(unsigned id)
Definition: LITStream.cpp:49
libebook::EBOOKHTMLToken::input
Definition: EBOOKHTMLToken.h:89
libebook::LITStream
Definition: LITStream.h:20
offset
unsigned offset
Definition: SoftBookParser.cpp:74
libebook::RVNGInputStreamPtr_t
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libebook_utils.h:54
libebook::LITStream::operator=
LITStream & operator=(const LITStream &other)
libebook::LITStream::existsSubStream
virtual bool existsSubStream(const char *name)
Definition: LITStream.cpp:56
libebook_utils.h
libebook::LITStream::m_impl
std::unique_ptr< Impl > m_impl
Definition: LITStream.h:45
libebook::LITStream::read
virtual const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: LITStream.cpp:77
libebook::LITStream::LITStream
LITStream(const LITStream &other)
name
const char * name
Definition: EBOOKHTMLToken.cpp:44
libebook::LITStream::isStructured
virtual bool isStructured()
Definition: LITStream.cpp:38
libebook::LITStream::isEnd
virtual bool isEnd()
Definition: LITStream.cpp:92
libebook
Definition: BBeBCollector.cpp:18
libebook::LITStream::getSubStreamByName
virtual librevenge::RVNGInputStream * getSubStreamByName(const char *name)
Definition: LITStream.cpp:63
libebook::LITStream::seek
virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: LITStream.cpp:82
libebook::LITStream::Impl
Definition: LITStream.cpp:17
libebook::LITStream::~LITStream
virtual ~LITStream()
Definition: LITStream.cpp:34
libebook::LITStream::getSubStreamById
virtual librevenge::RVNGInputStream * getSubStreamById(unsigned id)
Definition: LITStream.cpp:70