Scribus
Open source desktop publishing at your fingertips
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
scstreamfilter.h
1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
7
8
#ifndef SCSTREAMFILTER_H
9
#define SCSTREAMFILTER_H
10
11
class
QByteArray;
12
class
QDataStream;
13
14
class
ScStreamFilter
15
{
16
protected
:
17
18
typedef
enum
19
{
20
FilterToStream = 0,
21
FilterToFilter = 1
22
} FilterMode;
23
24
int
m_writtenToStream;
25
FilterMode m_filterMode;
26
QDataStream* m_dataStream;
27
ScStreamFilter
* m_filter;
28
29
bool
writeDataInternal(
const
char
* data,
int
dataLen);
30
31
public
:
32
33
ScStreamFilter
(QDataStream* stream);
34
ScStreamFilter
(
ScStreamFilter
* filter);
35
virtual
~
ScStreamFilter
() {};
36
37
virtual
bool
openFilter (
void
);
38
virtual
bool
closeFilter(
void
);
39
40
virtual
bool
writeData(
const
QByteArray& data);
41
virtual
bool
writeData(
const
char
* data,
int
dataLen) = 0;
42
43
int
writtenToStream(
void
);
44
};
45
46
class
ScNullEncodeFilter
:
public
ScStreamFilter
47
{
48
public
:
49
ScNullEncodeFilter
(QDataStream* stream) :
ScStreamFilter
(stream) {};
50
ScNullEncodeFilter
(
ScStreamFilter
* filter) :
ScStreamFilter
(filter) {};
51
52
virtual
bool
writeData(
const
char
* data,
int
dataLen) {
return
writeDataInternal(data, dataLen); }
53
};
54
55
#endif
ScNullEncodeFilter
Definition:
scstreamfilter.h:46
ScStreamFilter
Definition:
scstreamfilter.h:14
scribus
scstreamfilter.h
Generated on Tue Sep 29 2015 09:15:11 for Scribus by
1.8.9.1