| 90 | } |
| 91 | |
| 92 | void FFacade::Write(const TSharedPtr<PCGExMT::FTaskManager>& AsyncManager, const bool bEnsureValidKeys) |
| 93 | { |
| 94 | if (!AsyncManager || !AsyncManager->IsAvailable() || !Source->GetOut()) { return; } |
| 95 | |
| 96 | //UE_LOG(LogTemp, Warning, TEXT("{%lld} Facade -> Write"), AsyncManager->Context->GetInputSettings<UPCGSettings>()->UID) |
| 97 | |
| 98 | if (ValidateOutputsBeforeWriting()) |
| 99 | { |
| 100 | if (bEnsureValidKeys) { Source->GetOutKeys(true); } |
| 101 | |
| 102 | { |
| 103 | FWriteScopeLock WriteScopeLock(BufferLock); |
| 104 | |
| 105 | for (int i = 0; i < Buffers.Num(); i++) |
| 106 | { |
| 107 | const TSharedPtr<FBufferBase> Buffer = Buffers[i]; |
| 108 | if (!Buffer.IsValid() || !Buffer->IsWritable() || !Buffer->IsEnabled()) { continue; } |
| 109 | WriteBuffer(AsyncManager, Buffer, false); |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | Flush(); |
| 115 | } |
| 116 | |
| 117 | int32 FFacade::WriteBuffersAsCallbacks(const TSharedPtr<PCGExMT::FTaskGroup>& TaskGroup) |
| 118 | { |
no test coverage detected