24#ifndef INCLUDED_XEROMYCES
25#define INCLUDED_XEROMYCES
75 static bool ValidateEncoded(
const std::string& name,
const std::string& filename,
const std::string& document);
86#define _XERO_MAKE_UID2__(p,l) p ## l
87#define _XERO_MAKE_UID1__(p,l) _XERO_MAKE_UID2__(p,l)
89#define _XERO_CHILDREN _XERO_MAKE_UID1__(_children_, __LINE__)
90#define _XERO_I _XERO_MAKE_UID1__(_i_, __LINE__)
92#define XERO_ITER_EL(parent_element, child_element) \
93 for (XMBElement child_element : parent_element.GetChildNodes())
95#define XERO_ITER_ATTR(parent_element, attribute) \
96 for (XMBAttribute attribute : parent_element.GetAttributes())
u32 PSRETURN
Definition: Errors.h:75
ERROR_TYPE(Xeromyces, XMLOpenFailed)
Definition: Xeromyces.h:41
PSRETURN Load(const PIVFS &vfs, const VfsPath &filename, const std::string &validatorName="")
Load from an XML file (with invisible XMB caching).
Definition: Xeromyces.cpp:114
PSRETURN LoadString(const char *xml, const std::string &validatorName="")
Load from an in-memory XML string (with no caching).
Definition: Xeromyces.cpp:206
PSRETURN ConvertFile(const PIVFS &vfs, const VfsPath &filename, const VfsPath &xmbPath, const std::string &validatorName)
Definition: Xeromyces.cpp:165
XMBStorage m_Data
Definition: Xeromyces.h:82
static void Terminate()
Call once when shutting down the program, to unload libxml2.
Definition: Xeromyces.cpp:67
static RelaxNGValidator & GetValidator(const std::string &name)
NOTE: Callers MUST acquire the g_ValidatorCacheLock before calling this.
Definition: Xeromyces.cpp:107
bool GenerateCachedXMB(const PIVFS &vfs, const VfsPath &sourcePath, VfsPath &archiveCachePath, const std::string &validatorName="")
Convert the given XML file into an XMB in the archive cache.
Definition: Xeromyces.cpp:156
static void Startup()
Call once when initialising the program, to load libxml2.
Definition: Xeromyces.cpp:57
static bool AddValidator(const PIVFS &vfs, const std::string &name, const VfsPath &grammarPath)
Definition: Xeromyces.cpp:78
friend class TestXMBData
Definition: Xeromyces.h:42
static bool ValidateEncoded(const std::string &name, const std::string &filename, const std::string &document)
Definition: Xeromyces.cpp:98
Storage for XMBData.
Definition: XMBStorage.h:38
def xml
Definition: tests.py:138
Definition: vfs_util.cpp:39
std::shared_ptr< IVFS > PIVFS
Definition: vfs.h:220