/*! * Dumps the object to an XML element. Unsafe. */ xml::Element FeatureExtractorProjection::serialize(xml::Element &parent) const { xml::Element el(parent.PushBackElement(GetClassName())); el.SetAttribute("directions", int(dirs)); el.SetAttribute("size", size); el.SetAttribute("maxval", maxval); return el; }
/*! * Unsafe save * \throws ExceptionProtocol the content of the vector is not serializable * * \param[in] parent the parent element to which we will add the new element * \return The newly created element, nullptr if failed. */ xml::Element Vector::Serialize(xml::Element &parent) const { xml::Element el(parent.PushBackElement(getClassName())); for (size_t tmp = 0; tmp < data.size(); tmp++) { xml::Element item = crn::Serialize(*data[tmp], el); item.SetAttribute("vector_index", int(tmp)); } return el; }
/*! * Dumps the object to an XML element. Unsafe. * * \param[in] parent the parent element to which we will add the new element * \return The newly created element, nullptr if failed. */ xml::Element StringUTF8::Serialize(xml::Element &parent) const { xml::Element el(parent.PushBackElement("StringUTF8")); el.PushBackText(*this); return el; }
/*! * Dumps the object to an XML element. Unsafe. * * \param[in] parent the parent element to which we will add the new element * \return The newly created element, nullptr if failed. */ xml::Element String::Serialize(xml::Element &parent) const { xml::Element el(parent.PushBackElement("String")); el.PushBackText(CStr()); return el; }