UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
QuartzCommandQueue.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include <type_traits>
9
10
11// forwards
13{
14 template <typename... Ts>
16 {
17 private:
18 // type aliasing for private code...
19 template <class ConsumerBaseType>
21 using ICommandBase = typename TVisitorPatternBase<Ts...>::IVisitorBase;
22
23 public:
24 // type aliasing for client code...
25 // IConsumerBase supports polymorphic access / containers of consumers
26 using IConsumerBase = typename TVisitorPatternBase<Ts...>::IListenerBase;
27
28 // TConsumerBase is the template base class which concrete consumer types should inherit from
29 template <typename... ConsumerInterfaces>
30 using TConsumerBase = typename TVisitorPatternBase<Ts...>::template TElementBase<ConsumerInterfaces...>;
31
32 public:
33 // begin TQuartzCommandQueue interface
36
42 template <class TargetInterface>
44 {
45 Queue.ProduceItem(MakeUnique<TCommand<TargetInterface>>(MoveTempIfPossible(InLambda)));
46 }
47
48 // note: this is not currently needed for this implementation, but is an example of
49 // polymorphic consumer usage and having multiple listeners listen to a single
50 // set of pending commands.
74
75 private:
77 }; // class TQuartzCommandQueue
78} // namespace Audio::Quartz::PrivateDefs
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_FORCEINLINE_HINT TUniquePtr< T > MakeUnique(TArgs &&... Args)
Definition UniquePtr.h:918
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTempIfPossible(T &&Obj) noexcept
Definition UnrealTemplate.h:538
Definition QuartzCommandQueue.h:16
typename TVisitorPatternBase< Ts... >::IListenerBase IConsumerBase
Definition QuartzCommandQueue.h:26
void PumpCommandQueue(IConsumerBase &InListener)
Definition QuartzCommandQueue.h:67
typename TVisitorPatternBase< Ts... >::template TElementBase< ConsumerInterfaces... > TConsumerBase
Definition QuartzCommandQueue.h:30
void PushLambda(TFunction< void(TargetInterface &)> InLambda)
Definition QuartzCommandQueue.h:43
Definition QuartzCompileTimeVisitor.h:58
Definition AndroidPlatformMisc.h:14
Definition UniquePtr.h:107
Definition ConsumeAllMpmcQueue.h:26
EConsumeAllMpmcQueueResult ConsumeAllFifo(const F &Consumer)
Definition ConsumeAllMpmcQueue.h:83
EConsumeAllMpmcQueueResult ProduceItem(ArgTypes &&... Args)
Definition ConsumeAllMpmcQueue.h:54
Definition QuartzCommandQueue.h:13