UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TCommandPipe< CommandType > Class Template Reference

#include <SceneVisibilityPrivate.h>

Public Types

using CommandFunctionType = TFunction< void(CommandType &&)>
 
using EmptyFunctionType = TFunction< void()>
 

Public Member Functions

 TCommandPipe (const TCHAR *InName)
 
 ~TCommandPipe ()
 
void SetCommandFunction (CommandFunctionType &&InCommandFunction)
 
void SetEmptyFunction (TFunction< void()> &&InEmptyFunction)
 
void SetPrerequisiteTask (const UE::Tasks::FTask &InPrerequisiteTask)
 
void AddNumCommands (int32 InNumCommands)
 
void ReleaseNumCommands (int32 InNumCommands)
 
template<typename... ArgTypes>
void EnqueueCommand (ArgTypes &&... Args)
 
bool IsEmpty () const
 
void Wait ()
 

Detailed Description

template<typename CommandType>
class TCommandPipe< CommandType >

An async MPSC queue that can schedule serialized tasks onto the render thread or a task thread. When a new command is enqueued into an empty queue, a task is launched to process all pending elements in the queue as soon as possible. Each command must be reserved with AddNumCommands, which acts as a reference count on the number of pending commands in the pipe. This is necessary to determine when the pipe is 'done' and can signal a completion event or callback.

Member Typedef Documentation

◆ CommandFunctionType

template<typename CommandType >
using TCommandPipe< CommandType >::CommandFunctionType = TFunction<void(CommandType&&)>

◆ EmptyFunctionType

template<typename CommandType >
using TCommandPipe< CommandType >::EmptyFunctionType = TFunction<void()>

Constructor & Destructor Documentation

◆ TCommandPipe()

template<typename CommandType >
TCommandPipe< CommandType >::TCommandPipe ( const TCHAR InName)
inline

◆ ~TCommandPipe()

template<typename CommandType >
TCommandPipe< CommandType >::~TCommandPipe ( )
inline

Member Function Documentation

◆ AddNumCommands()

template<typename CommandType >
void TCommandPipe< CommandType >::AddNumCommands ( int32  InNumCommands)
inline

◆ EnqueueCommand()

template<typename CommandType >
template<typename... ArgTypes>
void TCommandPipe< CommandType >::EnqueueCommand ( ArgTypes &&...  Args)
inline

◆ IsEmpty()

template<typename CommandType >
bool TCommandPipe< CommandType >::IsEmpty ( ) const
inline

◆ ReleaseNumCommands()

template<typename CommandType >
void TCommandPipe< CommandType >::ReleaseNumCommands ( int32  InNumCommands)
inline

◆ SetCommandFunction()

template<typename CommandType >
void TCommandPipe< CommandType >::SetCommandFunction ( CommandFunctionType &&  InCommandFunction)
inline

◆ SetEmptyFunction()

template<typename CommandType >
void TCommandPipe< CommandType >::SetEmptyFunction ( TFunction< void()> &&  InEmptyFunction)
inline

◆ SetPrerequisiteTask()

template<typename CommandType >
void TCommandPipe< CommandType >::SetPrerequisiteTask ( const UE::Tasks::FTask InPrerequisiteTask)
inline

◆ Wait()

template<typename CommandType >
void TCommandPipe< CommandType >::Wait ( )
inline

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