1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Implement constructors with formatting support in the Sqrat binding utility.

This commit is contained in:
Sandu Liviu Catalin 2016-11-22 16:08:45 +02:00
parent d359bd5c7b
commit c541fb3ea9
2 changed files with 819 additions and 0 deletions

View File

@ -345,6 +345,309 @@ public:
}
/// @endcond
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @cond DEV
/// following iNew functions are used only if constructors are bound via FmtCtor() in Sqrat::Class (safe to ignore)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
const StackStrF fmt(vm, 2, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 3, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 4, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 5, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3,typename A4>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
Var<A4> a4(vm, 5);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 6, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
a4.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3,typename A4,typename A5>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
Var<A4> a4(vm, 5);
Var<A5> a5(vm, 6);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 7, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
a4.value,
a5.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3,typename A4,typename A5,typename A6>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
Var<A4> a4(vm, 5);
Var<A5> a5(vm, 6);
Var<A6> a6(vm, 7);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 8, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
a4.value,
a5.value,
a6.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
Var<A4> a4(vm, 5);
Var<A5> a5(vm, 6);
Var<A6> a6(vm, 7);
Var<A7> a7(vm, 8);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 9, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
a4.value,
a5.value,
a6.value,
a7.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7,typename A8>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
Var<A4> a4(vm, 5);
Var<A5> a5(vm, 6);
Var<A6> a6(vm, 7);
Var<A7> a7(vm, 8);
Var<A8> a8(vm, 9);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 10, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
a4.value,
a5.value,
a6.value,
a7.value,
a8.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7,typename A8,typename A9>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
Var<A4> a4(vm, 5);
Var<A5> a5(vm, 6);
Var<A6> a6(vm, 7);
Var<A7> a7(vm, 8);
Var<A8> a8(vm, 9);
Var<A9> a9(vm, 10);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 11, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
a4.value,
a5.value,
a6.value,
a7.value,
a8.value,
a9.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
/// @endcond
public:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -910,6 +1213,309 @@ public:
}
/// @endcond
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @cond DEV
/// following iNew functions are used only if constructors are bound via FmtCtor() in Sqrat::Class (safe to ignore)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
const StackStrF fmt(vm, 2, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 3, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 4, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 5, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3,typename A4>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
Var<A4> a4(vm, 5);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 6, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
a4.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3,typename A4,typename A5>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
Var<A4> a4(vm, 5);
Var<A5> a5(vm, 6);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 7, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
a4.value,
a5.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3,typename A4,typename A5,typename A6>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
Var<A4> a4(vm, 5);
Var<A5> a5(vm, 6);
Var<A6> a6(vm, 7);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 8, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
a4.value,
a5.value,
a6.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
Var<A4> a4(vm, 5);
Var<A5> a5(vm, 6);
Var<A6> a6(vm, 7);
Var<A7> a7(vm, 8);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 9, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
a4.value,
a5.value,
a6.value,
a7.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7,typename A8>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
Var<A4> a4(vm, 5);
Var<A5> a5(vm, 6);
Var<A6> a6(vm, 7);
Var<A7> a7(vm, 8);
Var<A8> a8(vm, 9);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 10, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
a4.value,
a5.value,
a6.value,
a7.value,
a8.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
template <typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7,typename A8,typename A9>
static SQInteger iFmtNew(HSQUIRRELVM vm) {
SQTRY()
Var<A1> a1(vm, 2);
Var<A2> a2(vm, 3);
Var<A3> a3(vm, 4);
Var<A4> a4(vm, 5);
Var<A5> a5(vm, 6);
Var<A6> a6(vm, 7);
Var<A7> a7(vm, 8);
Var<A8> a8(vm, 9);
Var<A9> a9(vm, 10);
SQCATCH_NOEXCEPT(vm) {
return sq_throwerror(vm, SQWHAT_NOEXCEPT(vm));
}
const StackStrF fmt(vm, 11, true);
// Validate the format
if (SQ_FAILED(fmt.mRes)) {
return fmt.mRes;
}
SetInstance(vm, 1, new C(
a1.value,
a2.value,
a3.value,
a4.value,
a5.value,
a6.value,
a7.value,
a8.value,
a9.value,
fmt
));
SQCATCH(vm) {
return sq_throwerror(vm, SQWHAT(vm));
}
return 0;
}
/// @endcond
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Called by Sqrat to set up the instance at idx on the stack as a copy of a value of the same type (not used in this allocator)
///

View File

@ -937,6 +937,219 @@ public:
Class& Ctor(const SQChar *name = 0) {
return BindConstructor(A::template iNew<A1, A2, A3, A4, A5, A6, A7, A8, A9>, 9, name);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Binds a constructor with 1 argument (there can only be one constructor of this many arguments for a given name)
///
/// \param name Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor)
///
/// \return The Class itself so the call can be chained
///
/// \remarks
/// The last parameter is implicitly of StackStrF type and is automatically included into the parameter count.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Class& FmtCtor(const SQChar *name = 0) {
return BindConstructor(A::iFmtNew, 1, name);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Binds a constructor with 2 arguments (there can only be one constructor of this many arguments for a given name)
///
/// \param name Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor)
///
/// \tparam A1 Type of argument 1 of the constructor (must be defined explicitly)
///
/// \return The Class itself so the call can be chained
///
/// \remarks
/// The last parameter is implicitly of StackStrF type and is automatically included into the parameter count.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class A1>
Class& FmtCtor(const SQChar *name = 0) {
return BindConstructor(A::template iFmtNew<A1>, 2, name);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Binds a constructor with 3 arguments (there can only be one constructor of this many arguments for a given name)
///
/// \param name Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor)
///
/// \tparam A1 Type of argument 1 of the constructor (must be defined explicitly)
/// \tparam A2 Type of argument 2 of the constructor (must be defined explicitly)
///
/// \return The Class itself so the call can be chained
///
/// \remarks
/// The last parameter is implicitly of StackStrF type and is automatically included into the parameter count.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class A1, class A2>
Class& FmtCtor(const SQChar *name = 0) {
return BindConstructor(A::template iFmtNew<A1, A2>, 3, name);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Binds a constructor with 4 arguments (there can only be one constructor of this many arguments for a given name)
///
/// \param name Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor)
///
/// \tparam A1 Type of argument 1 of the constructor (must be defined explicitly)
/// \tparam A2 Type of argument 2 of the constructor (must be defined explicitly)
/// \tparam A3 Type of argument 3 of the constructor (must be defined explicitly)
///
/// \return The Class itself so the call can be chained
///
/// \remarks
/// The last parameter is implicitly of StackStrF type and is automatically included into the parameter count.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class A1, class A2, class A3>
Class& FmtCtor(const SQChar *name = 0) {
return BindConstructor(A::template iFmtNew<A1, A2, A3>, 4, name);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Binds a constructor with 5 arguments (there can only be one constructor of this many arguments for a given name)
///
/// \param name Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor)
///
/// \tparam A1 Type of argument 1 of the constructor (must be defined explicitly)
/// \tparam A2 Type of argument 2 of the constructor (must be defined explicitly)
/// \tparam A3 Type of argument 3 of the constructor (must be defined explicitly)
/// \tparam A4 Type of argument 4 of the constructor (must be defined explicitly)
///
/// \return The Class itself so the call can be chained
///
/// \remarks
/// The last parameter is implicitly of StackStrF type and is automatically included into the parameter count.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class A1, class A2, class A3, class A4>
Class& FmtCtor(const SQChar *name = 0) {
return BindConstructor(A::template iFmtNew<A1, A2, A3, A4>, 5, name);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Binds a constructor with 6 arguments (there can only be one constructor of this many arguments for a given name)
///
/// \param name Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor)
///
/// \tparam A1 Type of argument 1 of the constructor (must be defined explicitly)
/// \tparam A2 Type of argument 2 of the constructor (must be defined explicitly)
/// \tparam A3 Type of argument 3 of the constructor (must be defined explicitly)
/// \tparam A4 Type of argument 4 of the constructor (must be defined explicitly)
/// \tparam A5 Type of argument 5 of the constructor (must be defined explicitly)
///
/// \return The Class itself so the call can be chained
///
/// \remarks
/// The last parameter is implicitly of StackStrF type and is automatically included into the parameter count.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class A1, class A2, class A3, class A4, class A5>
Class& FmtCtor(const SQChar *name = 0) {
return BindConstructor(A::template iFmtNew<A1, A2, A3, A4, A5>, 6, name);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Binds a constructor with 7 arguments (there can only be one constructor of this many arguments for a given name)
///
/// \param name Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor)
///
/// \tparam A1 Type of argument 1 of the constructor (must be defined explicitly)
/// \tparam A2 Type of argument 2 of the constructor (must be defined explicitly)
/// \tparam A3 Type of argument 3 of the constructor (must be defined explicitly)
/// \tparam A4 Type of argument 4 of the constructor (must be defined explicitly)
/// \tparam A5 Type of argument 5 of the constructor (must be defined explicitly)
/// \tparam A6 Type of argument 6 of the constructor (must be defined explicitly)
///
/// \return The Class itself so the call can be chained
///
/// \remarks
/// The last parameter is implicitly of StackStrF type and is automatically included into the parameter count.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class A1, class A2, class A3, class A4, class A5, class A6>
Class& FmtCtor(const SQChar *name = 0) {
return BindConstructor(A::template iFmtNew<A1, A2, A3, A4, A5, A6>, 7, name);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Binds a constructor with 8 arguments (there can only be one constructor of this many arguments for a given name)
///
/// \param name Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor)
///
/// \tparam A1 Type of argument 1 of the constructor (must be defined explicitly)
/// \tparam A2 Type of argument 2 of the constructor (must be defined explicitly)
/// \tparam A3 Type of argument 3 of the constructor (must be defined explicitly)
/// \tparam A4 Type of argument 4 of the constructor (must be defined explicitly)
/// \tparam A5 Type of argument 5 of the constructor (must be defined explicitly)
/// \tparam A6 Type of argument 6 of the constructor (must be defined explicitly)
/// \tparam A7 Type of argument 7 of the constructor (must be defined explicitly)
///
/// \return The Class itself so the call can be chained
///
/// \remarks
/// The last parameter is implicitly of StackStrF type and is automatically included into the parameter count.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7>
Class& FmtCtor(const SQChar *name = 0) {
return BindConstructor(A::template iFmtNew<A1, A2, A3, A4, A5, A6, A7>, 8, name);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Binds a constructor with 9 arguments (there can only be one constructor of this many arguments for a given name)
///
/// \param name Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor)
///
/// \tparam A1 Type of argument 1 of the constructor (must be defined explicitly)
/// \tparam A2 Type of argument 2 of the constructor (must be defined explicitly)
/// \tparam A3 Type of argument 3 of the constructor (must be defined explicitly)
/// \tparam A4 Type of argument 4 of the constructor (must be defined explicitly)
/// \tparam A5 Type of argument 5 of the constructor (must be defined explicitly)
/// \tparam A6 Type of argument 6 of the constructor (must be defined explicitly)
/// \tparam A7 Type of argument 7 of the constructor (must be defined explicitly)
/// \tparam A8 Type of argument 8 of the constructor (must be defined explicitly)
///
/// \return The Class itself so the call can be chained
///
/// \remarks
/// The last parameter is implicitly of StackStrF type and is automatically included into the parameter count.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
Class& FmtCtor(const SQChar *name = 0) {
return BindConstructor(A::template iFmtNew<A1, A2, A3, A4, A5, A6, A7, A8>, 9, name);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Binds a constructor with 10 arguments (there can only be one constructor of this many arguments for a given name)
///
/// \param name Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor)
///
/// \tparam A1 Type of argument 1 of the constructor (must be defined explicitly)
/// \tparam A2 Type of argument 2 of the constructor (must be defined explicitly)
/// \tparam A3 Type of argument 3 of the constructor (must be defined explicitly)
/// \tparam A4 Type of argument 4 of the constructor (must be defined explicitly)
/// \tparam A5 Type of argument 5 of the constructor (must be defined explicitly)
/// \tparam A6 Type of argument 6 of the constructor (must be defined explicitly)
/// \tparam A7 Type of argument 7 of the constructor (must be defined explicitly)
/// \tparam A8 Type of argument 8 of the constructor (must be defined explicitly)
/// \tparam A9 Type of argument 9 of the constructor (must be defined explicitly)
///
/// \return The Class itself so the call can be chained
///
/// \remarks
/// The last parameter is implicitly of StackStrF type and is automatically included into the parameter count.
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
Class& FmtCtor(const SQChar *name = 0) {
return BindConstructor(A::template iFmtNew<A1, A2, A3, A4, A5, A6, A7, A8, A9>, 10, name);
}
};
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////