#pragma once #include "Utils.h" #include "PaletteList.h" #include "VariationList.h" #include "Ember.h" /// /// EmberToXml class. /// namespace EmberNs { /// /// Class for converting ember objects to Xml documents. /// Support for saving one or more to a single file. /// Template argument expected to be float or double. /// template class EMBER_API EmberToXml : public EmberReport { public: /// /// Empty constructor. /// EmberToXml() = default; ~EmberToXml() = default; EmberToXml(const EmberToXml& e) = delete; bool Save(const string& filename, Ember& ember, size_t printEditDepth, bool doEdits, bool hexPalette, bool append = false, bool start = false, bool finish = false); template class C> bool Save(const string& filename, C, Alloc>& embers, size_t printEditDepth, bool doEdits, bool hexPalette, bool append, bool start, bool finish); string ToString(Ember& ember, const string& extraAttributes, size_t printEditDepth, bool doEdits, bool hexPalette = true); xmlDocPtr CreateNewEditdoc(Ember* parent0, Ember* parent1, const string& action, const string& nick, const string& url, const string& id, const string& comment, intmax_t sheepGen = 0, intmax_t sheepId = 0); private: string ToString(Xform& xform, size_t xformCount, bool isFinal, bool doMotion); string ToString(xmlNodePtr editNode, size_t tabs, bool formatting, size_t printEditDepth); string ToString(const EmberMotion& motion); void AddFilenameWithoutAmpersand(xmlNodePtr node, string& filename); }; }