1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-10-21 10:27:18 +02:00

Move the plugin Squirrel utilities to the Sqrat binding utility.

Implement registration of functions and methods with string formatting support in the Sqrat binding utility.
Few minor other fixes.
This commit is contained in:
Sandu Liviu Catalin
2016-11-16 11:54:07 +02:00
parent ed599c06dd
commit 0137dfc66f
8 changed files with 5119 additions and 203 deletions

View File

@@ -250,6 +250,23 @@ public:
return *this;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Sets a key in the Table to a specific function with formatting support
///
/// \param name The key in the table being assigned a value
/// \param method Function that is being placed in the Table
///
/// \tparam F Type of function (only define this if you need to choose a certain template specialization or overload)
///
/// \return The Table itself so the call can be chained
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class F>
TableBase& FmtFunc(const SQChar* name, F method) {
BindFunc(name, &method, sizeof(method), SqGlobalFmtFunc(method));
return *this;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Sets a key in the Table to a specific function and allows the key to be overloaded with functions of a different amount of arguments
///