VSDInternalStream.h Source File documentation

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

VSDInternalStream.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 libvisio 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
11 #ifndef __VSDINTERNALSTREAM_H__
12 #define __VSDINTERNALSTREAM_H__
13
14 #include <stddef.h>
15 #include <vector>
16 #include <librevenge-stream/librevenge-stream.h>
17
18 class VSDInternalStream : public librevenge::RVNGInputStream
19 {
20 public:
21 VSDInternalStream(librevenge::RVNGInputStream *input, unsigned long size, bool compressed=false);
22 ~VSDInternalStream() {}
23
24 bool isStructured()
25 {
26 return false;
27 }
28 unsigned subStreamCount()
29 {
30 return 0;
31 }
32 const char *subStreamName(unsigned)
33 {
34 return 0;
35 }
36 bool existsSubStream(const char *)
37 {
38 return false;
39 }
40 librevenge::RVNGInputStream *getSubStreamByName(const char *)
41 {
42 return 0;
43 }
44 librevenge::RVNGInputStream *getSubStreamById(unsigned)
45 {
46 return 0;
47 }
48 const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
49 int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType);
50 long tell();
51 bool isEnd();
52 unsigned long getSize() const
53 {
54 return m_buffer.size();
55 };
56
57 private:
58 volatile long m_offset;
59 std::vector<unsigned char> m_buffer;
60 VSDInternalStream(const VSDInternalStream &);
61 VSDInternalStream &operator=(const VSDInternalStream &);
62 };
63
64 #endif
65 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
VSDInternalStream::getSubStreamById
librevenge::RVNGInputStream * getSubStreamById(unsigned)
Definition: VSDInternalStream.h:44
VSDInternalStream::getSubStreamByName
librevenge::RVNGInputStream * getSubStreamByName(const char *)
Definition: VSDInternalStream.h:40
VSDInternalStream::seek
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: VSDInternalStream.cpp:103
VSDInternalStream::~VSDInternalStream
~VSDInternalStream()
Definition: VSDInternalStream.h:22
VSDInternalStream::subStreamName
const char * subStreamName(unsigned)
Definition: VSDInternalStream.h:32
VSDInternalStream::isEnd
bool isEnd()
Definition: VSDInternalStream.cpp:129
VSDInternalStream::m_buffer
std::vector< unsigned char > m_buffer
Definition: VSDInternalStream.h:59
VSDInternalStream::operator=
VSDInternalStream & operator=(const VSDInternalStream &)
VSDInternalStream::getSize
unsigned long getSize() const
Definition: VSDInternalStream.h:52
VSDInternalStream::tell
long tell()
Definition: VSDInternalStream.cpp:124
VSDInternalStream::isStructured
bool isStructured()
Definition: VSDInternalStream.h:24
VSDInternalStream::subStreamCount
unsigned subStreamCount()
Definition: VSDInternalStream.h:28
VSDInternalStream::read
const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: VSDInternalStream.cpp:78
VSDInternalStream::m_offset
volatile long m_offset
Definition: VSDInternalStream.h:55
VSDInternalStream::existsSubStream
bool existsSubStream(const char *)
Definition: VSDInternalStream.h:36
VSDInternalStream
Definition: VSDInternalStream.h:18
VSDInternalStream::VSDInternalStream
VSDInternalStream(librevenge::RVNGInputStream *input, unsigned long size, bool compressed=false)
Definition: VSDInternalStream.cpp:14