aboutsummaryrefslogtreecommitdiff
path: root/src/filter.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-06-07 19:56:20 +0000
committerMike Buland <eichlan@xagasoft.com>2007-06-07 19:56:20 +0000
commit9e8a4944e50fab432012878c66e1bdac20649f76 (patch)
tree412b0d49ae4086bb330045f9956513397b866807 /src/filter.cpp
parentc2e3879b965d297604804f03271ac71c8c5c81f3 (diff)
downloadlibbu++-9e8a4944e50fab432012878c66e1bdac20649f76.tar.gz
libbu++-9e8a4944e50fab432012878c66e1bdac20649f76.tar.bz2
libbu++-9e8a4944e50fab432012878c66e1bdac20649f76.tar.xz
libbu++-9e8a4944e50fab432012878c66e1bdac20649f76.zip
The Stream Filter archetecture is finished, it's actually much cooler than I
had anticipated, and much cleaner. I'll have to add some documentation to it, because it's not really obvious how any of it fits together from the outset, although I have to say that the bzip2 test program is the easiest general bzip2 compression program I've ever made...it just goes :) Decompression in Bu::BZip2 isn't finished yet, but that's ok, it's coming soon.
Diffstat (limited to 'src/filter.cpp')
-rw-r--r--src/filter.cpp77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/filter.cpp b/src/filter.cpp
new file mode 100644
index 0000000..d3faa00
--- /dev/null
+++ b/src/filter.cpp
@@ -0,0 +1,77 @@
1#include "bu/filter.h"
2
3Bu::Filter::Filter( Bu::Stream &rNext ) :
4 rNext( rNext )
5{
6}
7
8Bu::Filter::~Filter()
9{
10 printf("-> Bu::Filter::~Filter()\n");
11}
12/*
13void Bu::Filter::start()
14{
15 printf("-> Bu::Filter::start()\n");
16}
17
18void Bu::Filter::stop()
19{
20}*/
21
22void Bu::Filter::close()
23{
24 stop();
25 rNext.close();
26}
27
28long Bu::Filter::tell()
29{
30 return rNext.tell();
31}
32
33void Bu::Filter::seek( long offset )
34{
35 rNext.seek( offset );
36}
37
38void Bu::Filter::setPos( long pos )
39{
40 rNext.setPos( pos );
41}
42
43void Bu::Filter::setPosEnd( long pos )
44{
45 rNext.setPosEnd( pos );
46}
47
48bool Bu::Filter::isEOS()
49{
50 return rNext.isEOS();
51}
52
53bool Bu::Filter::canRead()
54{
55 return rNext.canRead();
56}
57
58bool Bu::Filter::canWrite()
59{
60 return rNext.canWrite();
61}
62
63bool Bu::Filter::canSeek()
64{
65 return rNext.canSeek();
66}
67
68bool Bu::Filter::isBlocking()
69{
70 return rNext.isBlocking();
71}
72
73void Bu::Filter::setBlocking( bool bBlocking )
74{
75 rNext.setBlocking( bBlocking );
76}
77