increase version number to 0.1
[ecparse.git] / BlobTag.cpp
1 /**
2  * © 2008 by David Roden <droden@gmail.com>
3  */
4
5 #include "BlobTag.h"
6
7 #include <stdlib.h>
8 #include <string.h>
9
10 BlobTag::BlobTag(int id, void* value, int length): Tag(Blob, id) {
11         this->length = length;
12         this->value = malloc(length);
13         memcpy(this->value, value, length);
14 }
15
16 BlobTag::~BlobTag() {
17         if (value) {
18                 free(value);
19         }
20 }
21
22 int BlobTag::getSize() {
23         return length;
24 }
25
26 void* BlobTag::getValue() {
27         return value;
28 }
29