X-Git-Url: https://git.pterodactylus.net/?p=ecparse.git;a=blobdiff_plain;f=StringTag.cpp;fp=StringTag.cpp;h=d7482f0b4bc435d88d67494efea9232ffd35ee19;hp=0000000000000000000000000000000000000000;hb=5d07c630077c673b5a7ffaa23fcfb11eefe2136f;hpb=2e311f5feab0d242fc617dc070305185242f7aad diff --git a/StringTag.cpp b/StringTag.cpp new file mode 100644 index 0000000..d7482f0 --- /dev/null +++ b/StringTag.cpp @@ -0,0 +1,24 @@ +/** + * © 2008 by David Roden + */ + +#include "StringTag.h" + +#include +#include + +StringTag::StringTag(int id, const char* value): Tag(String, id) { + this->value = (char*) malloc(strlen(value) + 1); + strcpy(this->value, value); +} + +StringTag::~StringTag() { + if (value) { + free(value); + } +} + +void* StringTag::getValue() { + return value; +} +