|
ArticyXImporter
ArticyXImporter for Unreal Engine
|
A class to generate and manage string tables in CSV format. More...
#include <StringTableGenerator.h>
Public Member Functions | |
| template<typename Lambda> | |
| void | SafeExecute (Lambda Lamb) |
| Executes a lambda safely. | |
| template<typename Lambda> | |
| StringTableGenerator (const FString &TableName, const FString &Culture, Lambda ContentGenerator) | |
| Constructs a StringTableGenerator and executes a content generator lambda. | |
| void | Line (const FString &Key="", const FString &SourceString="") |
| Adds a line to the content string. | |
| template<> | |
| void | SafeExecute (nullptr_t Lamb) |
A class to generate and manage string tables in CSV format.
This class holds a content string that can be written to a CSV file. It is used for generating string tables for localization purposes, where each entry consists of a key and its corresponding source string.
| StringTableGenerator::StringTableGenerator | ( | const FString & | TableName, |
| const FString & | Culture, | ||
| Lambda | ContentGenerator ) |
Constructs a StringTableGenerator and executes a content generator lambda.
This constructor initializes the file path and prepares the CSV header. It then executes the provided lambda function to generate content and writes it to a file.
| Lambda | The type of the lambda function. |
| TableName | The name of the string table. |
| Culture | The culture/language code for localization. |
| ContentGenerator | A lambda function to generate the content of the string table. |
| void StringTableGenerator::Line | ( | const FString & | Key = "", |
| const FString & | SourceString = "" ) |
Adds a line to the content string.
| Key | The key for the string entry. |
| SourceString | The source string for the entry. |
| void StringTableGenerator::SafeExecute | ( | Lambda | Lamb | ) |
Executes a lambda safely.
This method executes a given lambda function. If the lambda is nullptr, it does nothing.
| Lambda | The type of the lambda function. |
| Lamb | The lambda function to execute. |