1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-07-08 09:57:10 +02:00

Initial implementation of the MaxmindDB module.

This commit is contained in:
Sandu Liviu Catalin
2016-11-14 14:06:30 +02:00
parent 2ef75d0dce
commit 3107513350
23 changed files with 2203 additions and 776 deletions

View File

@ -26,15 +26,29 @@ protected:
typedef const Type& ConstRef; // Constant reference to the managed type.
/* --------------------------------------------------------------------------------------------
* Validate the sockaddr pointer and throw an error if invalid.
* Validate the managed sockaddr pointer and throw an error if invalid.
*/
#if defined(_DEBUG) || defined(SQMOD_EXCEPTLOC)
void Validate(CCStr file, Int32 line) const;
#else
void Validate() const;
#endif // _DEBUG
private:
/* --------------------------------------------------------------------------------------------
* Validate the managed sockaddr pointer and throw an error if invalid.
*/
#if defined(_DEBUG) || defined(SQMOD_EXCEPTLOC)
Pointer GetValid(CCStr file, Int32 line) const;
#else
Pointer GetValid() const;
#endif // _DEBUG
private:
// ---------------------------------------------------------------------------------------------
Pointer m_Handle; /* The managed sockaddr structure. */
String m_Addres; /* The address that was queried for information. */
Pointer m_Handle; // The managed sockaddr structure.
String m_Addres; // The address that was queried for information.
public:
@ -42,7 +56,7 @@ public:
* Default constructor.
*/
SockAddr()
: m_Handle(NULL), m_Addres(_SC(""))
: m_Handle(nullptr), m_Addres(_SC(""))
{
/* ... */
}
@ -55,7 +69,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Copy constructor. (disabled)
*/
SockAddr(const SockAddr &) = delete;
SockAddr(const SockAddr & o) = delete;
/* --------------------------------------------------------------------------------------------
* Move constructor.
@ -75,7 +89,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Copy assignment operator. (disabled)
*/
SockAddr & operator = (const SockAddr &) = delete;
SockAddr & operator = (const SockAddr & o) = delete;
/* --------------------------------------------------------------------------------------------
* Move assignment operator.
@ -107,11 +121,6 @@ public:
return m_Handle;
}
/* --------------------------------------------------------------------------------------------
* Used by the script engine to compare two instances of this type.
*/
Int32 Cmp(const SockAddr & o) const;
/* --------------------------------------------------------------------------------------------
* Used by the script engine to convert an instance of this type to a string.
*/