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);
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;
62 };
63 
64 #endif
65 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
librevenge::RVNGInputStream * getSubStreamById(unsigned)
Definition: VSDInternalStream.h:44
librevenge::RVNGInputStream * getSubStreamByName(const char *)
Definition: VSDInternalStream.h:40
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
Definition: VSDInternalStream.cpp:104
~VSDInternalStream()
Definition: VSDInternalStream.h:22
const char * subStreamName(unsigned)
Definition: VSDInternalStream.h:32
bool isEnd()
Definition: VSDInternalStream.cpp:130
std::vector< unsigned char > m_buffer
Definition: VSDInternalStream.h:59
VSDInternalStream & operator=(const VSDInternalStream &)
unsigned long getSize() const
Definition: VSDInternalStream.h:52
long tell()
Definition: VSDInternalStream.cpp:125
bool isStructured()
Definition: VSDInternalStream.h:24
unsigned subStreamCount()
Definition: VSDInternalStream.h:28
const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead)
Definition: VSDInternalStream.cpp:79
volatile long m_offset
Definition: VSDInternalStream.h:55
bool existsSubStream(const char *)
Definition: VSDInternalStream.h:36
Definition: VSDInternalStream.h:18
VSDInternalStream(librevenge::RVNGInputStream *input, unsigned long size, bool compressed=false)
Definition: VSDInternalStream.cpp:14

Generated for libvisio by doxygen 1.8.6