diff options
Diffstat (limited to 'src/unstable/blob.cpp')
-rw-r--r-- | src/unstable/blob.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/unstable/blob.cpp b/src/unstable/blob.cpp index e72e265..51e74ff 100644 --- a/src/unstable/blob.cpp +++ b/src/unstable/blob.cpp | |||
@@ -142,6 +142,26 @@ bool Bu::Blob::isNullOrEmpty() const | |||
142 | return pData == NULL || iSize == 0; | 142 | return pData == NULL || iSize == 0; |
143 | } | 143 | } |
144 | 144 | ||
145 | void Bu::Blob::set( const Blob &rRhs ) | ||
146 | { | ||
147 | *this = rRhs; | ||
148 | } | ||
149 | |||
150 | void Bu::Blob::set( const char *pRhs ) | ||
151 | { | ||
152 | *this = pRhs; | ||
153 | } | ||
154 | |||
155 | void Bu::Blob::set( const char *pRhs, int32_t iSize ) | ||
156 | { | ||
157 | delete[] pData; | ||
158 | |||
159 | this->iSize = iSize; | ||
160 | pData = new char[iSize+1]; | ||
161 | memcpy( pData, pRhs, iSize ); | ||
162 | pData[iSize] = '\0'; | ||
163 | } | ||
164 | |||
145 | Bu::Blob &Bu::Blob::operator=( const Bu::Blob &rRhs ) | 165 | Bu::Blob &Bu::Blob::operator=( const Bu::Blob &rRhs ) |
146 | { | 166 | { |
147 | delete[] pData; | 167 | delete[] pData; |