33#ifndef DVD_XML_PARSER_H_
34#define DVD_XML_PARSER_H_
44 class PlatformContext;
56 mutable boost::property_tree::iptree
XmlTree;
61 [[nodiscard]]
bool read(
const ResourcePath& filePath,
const char* fileName,
const std::string& rootNode );
62 [[nodiscard]]
bool write(
const ResourcePath& filePath,
const char* fileName )
const;
67#define CONCAT(first, second) first second
69#define GET_PARAM(X) GET_TEMP_PARAM(X, X)
71#define GET_TEMP_PARAM(X, TEMP) \
72 TEMP = LoadSave.XmlTree.get(LoadSave._rootNodePath + TO_STRING(X), TEMP)
74#define GET_PARAM_ATTRIB(X, Y) \
75 X.Y = LoadSave.XmlTree.get(CONCAT(CONCAT(LoadSave._rootNodePath + TO_STRING(X), ".<xmlattr>."), TO_STRING(Y)), (X.Y))
77#define PUT_TEMP_PARAM(X, TEMP) \
78 LoadSave.XmlTree.put(LoadSave._rootNodePath + TO_STRING(X), TEMP)
79#define PUT_PARAM_ATTRIB(X, Y) \
80 LoadSave.XmlTree.put(CONCAT(CONCAT(LoadSave._rootNodePath + TO_STRING(X), ".<xmlattr>."), TO_STRING(Y)), (X.Y))
83#define PUT_PARAM(X) PUT_TEMP_PARAM(X, X)
detail::LoadSave LoadSave
virtual ~IXMLSerializable()=default
virtual bool toXML(const ResourcePath &xmlFilePath, const char *fileName) const =0
friend bool loadFromXML(IXMLSerializable &object, const ResourcePath &filePath, const char *fileName)
friend bool saveToXML(const IXMLSerializable &object, const ResourcePath &filePath, const char *fileName)
virtual bool fromXML(const ResourcePath &xmlFilePath, const char *fileName)=0
bool loadFromXML(IXMLSerializable &object, const ResourcePath &filePath, const char *fileName)
bool saveToXML(const IXMLSerializable &object, const ResourcePath &filePath, const char *fileName)
void loadDefaultKeyBindings(const ResourcePath &file, const Scene *scene)
Child Functions.
void loadMusicPlaylist(const ResourcePath &scenePath, const Str< 64 > &fileName, Scene *scene, const Configuration &config)
void writeXML(const ResourcePath &path, const boost::property_tree::ptree &tree)
void readXML(const ResourcePath &path, boost::property_tree::ptree &tree)
Handle console commands that start with a forward slash.
eastl::vector< Type > vector
vector< SceneNode > children
bool write(const ResourcePath &filePath, const char *fileName) const
boost::property_tree::iptree XmlTree
std::string _rootNodePath
bool read(const ResourcePath &filePath, const char *fileName, const std::string &rootNode)