ExpandIterator

Wrapper around existing iterator that returns multiple values, of potentially different type, for each value that input iterator returns.

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Util/IteratorUtil.h

Include

#include "Util/IteratorUtil.h"

Syntax

template<typename OutputType, typename InputType, typename InputIteratorT>
class ExpandIterator

Remarks

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

Variables

Name Description

Public variable

InputIteratorT

 

Cur

Public variable

int

 

CurExpandI

Public variable

OutputType

 

CurValue

Public variable

InputIteratorT

 

End

Public variable

ExpandFunctionT

 

ExpandFunc

Constructors

Name Description

Public function

ExpandIterator()

Public function

ExpandIterator

(
    const InputIteratorT& CurItr,
    const InputIteratorT& EndItr,
    const ExpandFunctionT& ExpandFuncI...
)

Functions

Name Description

Public function

void

 

goto_next()

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const ExpandIterator& Other
)

Public function Const

OutputType

 

operator*()

Public function

const Expand...

 

operator++()

Public function Const

bool

 

operator==

(
    const ExpandIterator& Other
)

Typedefs

Name

Description

ExpandFunctionT

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss