diff options
author | Mike Buland <eichlan@xagasoft.com> | 2008-09-15 20:03:56 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2008-09-15 20:03:56 +0000 |
commit | 597a1487c716b799428f4b4a4903e65df4c93ba9 (patch) | |
tree | c743b0d4dfc3bacbffc196589543ec4e9abf1aaf /src/nidsstream.h | |
parent | 3c6cb7f2347aed974543f9082a0ccd297577db41 (diff) | |
download | libbu++-597a1487c716b799428f4b4a4903e65df4c93ba9.tar.gz libbu++-597a1487c716b799428f4b4a4903e65df4c93ba9.tar.bz2 libbu++-597a1487c716b799428f4b4a4903e65df4c93ba9.tar.xz libbu++-597a1487c716b799428f4b4a4903e65df4c93ba9.zip |
Whoa! Loads of NIDS work. It actually compiles, runs, and I'm optimizing the
hell out of it. Good times, everyone. This is a major chunk for congo, and
the new optimizations should be good.
Diffstat (limited to '')
-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 | ||