Navigation
API > API/Plugins > API/Plugins/PCG > API/Plugins/PCG/Elements > API/Plugins/PCG/Elements/Metadata > API/Plugins/PCG/Elements/Metadata/PCG__Private__NAryOperation__Gat-
References
| Module | PCG |
| Header | /Engine/Plugins/PCG/Source/PCG/Public/Elements/Metadata/PCGMetadataOpElementBase.h |
| Include | #include "Elements/Metadata/PCGMetadataOpElementBase.h" |
namespace PCG
{
namespace Private
{
namespace NAryOperation
{
template<typename... Callbacks, typename InputType, typename... InputTypes, typename... Args>
bool PCG::Private::NAryOperation::Gather
(
PCGMetadataOps::FOperationData & InOperationData,
int32 StartIndex,
int32 Range,
const Options & InOptions,
const TTuple< Callbacks... > & InCallbacks,
int InputIndex,
Signature < InputType, InputTypes... > S,
Args &&... InArgs
)
}
}
}
Remarks
The idea of gather is to pack all the input values at the end of the function call. We use InputType, from our Signature struct to extract the current InputType, get a range of values from our accessor (using the InputIndex) then call Gather recursively, with the rest of our input types in Signature, InputIndex incremented by one and our newly InputValues moved at the end and packed into InArgs. We specialize the case where Signature is empty, meaning we got all our input values.
For example, if InputTypes =