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:
@@ -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
|
||||
///
|
||||
|
Reference in New Issue
Block a user