IWASnappyStream.h Source File documentation

IWASnappyStream.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 libetonyek 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 IWASNAPPYSTREAM_H_INCLUDED
11#define IWASNAPPYSTREAM_H_INCLUDED
12
13#include <librevenge-stream/librevenge-stream.h>
14
15#include "libetonyek_utils.h"
16
17namespace libetonyek
18{
19
20 class IWASnappyStream : public librevenge::RVNGInputStream
21{
22public:
23 explicit IWASnappyStream(const RVNGInputStreamPtr_t &stream);
24 ~IWASnappyStream() override;
25
26 // for unit tests
27 static RVNGInputStreamPtr_t uncompressBlock(const RVNGInputStreamPtr_t &block);
28
29 bool isStructured() override;
30 unsigned subStreamCount() override;
31 const char *subStreamName(unsigned id) override;
32 bool existsSubStream(const char *name) override;
33
34 librevenge::RVNGInputStream *getSubStreamByName(const char *name) override;
35 librevenge::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
42private:
43 RVNGInputStreamPtr_t m_stream;
44};
45
46}
47
48#endif // IWASNAPPYSTREAM_H_INCLUDED
49
50/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::IWASnappyStream::getSubStreamByName
librevenge::RVNGInputStream * getSubStreamByName(const char *name) override
Definition IWASnappyStream.cpp:205
libetonyek::IWASnappyStream::IWASnappyStream
IWASnappyStream(const RVNGInputStreamPtr_t &stream)
Definition IWASnappyStream.cpp:165
libetonyek::IWASnappyStream::getSubStreamById
librevenge::RVNGInputStream * getSubStreamById(unsigned id) override
Definition IWASnappyStream.cpp:210
libetonyek::IWASnappyStream::existsSubStream
bool existsSubStream(const char *name) override
Definition IWASnappyStream.cpp:200
libetonyek::IWASnappyStream::tell
long tell() override
Definition IWASnappyStream.cpp:225
libetonyek::IWASnappyStream::seek
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override
Definition IWASnappyStream.cpp:220
libetonyek::IWASnappyStream::isEnd
bool isEnd() override
Definition IWASnappyStream.cpp:230
libetonyek::IWASnappyStream::isStructured
bool isStructured() override
Definition IWASnappyStream.cpp:185
libetonyek::IWASnappyStream::read
const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead) override
Definition IWASnappyStream.cpp:215
libetonyek::IWASnappyStream::m_stream
RVNGInputStreamPtr_t m_stream
Definition IWASnappyStream.h:43
libetonyek::IWASnappyStream::~IWASnappyStream
~IWASnappyStream() override
Definition IWASnappyStream.cpp:174
libetonyek::IWASnappyStream::subStreamName
const char * subStreamName(unsigned id) override
Definition IWASnappyStream.cpp:195
libetonyek::IWASnappyStream::subStreamCount
unsigned subStreamCount() override
Definition IWASnappyStream.cpp:190
libetonyek::IWASnappyStream::uncompressBlock
static RVNGInputStreamPtr_t uncompressBlock(const RVNGInputStreamPtr_t &block)
Definition IWASnappyStream.cpp:178
libetonyek_utils.h
libetonyek::IWORKToken::offset
@ offset
Definition IWORKToken.h:594
libetonyek::IWORKToken::name
@ name
Definition IWORKToken.h:585
libetonyek
Definition IWORKBezierElement.cpp:21
libetonyek::RVNGInputStreamPtr_t
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition libetonyek_utils.h:82