MCRO
C++23 utilities for Unreal Engine.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
Mcro::Range::OutputTo< Target > Class Template Reference

Render a range to an already existing container. More...

#include <Conversion.h>

Public Member Functions

 OutputTo (Target &target)
 

Friends

template<CRangeMember From>
Target & operator| (From &&range, OutputTo &&functor)
 

Detailed Description

template<CUnrealRange Target>
class Mcro::Range::OutputTo< Target >

Render a range to an already existing container.

This functor will iterate over the entire input range and copy its values to the given container one-by-one. Target container must expose iterators which allows modifying its content. If the input range has more items than the target container current size, then start using its Add function.

usage:

using namespace ranges;
TArray<int32> Storage;
Storage.SetNumUninitialized(5);
auto result = views::ints(0, 10)
| views::stride(2)
| OutputTo(Storage);
// -> TArray<int32> {0, 2, 4, 6, 8}
OutputTo(Target &target)
Definition Conversion.h:349
Template Parameters
TargetAn Unreal container which has a public function member Add, the element-type of which will be deduced from the target output container.

Definition at line 326 of file Conversion.h.

Constructor & Destructor Documentation

◆ OutputTo()

template<CUnrealRange Target>
Mcro::Range::OutputTo< Target >::OutputTo ( Target & target)
inline

Definition at line 349 of file Conversion.h.

Friends And Related Symbol Documentation

◆ operator|

template<CUnrealRange Target>
template<CRangeMember From>
Target & operator| ( From && range,
OutputTo< Target > && functor )
friend

Definition at line 352 of file Conversion.h.


The documentation for this class was generated from the following file: