diff options
Diffstat (limited to 'src/unstable/blobbuilder.cpp')
-rw-r--r-- | src/unstable/blobbuilder.cpp | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/src/unstable/blobbuilder.cpp b/src/unstable/blobbuilder.cpp index a3f686e..a62b98c 100644 --- a/src/unstable/blobbuilder.cpp +++ b/src/unstable/blobbuilder.cpp | |||
@@ -25,6 +25,11 @@ Bu::BlobBuilderCore::Chunk::~Chunk() | |||
25 | pData = 0; | 25 | pData = 0; |
26 | delete pNext; | 26 | delete pNext; |
27 | pNext = 0; | 27 | pNext = 0; |
28 | |||
29 | // Why not delete pNext here? A BlobBuilder could easily wind up having | ||
30 | // quite a few chunks, and if it does, deleting the linked list from here | ||
31 | // could actually exhaust the program stack. Instead these are all deleted | ||
32 | // in the core down below. | ||
28 | } | 33 | } |
29 | 34 | ||
30 | ///// | 35 | ///// |
@@ -48,8 +53,26 @@ Bu::BlobBuilderCore::BlobBuilderCore( const Bu::BlobBuilderCore &rSrc ) : | |||
48 | 53 | ||
49 | Bu::BlobBuilderCore::~BlobBuilderCore() | 54 | Bu::BlobBuilderCore::~BlobBuilderCore() |
50 | { | 55 | { |
56 | clear(); | ||
57 | } | ||
58 | |||
59 | void Bu::BlobBuilderCore::clear() | ||
60 | { | ||
61 | Chunk *pCur = pFirst; | ||
62 | while( pCur ) | ||
63 | { | ||
64 | Chunk *pNext = pCur->pNext; | ||
65 | delete pCur; | ||
66 | pCur = pNext; | ||
67 | |||
68 | } | ||
51 | delete pFirst; | 69 | delete pFirst; |
52 | pFirst = pLast = 0; | 70 | pFirst = pLast = 0; |
71 | iLength = 0; | ||
72 | } | ||
73 | |||
74 | void Bu::BlobBuilderCore::append( const *pSrc, int32_t iLength ) | ||
75 | { | ||
53 | } | 76 | } |
54 | 77 | ||
55 | ////// | 78 | ////// |
@@ -69,3 +92,64 @@ Bu::BlobBuilder::~BlobBuilder() | |||
69 | { | 92 | { |
70 | } | 93 | } |
71 | 94 | ||
95 | void Bu::BlobBuilder::set( const Blob &rSrc ) | ||
96 | { | ||
97 | } | ||
98 | |||
99 | void Bu::BlobBuilder::set( const char *pSrc, int32_t iLength ) | ||
100 | { | ||
101 | } | ||
102 | |||
103 | void Bu::BlobBuilder::append( const Blob &rSrc ) | ||
104 | { | ||
105 | } | ||
106 | |||
107 | void Bu::BlobBuilder::append( const char *pSrc, int32_t iLength ) | ||
108 | { | ||
109 | } | ||
110 | |||
111 | void Bu::BlobBuilder::prepend( const Blob &rSrc ) | ||
112 | { | ||
113 | } | ||
114 | |||
115 | void Bu::BlobBuilder::prepend( const char *pSrc, int32_t iLength ) | ||
116 | { | ||
117 | } | ||
118 | |||
119 | void Bu::BlobBuilder::insert( int32_t iBefore, const Blob &rSrc ) | ||
120 | { | ||
121 | } | ||
122 | |||
123 | void Bu::BlobBuilder::insert( int32_t iBefore, const char *pSrc, const Bu::Blob &rSrc ) | ||
124 | { | ||
125 | } | ||
126 | |||
127 | void Bu::BlobBuilder::clear() | ||
128 | { | ||
129 | } | ||
130 | |||
131 | int32_t Bu::BlobBuilder::getSize() const | ||
132 | { | ||
133 | } | ||
134 | |||
135 | Bu::Blob Bu::BlobBuilder::getBlob() const | ||
136 | { | ||
137 | } | ||
138 | |||
139 | Bu::BlobBuilder &Bu::BlobBuilder::operator=( const Blob &rSrc ) | ||
140 | { | ||
141 | } | ||
142 | |||
143 | Bu::BlobBuilder &Bu::BlobBuilder::operator=( const char *pSrc ) | ||
144 | { | ||
145 | } | ||
146 | |||
147 | Bu::BlobBuilder &Bu::BlobBuilder::operator+=( const Blob &rSrc ) | ||
148 | { | ||
149 | } | ||
150 | |||
151 | Bu::BlobBuilder &Bu::BlobBuilder::operator+=( const char *pSrc ) | ||
152 | { | ||
153 | } | ||
154 | |||
155 | |||