Module |
|
Header |
/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Util/IteratorUtil.h |
Include |
#include "Util/IteratorUtil.h" |
template<typename OutputType, typename InputType, typename InputIteratorT>
class ExpandIterator
Wrapper around existing iterator that returns multiple values, of potentially different type, for each value that input iterator returns.
This is done via an "expansion" function that takes an int reference which indicates "where" we are in the expansion (eg like a state machine). How you use this value is up to you.
When the input is -1, you should interpret this as the "beginning" of handling the input value (ie we have not returned any values yet for this input value)
When you are "done" with an input value, set the outgoing int reference to -1 and the base iterator will be incremented.
If you have more values to return for this input value, set it to some positive number of your choosing.
See FDynamicMesh3::VtxTrianglesItr for an example
Name | Description | ||
---|---|---|---|
|
InputIteratorT |
Cur |
|
|
int |
CurExpandI |
|
|
OutputType |
CurValue |
|
|
InputIteratorT |
End |
|
|
ExpandFunc |
Name | Description | |
---|---|---|
|
ExpandIterator() |
|
|
ExpandIterator ( |
Name | Description | ||
---|---|---|---|
|
goto_next() |
Name | Description | ||
---|---|---|---|
|
operator!= ( |
||
|
OutputType |
operator*() |
|
|
const Expand... |
operator++() |
|
|
operator== ( |
Name |
Description |
---|---|
ExpandFunctionT |