diff options
author | Mike Buland <eichlan@xagasoft.com> | 2019-05-25 23:04:09 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2019-05-25 23:04:09 -0700 |
commit | 26aa4bd668a2f2358b03634bce78c58085f14164 (patch) | |
tree | 49ddbcfec9af34e0a49d00614d7437c39988b7ef /src/unstable/blobbuilder.cpp | |
parent | 3a27454dca4a16d021a4d418f0725adccc5baabb (diff) | |
download | libbu++-26aa4bd668a2f2358b03634bce78c58085f14164.tar.gz libbu++-26aa4bd668a2f2358b03634bce78c58085f14164.tar.bz2 libbu++-26aa4bd668a2f2358b03634bce78c58085f14164.tar.xz libbu++-26aa4bd668a2f2358b03634bce78c58085f14164.zip |
Started work on the SharedCore BlobBuilder.
This will contain everything that made Bu::String flexible and fast when
building, and a nightmare for multi-threaded programming.
Diffstat (limited to 'src/unstable/blobbuilder.cpp')
-rw-r--r-- | src/unstable/blobbuilder.cpp | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/unstable/blobbuilder.cpp b/src/unstable/blobbuilder.cpp index 73271f8..b98476b 100644 --- a/src/unstable/blobbuilder.cpp +++ b/src/unstable/blobbuilder.cpp | |||
@@ -5,4 +5,67 @@ | |||
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 | #include "blobbuilder.h" | ||
9 | |||
10 | ///// | ||
11 | // BlobBuilderCore::Chunk | ||
12 | // | ||
13 | |||
14 | Bu::BlobBuilderCore::Chunk::Chunk() : | ||
15 | iFill( 0 ), | ||
16 | iLength( 0 ), | ||
17 | pData( 0 ), | ||
18 | pNext( 0 ) | ||
19 | { | ||
20 | } | ||
21 | |||
22 | Bu::BlobBuilderCore::Chunk::~Chunk() | ||
23 | { | ||
24 | delete[] pData; | ||
25 | pData = 0; | ||
26 | delete pNext; | ||
27 | pNext = 0; | ||
28 | } | ||
29 | |||
30 | ///// | ||
31 | // BlobBuilderCore | ||
32 | // | ||
33 | |||
34 | Bu::BlobBuilderCore::BlobBuilderCore() : | ||
35 | pFirst( 0 ), | ||
36 | pLast( 0 ), | ||
37 | iLength( 0 ) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | Bu::BlobBuilderCore::BlobBuilderCore( const Bu::BlobBuilderCore &rSrc ) : | ||
42 | iLength( rSrc.iLength ), | ||
43 | pFirst( 0 ), | ||
44 | pLast( 0 ) | ||
45 | { | ||
46 | |||
47 | } | ||
48 | |||
49 | Bu::BlobBuilderCore::~BlobBuilderCore() | ||
50 | { | ||
51 | delete pFirst; | ||
52 | pFirst = pLast = 0; | ||
53 | } | ||
54 | |||
55 | ////// | ||
56 | // BlobBuilder | ||
57 | // | ||
58 | |||
59 | Bu::BlobBuilder::BlobBuilder() | ||
60 | { | ||
61 | } | ||
62 | |||
63 | Bu::BlobBuilder::BlobBuilder( const Bu::BlobBuilder &rSrc ) : | ||
64 | Bu::SharedCore<Bu::BlobBuilder, Bu::BlobBuilderCore>( rSrc ) | ||
65 | { | ||
66 | } | ||
67 | |||
68 | Bu::BlobBuilder::~BlobBuilder() | ||
69 | { | ||
70 | } | ||
8 | 71 | ||