X-Git-Url: https://git.pterodactylus.net/?p=ecparse.git;a=blobdiff_plain;f=BlobTag.cpp;fp=BlobTag.cpp;h=0bf4bdaa1d059645da5820de44a675c9b5642182;hp=0000000000000000000000000000000000000000;hb=e9bd547c31bc06fac87b49cafa624c03c2d50c91;hpb=5d07c630077c673b5a7ffaa23fcfb11eefe2136f diff --git a/BlobTag.cpp b/BlobTag.cpp new file mode 100644 index 0000000..0bf4bda --- /dev/null +++ b/BlobTag.cpp @@ -0,0 +1,29 @@ +/** + * © 2008 by David Roden + */ + +#include "BlobTag.h" + +#include +#include + +BlobTag::BlobTag(int id, void* value, int length): Tag(Blob, id) { + this->length = length; + this->value = malloc(length); + memcpy(this->value, value, length); +} + +BlobTag::~BlobTag() { + if (value) { + free(value); + } +} + +int BlobTag::getSize() { + return length; +} + +void* BlobTag::getValue() { + return value; +} +