diff options
Diffstat (limited to '')
| -rw-r--r-- | src/nids.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/nids.h b/src/nids.h new file mode 100644 index 0000000..9954146 --- /dev/null +++ b/src/nids.h | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | #ifndef BU_NIDS_H | ||
| 2 | #define BU_NIDS_H | ||
| 3 | |||
| 4 | namespace Bu | ||
| 5 | { | ||
| 6 | class Stream; | ||
| 7 | |||
| 8 | /** | ||
| 9 | * Numerically Indexed Data Streams. This is a working name so I can | ||
| 10 | * actually get some code written instead of agonizing over the name. | ||
| 11 | * | ||
| 12 | * This is a system for creating streams that contain other streams in | ||
| 13 | * a flexible block-allocated system. | ||
| 14 | */ | ||
| 15 | class Nids | ||
| 16 | { | ||
| 17 | public: | ||
| 18 | Nids( Bu::Stream &sStore ); | ||
| 19 | virtual ~Nids(); | ||
| 20 | |||
| 21 | /** | ||
| 22 | * Create a new Nids system in the assosiated stream. This should be | ||
| 23 | * used carefully, it will destroy all data already within the stream. | ||
| 24 | * More options will probably be added soon. | ||
| 25 | */ | ||
| 26 | void initialize( int iBlockSize, int iPreAllocate=1 ); | ||
| 27 | |||
| 28 | /** | ||
| 29 | * Create a new stream within the Nids system. The ID of the new stream | ||
| 30 | * is returned. | ||
| 31 | */ | ||
| 32 | int createStream( int iPreAllocate=1 ); | ||
| 33 | |||
| 34 | /** | ||
| 35 | * Delete a stream that's already within the Nids. | ||
| 36 | */ | ||
| 37 | void deleteStream( int iID ); | ||
| 38 | |||
| 39 | /** | ||
| 40 | * Return a new Stream object assosiated with the given stream ID. | ||
| 41 | */ | ||
| 42 | Bu::Stream &openStream( int iID ); | ||
| 43 | |||
| 44 | private: | ||
| 45 | Bu::Stream &sStore; | ||
| 46 | }; | ||
| 47 | }; | ||
| 48 | |||
| 49 | #endif | ||
