Fix EngineAPI xml generation, utilizing fixed_tuple for default args

This commit is contained in:
Lukas Joergensen 2018-04-21 09:06:16 +02:00
parent c1e64ff3bd
commit a84145421f
3 changed files with 162 additions and 2 deletions

View file

@ -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 )