IWORKSubDirStream.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 IWORKSUBDIRSTREAM_H_INCLUDED
11 #define IWORKSUBDIRSTREAM_H_INCLUDED
12
13 #include <string>
14
15 #include "libetonyek_utils.h"
16
17 namespace libetonyek
18 {
19
20 class IWORKSubDirStream : public librevenge::RVNGInputStream
21 {
22 public:
23 IWORKSubDirStream(const RVNGInputStreamPtr_t &parent, const std::string &dir);
24 ~IWORKSubDirStream() override;
25
26 bool isStructured() override;
27 unsigned subStreamCount() override;
28 const char *subStreamName(unsigned id) override;
29 bool existsSubStream(const char *) override;
30
31 librevenge::RVNGInputStream *getSubStreamByName(const char *name) override;
32 librevenge::RVNGInputStream *getSubStreamById(unsigned id) override;
33
34 const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) override;
35 int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
36 long tell() override;
37 bool isEnd() override;
38
39 private:
40 const RVNGInputStreamPtr_t m_parent;
41 const std::string m_dir;
42 };
43
44 }
45
46 #endif // IWORKSUBDIRSTREAM_H_INCLUDED
47
48 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKSubDirStream::~IWORKSubDirStream
~IWORKSubDirStream() override
Definition: IWORKSubDirStream.cpp:38
libetonyek::IWORKSubDirStream::isStructured
bool isStructured() override
Definition: IWORKSubDirStream.cpp:42
libetonyek::IWORKSubDirStream::m_parent
const RVNGInputStreamPtr_t m_parent
Definition: IWORKSubDirStream.h:40
libetonyek::IWORKSubDirStream::IWORKSubDirStream
IWORKSubDirStream(const RVNGInputStreamPtr_t &parent, const std::string &dir)
Definition: IWORKSubDirStream.cpp:30
libetonyek::IWORKSubDirStream::getSubStreamById
librevenge::RVNGInputStream * getSubStreamById(unsigned id) override
Definition: IWORKSubDirStream.cpp:72
libetonyek::IWORKSubDirStream::getSubStreamByName
librevenge::RVNGInputStream * getSubStreamByName(const char *name) override
Definition: IWORKSubDirStream.cpp:66
libetonyek::IWORKSubDirStream::read
const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead) override
Definition: IWORKSubDirStream.cpp:79
name
const char * name
Definition: IWORKToken.cpp:43
libetonyek::IWORKSubDirStream::seek
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override
Definition: IWORKSubDirStream.cpp:84
libetonyek::IWORKSubDirStream::isEnd
bool isEnd() override
Definition: IWORKSubDirStream.cpp:94
libetonyek::RVNGInputStreamPtr_t
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libetonyek_utils.h:82
libetonyek::IWORKSubDirStream::tell
long tell() override
Definition: IWORKSubDirStream.cpp:89
libetonyek::IWORKSubDirStream::subStreamName
const char * subStreamName(unsigned id) override
Definition: IWORKSubDirStream.cpp:53
libetonyek::IWORKToken::string
Definition: IWORKToken.h:411
libetonyek::IWORKSubDirStream::existsSubStream
bool existsSubStream(const char *) override
Definition: IWORKSubDirStream.cpp:60
libetonyek::IWORKSubDirStream
Definition: IWORKSubDirStream.h:20
libetonyek::IWORKSubDirStream::subStreamCount
unsigned subStreamCount() override
Definition: IWORKSubDirStream.cpp:47
libetonyek::IWORKToken::offset
Definition: IWORKToken.h:587
libetonyek_utils.h
libetonyek::IWORKSubDirStream::m_dir
const std::string m_dir
Definition: IWORKSubDirStream.h:41