1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-07-28 11:41:48 +02:00

More code cleanup and fixes in the MaxmindDB module.

Implemented the SearchNode wrapper.
This commit is contained in:
Sandu Liviu Catalin
2016-11-14 15:46:48 +02:00
parent fb5a5b0090
commit 7d1493afd3
13 changed files with 583 additions and 80 deletions

View File

@@ -12,6 +12,19 @@ namespace SqMod {
*/
class Database
{
public:
// --------------------------------------------------------------------------------------------
typedef DbHnd::Type Type; // The managed type.
// --------------------------------------------------------------------------------------------
typedef Type* Pointer; // Pointer to the managed type.
typedef const Type* ConstPtr; // Constant pointer to the managed type.
// --------------------------------------------------------------------------------------------
typedef Type& Reference; // Reference to the managed type.
typedef const Type& ConstRef; // Constant reference to the managed type.
protected:
/* --------------------------------------------------------------------------------------------
@@ -21,9 +34,7 @@ protected:
void Validate(CCStr file, Int32 line) const;
#else
void Validate() const;
#endif // _DEBUG
private:
#endif //
/* --------------------------------------------------------------------------------------------
* Validate the managed database handle and throw an error if invalid.
@@ -178,6 +189,10 @@ public:
*/
LookupResult LookupSockAddr(SockAddr & sockaddr);
/* --------------------------------------------------------------------------------------------
* Retrieve a speciffic node from the managed database.
*/
SearchNode ReadNode(Uint32 node) const;
};
} // Namespace:: SqMod