1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-01-31 18:07:14 +01:00
SqMod/module/Library/XML/Common.cpp
Sandu Liviu Catalin 39d6af7687 Integrate XML module.
Integrate the XML module into the host plugin and get it to compile.
2020-03-22 01:33:11 +02:00

44 lines
1.3 KiB
C++

// ------------------------------------------------------------------------------------------------
#include "Library/XML/Common.hpp"
// ------------------------------------------------------------------------------------------------
namespace SqMod {
// ------------------------------------------------------------------------------------------------
void DocumentRef::Validate() const
{
if (!m_Ptr)
{
STHROWF("Invalid XML document reference");
}
}
// ------------------------------------------------------------------------------------------------
SQInteger XmlParseResult::Typename(HSQUIRRELVM vm)
{
static const SQChar name[] = _SC("SqXmlParseResult");
sq_pushstring(vm, name, sizeof(name));
return 1;
}
// ------------------------------------------------------------------------------------------------
void XmlParseResult::Validate() const
{
// Is the documen handle valid?
if (!m_Doc)
{
STHROWF("Invalid XML document reference");
}
}
// ------------------------------------------------------------------------------------------------
void XmlParseResult::Check() const
{
if (m_Result.status != status_ok)
{
STHROWF("XML parse error [%s]", m_Result.description());
}
}
} // Namespace:: SqMod