mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 05:50:31 +00:00
Fix EngineAPI xml generation, utilizing fixed_tuple for default args
This commit is contained in:
parent
c1e64ff3bd
commit
a84145421f
3 changed files with 162 additions and 2 deletions
|
|
@ -25,6 +25,10 @@
|
|||
|
||||
#include <tuple>
|
||||
|
||||
#ifndef _FIXEDTUPLE_H_
|
||||
#include "fixedTuple.h"
|
||||
#endif
|
||||
|
||||
#ifndef _ENGINEEXPORTS_H_
|
||||
#include "console/engineExports.h"
|
||||
#endif
|
||||
|
|
@ -94,6 +98,7 @@ template<typename ...ArgTs>
|
|||
struct _EngineFunctionDefaultArguments< void(ArgTs...) > : public EngineFunctionDefaultArguments
|
||||
{
|
||||
template<typename T> using DefVST = typename EngineTypeTraits<T>::DefaultArgumentValueStoreType;
|
||||
fixed_tuple<DefVST<ArgTs> ...> mFixedArgs;
|
||||
std::tuple<DefVST<ArgTs> ...> mArgs;
|
||||
private:
|
||||
using SelfType = _EngineFunctionDefaultArguments< void(ArgTs...) >;
|
||||
|
|
@ -130,7 +135,9 @@ private:
|
|||
public:
|
||||
template<typename ...TailTs> _EngineFunctionDefaultArguments(TailTs ...tail)
|
||||
: EngineFunctionDefaultArguments({sizeof...(TailTs)}), mArgs(SelfType::tailInit(tail...))
|
||||
{}
|
||||
{
|
||||
fixed_tuple_mutator<void(DefVST<ArgTs>...), void(DefVST<ArgTs>...)>::copy(mArgs, mFixedArgs);
|
||||
}
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue