7#include "Containers/UnrealString.h"
31 template<
typename Lambda>
45 template<
typename Lambda>
54 void Line(
const FString& Key =
"",
const FString& SourceString =
"");
62 FString FileContent =
"";
69 void WriteToFile()
const;
75template<
typename Lambda>
87template <
typename Lambda>
90 const FString FilePath = TEXT(
"ArticyContent/Generated") / TableName;
91 if (Culture.IsEmpty())
93 Path = FPaths::ProjectContentDir() / FilePath;
97 Path = FPaths::ProjectContentDir() / TEXT(
"L10N") / Culture / FilePath;
101 Line(
"Key",
"SourceString");
102 bool bContentWritten =
false;
103 if (ensure(!std::is_null_pointer<Lambda>::value))
104 bContentWritten = ContentGenerator(
this) != 0;
void SafeExecute(Lambda Lamb)
Executes a lambda safely.
Definition StringTableGenerator.h:76
void Line(const FString &Key="", const FString &SourceString="")
Adds a line to the content string.
Definition StringTableGenerator.cpp:13
StringTableGenerator(const FString &TableName, const FString &Culture, Lambda ContentGenerator)
Constructs a StringTableGenerator and executes a content generator lambda.
Definition StringTableGenerator.h:88