Home | History | Annotate | Download | only in xmpmeta
      1 #include "xmpmeta/xmp_data.h"
      2 
      3 namespace dynamic_depth {
      4 namespace xmpmeta {
      5 
      6 XmpData::XmpData() : xmp_(nullptr), xmp_extended_(nullptr) {}
      7 
      8 XmpData::~XmpData() { Reset(); }
      9 
     10 void 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 
     21 const xmlDocPtr XmpData::StandardSection() const { return xmp_; }
     22 
     23 xmlDocPtr* XmpData::MutableStandardSection() { return &xmp_; }
     24 
     25 const xmlDocPtr XmpData::ExtendedSection() const { return xmp_extended_; }
     26 
     27 xmlDocPtr* XmpData::MutableExtendedSection() { return &xmp_extended_; }
     28 
     29 }  // namespace xmpmeta
     30 }  // namespace dynamic_depth
     31