Coverage Report

Created: 2026-09-06 07:18

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libvisio/src/lib/VSDInternalStream.h
Line
Count
Source
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
9.39M
  ~VSDInternalStream() override {}
23
24
  bool isStructured() override
25
0
  {
26
0
    return false;
27
0
  }
28
  unsigned subStreamCount() override
29
0
  {
30
0
    return 0;
31
0
  }
32
  const char *subStreamName(unsigned) override
33
0
  {
34
0
    return nullptr;
35
0
  }
36
  bool existsSubStream(const char *) override
37
0
  {
38
0
    return false;
39
0
  }
40
  librevenge::RVNGInputStream *getSubStreamByName(const char *) override
41
0
  {
42
0
    return nullptr;
43
0
  }
44
  librevenge::RVNGInputStream *getSubStreamById(unsigned) override
45
0
  {
46
0
    return nullptr;
47
0
  }
48
  const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) override;
49
  int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
50
  long tell() override;
51
  bool isEnd() override;
52
  unsigned long getSize() const
53
9.38M
  {
54
9.38M
    return m_buffer.size();
55
9.38M
  };
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: */