1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-16 07:07:13 +02:00

Migrated the host module to C++ exceptions as well.

Also enabled the latest C++ revision in the project.
Replaced the Random library with the one provided by C++11.
Implemented a simple AES256 encryption class.
Various other fixes and improvements.
This commit is contained in:
Sandu Liviu Catalin
2016-03-10 05:57:13 +02:00
parent 3162221e7f
commit 70e5f0ba21
124 changed files with 14873 additions and 14062 deletions

View File

@ -0,0 +1,54 @@
// ------------------------------------------------------------------------------------------------
#include "LookupResult.hpp"
#include "Module.hpp"
// ------------------------------------------------------------------------------------------------
namespace SqMod {
// ------------------------------------------------------------------------------------------------
SQInteger LookupResult::Typename(HSQUIRRELVM vm)
{
static const SQChar name[] = _SC("SqMMDBLookupResult");
sq_pushstring(vm, name, sizeof(name));
return 1;
}
// ------------------------------------------------------------------------------------------------
void LookupResult::Validate() const
{
// Is the document handle valid?
if (!m_Db)
SqThrowF("Invalid Maxmind database reference");
}
// ------------------------------------------------------------------------------------------------
LookupResult::LookupResult()
: m_Db(), m_Result()
{
memset(&m_Result, 0, sizeof(Type));
}
// ------------------------------------------------------------------------------------------------
Int32 LookupResult::Cmp(const LookupResult & o) const
{
if (m_Db == o.m_Db)
return 0;
else if (m_Db.DbPtr() > o.m_Db.DbPtr())
return 1;
else
return -1;
}
// ------------------------------------------------------------------------------------------------
EntryDataList LookupResult::GetValueA(CSStr path, Array & arr) const
{
}
// ------------------------------------------------------------------------------------------------
EntryDataList LookupResult::GetValueT(CSStr path, Table & tbl) const
{
}
} // Namespace:: SqMod