5 #ifndef CMR_BLOB_INCLUDED
6 #define CMR_BLOB_INCLUDED
28 Blob(
size_t size,
size_t allocated_size = 0);
36 Blob(
const char* content,
size_t size,
size_t allocated_size = 0);
48 void splice(
Blob& blob);
79 return allocated_size_;
86 char* set(
const char* content,
size_t size,
size_t allocated_size = 0);
93 char* set(
size_t size,
size_t allocated_size = 0);
94 char* set_allocated_size(
size_t allocated_size);
118 bool from_string(
const char* s);
123 long write(
OBStream&,
int tab)
const;
130 int write(
const Path& file)
const;
135 int read(
const Path& file);
146 int compare(
const Blob& b)
const;
147 bool operator==(
const Blob& b)
const
149 return compare(b) == 0;
151 bool operator< (
const Blob& b)
const
153 return compare(b) < 0;
155 bool operator> (
const Blob& b)
const
157 return compare(b) > 0;
160 enum { DEFAULT_BLOB_SIZE = 4096, NOT_OWNED_DATA = 0xFFFFFFFF};
163 size_t allocated_size_;
char * get_content()
Definition: Blob.h:53
size_t get_allocated_size() const
Definition: Blob.h:77
size_t get_size() const
Definition: Blob.h:68
Definition: CommBuffer.h:28
Definition: IOBStream.h:166
Definition: IOBStream.h:29
const char * get_content() const
Definition: Blob.h:60