diff options
Diffstat (limited to '')
| -rw-r--r-- | src/unstable/blobbuilder.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/unstable/blobbuilder.h b/src/unstable/blobbuilder.h index 73271f8..8cc2a24 100644 --- a/src/unstable/blobbuilder.h +++ b/src/unstable/blobbuilder.h | |||
| @@ -5,4 +5,57 @@ | |||
| 5 | * terms of the license contained in the file LICENSE. | 5 | * terms of the license contained in the file LICENSE. |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #ifndef BU_BLOB_BUILDER_H | ||
| 9 | #define BU_BLOB_BUILDER_H | ||
| 8 | 10 | ||
| 11 | #include "bu/config.h" | ||
| 12 | #include "bu/sharedcore.h" | ||
| 13 | |||
| 14 | namespace Bu | ||
| 15 | { | ||
| 16 | class BlobBuilder; | ||
| 17 | |||
| 18 | class BlobBuilderCore | ||
| 19 | { | ||
| 20 | friend class BlobBuilder; | ||
| 21 | friend class SharedCore<BlobBuilder, BlobBuilderCore>; | ||
| 22 | private: | ||
| 23 | class Chunk | ||
| 24 | { | ||
| 25 | public: | ||
| 26 | Chunk(); | ||
| 27 | ~Chunk(); | ||
| 28 | |||
| 29 | int16_t iFill; | ||
| 30 | int16_t iLength; | ||
| 31 | char *pData; | ||
| 32 | Chunk *pNext; | ||
| 33 | }; | ||
| 34 | |||
| 35 | BlobBuilderCore(); | ||
| 36 | BlobBuilderCore( const BlobBuilderCore &rSrc ); | ||
| 37 | virtual ~BlobBuilderCore(); | ||
| 38 | |||
| 39 | void clear(); | ||
| 40 | |||
| 41 | Chunk *pFirst; | ||
| 42 | Chunk *pLast; | ||
| 43 | int32_t iLength; | ||
| 44 | }; | ||
| 45 | |||
| 46 | class BlobBuilder : public Bu::SharedCore<BlobBuilder, BlobBuilderCore> | ||
| 47 | { | ||
| 48 | protected: | ||
| 49 | using SharedCore<BlobBuilder, BlobBuilderCore>::core; | ||
| 50 | using SharedCore<BlobBuilder, BlobBuilderCore>::_hardCopy; | ||
| 51 | |||
| 52 | public: | ||
| 53 | BlobBuilder(); | ||
| 54 | BlobBuilder( const BlobBuilder &rSrc ); | ||
| 55 | virtual ~BlobBuilder(); | ||
| 56 | |||
| 57 | private: | ||
| 58 | }; | ||
| 59 | }; | ||
| 60 | |||
| 61 | #endif | ||
