MCPcopy Create free account
hub / github.com/PCGEx/PCGExtendedToolkit / Write

Method Write

Source/PCGExtendedToolkit/Private/Data/PCGExData.cpp:92–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 3

CompleteWorkMethod · 0.45
CompleteWorkMethod · 0.45

Calls 7

WriteBufferFunction · 0.85
FlushFunction · 0.85
GetOutKeysMethod · 0.80
NumMethod · 0.80
IsWritableMethod · 0.80
IsAvailableMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected