Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
KEYMemoryStream.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 KEYMEMORYSTREAM_H_INCLUDED
11
#define KEYMEMORYSTREAM_H_INCLUDED
12
13
#include <vector>
14
15
#include "
libetonyek_utils.h
"
16
17
namespace
libetonyek
18
{
19
20
class
KEYMemoryStream
:
public
WPXInputStream
21
{
22
// -Weffc++
23
KEYMemoryStream
(
const
KEYMemoryStream
&other);
24
KEYMemoryStream
&
operator=
(
const
KEYMemoryStream
&other);
25
26
public
:
27
explicit
KEYMemoryStream
(
const
WPXInputStreamPtr_t
&input);
28
KEYMemoryStream
(
const
WPXInputStreamPtr_t
&input,
unsigned
length
);
29
explicit
KEYMemoryStream
(std::vector<unsigned char> &
data
);
30
KEYMemoryStream
(
const
unsigned
char
*data,
unsigned
length);
31
virtual
~KEYMemoryStream
();
32
33
virtual
bool
isOLEStream
();
34
virtual
WPXInputStream *
getDocumentOLEStream
(
const
char
*
name
);
35
36
virtual
const
unsigned
char
*
read
(
unsigned
long
numBytes,
unsigned
long
&numBytesRead);
37
virtual
int
seek
(
long
offset
, WPX_SEEK_TYPE seekType);
38
virtual
long
tell
();
39
virtual
bool
atEOS
();
40
41
private
:
42
void
assign
(
const
unsigned
char
*data,
unsigned
length);
43
void
read
(
const
WPXInputStreamPtr_t
&input,
unsigned
length);
44
45
private
:
46
const
unsigned
char
*
m_data
;
47
long
m_length
;
48
long
m_pos
;
49
};
50
51
}
52
53
#endif // KEYMEMORYSTREAM_H_INCLUDED
54
55
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Generated for libetonyek by
doxygen
1.8.3.1