diff options
Diffstat (limited to 'src/streamstack.h')
| -rw-r--r-- | src/streamstack.h | 47 |
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 | |||
| 6 | namespace 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 | ||
