1 #include "xmpmeta/xmp_data.h" 2 3 namespace dynamic_depth { 4 namespace xmpmeta { 5 XmpData()6XmpData::XmpData() : xmp_(nullptr), xmp_extended_(nullptr) {} 7 ~XmpData()8XmpData::~XmpData() { Reset(); } 9 Reset()10void XmpData::Reset() { 11 if (xmp_) { 12 xmlFreeDoc(xmp_); 13 xmp_ = nullptr; 14 } 15 if (xmp_extended_) { 16 xmlFreeDoc(xmp_extended_); 17 xmp_extended_ = nullptr; 18 } 19 } 20 StandardSection() const21const xmlDocPtr XmpData::StandardSection() const { return xmp_; } 22 MutableStandardSection()23xmlDocPtr* XmpData::MutableStandardSection() { return &xmp_; } 24 ExtendedSection() const25const xmlDocPtr XmpData::ExtendedSection() const { return xmp_extended_; } 26 MutableExtendedSection()27xmlDocPtr* XmpData::MutableExtendedSection() { return &xmp_extended_; } 28 29 } // namespace xmpmeta 30 } // namespace dynamic_depth 31