24 #ifndef INCLUDED_XEROMYCES 25 #define INCLUDED_XEROMYCES 76 static bool ValidateEncoded(
const std::string& name,
const std::wstring& filename,
const std::string& document);
91 #define _XERO_MAKE_UID2__(p,l) p ## l 92 #define _XERO_MAKE_UID1__(p,l) _XERO_MAKE_UID2__(p,l) 94 #define _XERO_CHILDREN _XERO_MAKE_UID1__(_children_, __LINE__) 95 #define _XERO_I _XERO_MAKE_UID1__(_i_, __LINE__) 97 #define XERO_ITER_EL(parent_element, child_element) \ 98 for (XMBElement child_element : parent_element.GetChildNodes()) 100 #define XERO_ITER_ATTR(parent_element, attribute) \ 101 for (XMBAttribute attribute : parent_element.GetAttributes()) 103 #endif // INCLUDED_XEROMYCES PSRETURN ConvertFile(const PIVFS &vfs, const VfsPath &filename, const VfsPath &xmbPath, const std::string &validatorName)
Definition: Xeromyces.cpp:159
xml
Definition: tests.py:119
shared_ptr< IVFS > PIVFS
Definition: vfs.h:226
xmlDoc * xmlDocPtr
Definition: Xeromyces.h:40
static bool AddValidator(const PIVFS &vfs, const std::string &name, const VfsPath &grammarPath)
Definition: Xeromyces.cpp:74
static bool ValidateEncoded(const std::string &name, const std::wstring &filename, const std::string &document)
Definition: Xeromyces.cpp:94
friend class TestXeroXMB
Definition: Xeromyces.h:44
bool ReadXMBFile(const PIVFS &vfs, const VfsPath &filename)
Definition: Xeromyces.cpp:201
u32 PSRETURN
Definition: Errors.h:75
PSRETURN Load(const PIVFS &vfs, const VfsPath &filename, const std::string &validatorName="")
Load from an XML file (with invisible XMB caching).
Definition: Xeromyces.cpp:110
static void Terminate()
Call once when shutting down the program, to unload libxml2.
Definition: Xeromyces.cpp:63
static RelaxNGValidator & GetValidator(const std::string &name)
NOTE: Callers MUST acquire the g_ValidatorCacheLock before calling this.
Definition: Xeromyces.cpp:103
struct _xmlDoc xmlDoc
Definition: RelaxNG.h:26
shared_ptr< u8 > m_XMBBuffer
Definition: Xeromyces.h:87
Definition: XeroXMB.h:115
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:150
Definition: Xeromyces.h:42
ERROR_TYPE(Xeromyces, XMLOpenFailed)
static void Startup()
Call once when initialising the program, to load libxml2.
Definition: Xeromyces.cpp:53
Definition: vfs_util.cpp:39
Definition: write_buffer.h:28
xmlDoc * xmlDocPtr
Definition: RelaxNG.h:27
PSRETURN LoadString(const char *xml, const std::string &validatorName="")
Load from an in-memory XML string (with no caching).
Definition: Xeromyces.cpp:220
static PSRETURN CreateXMB(const xmlDocPtr doc, WriteBuffer &writeBuffer)
Definition: Xeromyces.cpp:373