Files
integration/Source/Integration/Common.h

111 lines
2.2 KiB
C
Raw Normal View History

////////////////////////////////////////////////////////////
//
// Common.h
//
// Simple data types used throughout the Unreal
// interface to Luprex: type aliases, blueprint
// enums for branching, and log categories.
//
////////////////////////////////////////////////////////////
2026-02-09 13:54:00 -05:00
#pragma once
#include <string_view>
#include "Common.generated.h"
////////////////////////////////////////////////////////////
//
// LpxCommonTypes
2026-02-09 13:54:00 -05:00
//
// Type aliases used throughout the integration.
2026-02-09 13:54:00 -05:00
//
////////////////////////////////////////////////////////////
2026-02-09 13:54:00 -05:00
namespace LpxCommonTypes {
// Array of tangible IDs.
//
2026-02-09 13:54:00 -05:00
using IdArray = TArray<int64>;
// View of Array of tangible IDs.
//
2026-02-09 13:54:00 -05:00
using IdView = TArrayView<const int64>;
// Array of std::string_view.
//
2026-02-09 13:54:00 -05:00
using StringViewVec = TArray<std::string_view>;
}
////////////////////////////////////////////////////////////
2026-02-09 13:54:00 -05:00
//
// ElxLuaValueType
2026-02-09 13:54:00 -05:00
//
// Mirror of LuaValueType from base-buffer.hpp.
// Values must match one-for-one. Note that "token"
// has been renamed to "name" (synonymous).
//
////////////////////////////////////////////////////////////
2026-02-09 13:54:00 -05:00
UENUM(BlueprintType)
enum class ElxLuaValueType : uint8 {
End,
String,
Name,
Float,
Boolean,
Vector
};
////////////////////////////////////////////////////////////
//
// Branching Enums
2026-02-09 13:54:00 -05:00
//
// Boolean-like results used with ExpandEnumAsExecs
// to create branching blueprint functions.
2026-02-09 13:54:00 -05:00
//
////////////////////////////////////////////////////////////
2026-02-09 13:54:00 -05:00
UENUM(BlueprintType)
enum class ElxSuccessOrError : uint8 {
Success,
Error,
};
UENUM(BlueprintType)
enum class ElxValidOrNotValid : uint8 {
Valid,
NotValid,
};
UENUM(BlueprintType)
enum class ElxFoundOrNotFound : uint8 {
Found,
NotFound,
};
UENUM(BlueprintType)
enum class ElxUsedOrNotUsed : uint8 {
Used,
NotUsed,
};
UENUM(BlueprintType)
enum class ElxSuccessOrWrongType : uint8 {
Success,
WrongType,
};
////////////////////////////////////////////////////////////
2026-02-09 13:54:00 -05:00
//
// Log Categories
2026-02-09 13:54:00 -05:00
//
////////////////////////////////////////////////////////////
2026-02-09 13:54:00 -05:00
// Messages from inside the Luprex Core.
//
2026-02-09 13:54:00 -05:00
DECLARE_LOG_CATEGORY_EXTERN(LogLuprex, Display, All);
// Messages about the Luprex integration with Unreal.
//
2026-02-09 13:54:00 -05:00
DECLARE_LOG_CATEGORY_EXTERN(LogLuprexIntegration, Display, All);