Files
UnrealEngine/Engine/Source/Editor/KismetCompiler/Private/KismetCompilerBackend.h
2025-05-18 13:04:45 +08:00

48 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "KismetCompiledFunctionContext.h"
#include "KismetCompiler.h"
//////////////////////////////////////////////////////////////////////////
// IKismetCompilerBackend
class IKismetCompilerBackend
{
};
//////////////////////////////////////////////////////////////////////////
// FKismetVMBackend
class FKismetCompilerVMBackend : public IKismetCompilerBackend
{
public:
typedef TMap<FBlueprintCompiledStatement*, CodeSkipSizeType> TStatementToSkipSizeMap;
protected:
UBlueprint* Blueprint;
UEdGraphSchema_K2* Schema;
FCompilerResultsLog& MessageLog;
FKismetCompilerContext& CompilerContext;
TStatementToSkipSizeMap UbergraphStatementLabelMap;
public:
FKismetCompilerVMBackend(UBlueprint* InBlueprint, UEdGraphSchema_K2* InSchema, FKismetCompilerContext& InContext)
: Blueprint(InBlueprint)
, Schema(InSchema)
, MessageLog(InContext.MessageLog)
, CompilerContext(InContext)
{
}
void GenerateCodeFromClass(UClass* SourceClass, TIndirectArray<FKismetFunctionContext>& Functions, bool bGenerateStubsOnly=false);
protected:
/** Builds both the header declaration and body implementation of a function */
void ConstructFunction(FKismetFunctionContext& FunctionContext, bool bIsUbergraph, bool bGenerateStubOnly);
};
//////////////////////////////////////////////////////////////////////////