Main Page
Namespaces
Classes
Files
File List
File Members
CDRInternalStream.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 libcdr 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 __CDRINTERNALSTREAM_H__
11
#define __CDRINTERNALSTREAM_H__
12
13
#include <vector>
14
15
#include <libwpd-stream/libwpd-stream.h>
16
17
namespace
libcdr
18
{
19
20
class
CDRInternalStream
:
public
WPXInputStream
21
{
22
public
:
23
CDRInternalStream
(WPXInputStream *input,
unsigned
long
size,
bool
compressed=
false
);
24
CDRInternalStream
(
const
std::vector<unsigned char> &buffer);
25
~CDRInternalStream
() {}
26
27
bool
isOLEStream
()
28
{
29
return
false
;
30
}
31
WPXInputStream *
getDocumentOLEStream
(
const
char
*)
32
{
33
return
0;
34
}
35
36
const
unsigned
char
*
read
(
unsigned
long
numBytes,
unsigned
long
&numBytesRead);
37
int
seek
(
long
offset, WPX_SEEK_TYPE seekType);
38
long
tell
();
39
bool
atEOS
();
40
unsigned
long
getSize
()
const
41
{
42
return
m_buffer
.size();
43
}
44
45
private
:
46
volatile
long
m_offset
;
47
std::vector<unsigned char>
m_buffer
;
48
CDRInternalStream
(
const
CDRInternalStream
&);
49
CDRInternalStream
&
operator=
(
const
CDRInternalStream
&);
50
};
51
52
}
// namespace libcdr
53
54
#endif
55
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Generated for libcdr by
doxygen
1.8.3.1