TSpirvForwardIterator

Template forward iterator for SPIR-V instructions.

Windows
MacOS
Linux

References

Module

ShaderCompilerCommon

Header

/Engine/Source/Developer/ShaderCompilerCommon/Public/SpirvCommon.h

Include

#include "SpirvCommon.h"

Syntax

template<typename T>
class TSpirvForwardIterator

Remarks

Template forward iterator for SPIR-V instructions.

Constructors

Name Description

Public function

TSpirvForwardIterator()

Initializes the iterator with a null pointer.

Public function

TSpirvForwardIterator

(
    const TSpirvForwardIterator& Other
)

Public function

TSpirvForwardIterator

(
    T* InPtr,
    bool bPointsAtHeader
)

Initializes the iterator with the specified pointer.

Functions

Name Description

Public function Const

SpvOp

 

Opcode()

Returns the opcode of the current instruction.

Public function Const

uint32

 

Operand

(
    int32 WordOffset
)

Dereferences the value the current operand points to.

Public function Const

TDst

 

OperandAs

(
    int32 WordOffset
)

Returns the operand as the specified reinterpreted type.

Public function Const

const ANSICH...

 

OperandAsString

(
    int32 WordOffset
)

Returns the operand pointer as ANSI C string.

Public function Const

uint32

 

WordCount()

Returns the word count of the current instruction.

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const TSpirvForwardIterator& Other
)

Returns whether this iterator does not point to the same address as the other iterator.

Public function Const

T *

 

operator*()

Returns a pointer to the beginning of the SPIR-V instruction this iterator currently points to.

Public function

TSpirvForwar...

 

operator++()

Increments the iterator to point to the next SPIR-V instruction.

Public function

TSpirvForwar...

 

operator++

(
    int
)

Increments the iterator to point to the next SPIR-V instruction and returns the previous iterator state.

Public function

TSpirvForwar...

 

operator=

(
    const TSpirvForwardIterator& Other
)

Public function Const

bool

 

operator==

(
    const TSpirvForwardIterator& Other
)

Returns whether this iterator points to the same address as the other iterator.