summaryrefslogtreecommitdiff
path: root/src/streamstack.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-08-21 04:39:47 +0000
committerMike Buland <eichlan@xagasoft.com>2010-08-21 04:39:47 +0000
commit7f17eeb7fccd52b7049f9f598121130dfd1b55ae (patch)
tree8afca1e4459f0bc719941514009f046cd77f88ed /src/streamstack.h
parenta83e9babede7ab5bc8e1ac6c7ee3784b91bd8452 (diff)
downloadlibbu++-7f17eeb7fccd52b7049f9f598121130dfd1b55ae.tar.gz
libbu++-7f17eeb7fccd52b7049f9f598121130dfd1b55ae.tar.bz2
libbu++-7f17eeb7fccd52b7049f9f598121130dfd1b55ae.tar.xz
libbu++-7f17eeb7fccd52b7049f9f598121130dfd1b55ae.zip
Client now inherits from stream. This could be cool, it could really mess\nthings up. We shall see. In other news, I'm adding a Bu::StreamStack class\nthat will let you easily manage dynamic stream/filter sets.
Diffstat (limited to 'src/streamstack.h')
-rw-r--r--src/streamstack.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/streamstack.h b/src/streamstack.h
new file mode 100644
index 0000000..03d8d8f
--- /dev/null
+++ b/src/streamstack.h
@@ -0,0 +1,47 @@
1#ifndef BU_STREAM_STACK_H
2#define BU_STREAM_STACK_H
3
4#include "bu/stream.h"
5
6namespace Bu
7{
8 class StreamStack : public Bu::Stream
9 {
10 public:
11 StreamStack();
12 virtual ~StreamStack();
13
14
15 //
16 // Everything below here merely passes on the call to the top of the
17 // stream stack.
18 //
19
20 virtual void close();
21 virtual size_t read( void *pBuf, size_t nBytes );
22 virtual size_t write( const void *pBuf, size_t nBytes );
23
24 virtual size_t write( const Bu::FString &sBuf );
25 virtual long tell();
26 virtual void seek( long offset );
27 virtual void setPos( long pos );
28 virtual void setPosEnd( long pos );
29 virtual bool isEos();
30 virtual bool isOpen();
31 virtual void flush();
32 virtual bool canRead();
33 virtual bool canWrite();
34 virtual bool isReadable();
35 virtual bool isWritable();
36 virtual bool isSeekable();
37 virtual bool isBlocking();
38 virtual void setBlocking( bool bBlocking=true );
39 virtual void setSize( long iSize );
40
41 private:
42 typedef Bu::List<Bu::Stream *> FilterList;
43 FilterList lFilts;
44 };
45};
46
47#endif