diff options
Diffstat (limited to 'src/nidsstream.h')
-rw-r--r-- | src/nidsstream.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/nidsstream.h b/src/nidsstream.h index 08b45eb..8021dee 100644 --- a/src/nidsstream.h +++ b/src/nidsstream.h | |||
@@ -2,16 +2,46 @@ | |||
2 | #define BU_NIDS_STREAM_H | 2 | #define BU_NIDS_STREAM_H |
3 | 3 | ||
4 | #include "bu/stream.h" | 4 | #include "bu/stream.h" |
5 | #include "bu/nids.h" | ||
5 | 6 | ||
6 | namespace Bu | 7 | namespace Bu |
7 | { | 8 | { |
8 | class NidsStream : public Bu::Stream | 9 | class NidsStream : public Bu::Stream |
9 | { | 10 | { |
11 | friend class Nids; | ||
12 | private: | ||
13 | /** | ||
14 | * These can only be created by the Nids class. | ||
15 | */ | ||
16 | NidsStream( Nids &rNids ); | ||
17 | NidsStream( const NidsStream &rSrc ); | ||
18 | |||
10 | public: | 19 | public: |
11 | NidsStream(); | ||
12 | virtual ~NidsStream(); | 20 | virtual ~NidsStream(); |
13 | 21 | ||
22 | virtual void close(); | ||
23 | virtual size_t read( void *pBuf, size_t nBytes ); | ||
24 | virtual size_t write( const void *pBuf, size_t nBytes ); | ||
25 | using Stream::write; | ||
26 | virtual long tell(); | ||
27 | virtual void seek( long offset ); | ||
28 | virtual void setPos( long pos ); | ||
29 | virtual void setPosEnd( long pos ); | ||
30 | virtual bool isEOS(); | ||
31 | virtual bool isOpen(); | ||
32 | virtual void flush(); | ||
33 | virtual bool canRead(); | ||
34 | virtual bool canWrite(); | ||
35 | virtual bool isReadable(); | ||
36 | virtual bool isWritable(); | ||
37 | virtual bool isSeekable(); | ||
38 | virtual bool isBlocking(); | ||
39 | virtual void setBlocking( bool bBlocking=true ); | ||
40 | |||
14 | private: | 41 | private: |
42 | Nids &rNids; | ||
43 | typedef struct Bu::Hash<int, struct Nids::Block *> BlockHash; | ||
44 | BlockHash hBlock; | ||
15 | }; | 45 | }; |
16 | }; | 46 | }; |
17 | 47 | ||