#516 各式各样的宏(macro)、模板   macro     UE4     about a year ago (owner) Document
UnrealTemplate.h
ScopeLock.h(FScopeLock, UE::TScopeLock)

 Macros
  • STRUCT_OFFSET(Type, Member)
  • UE_ARRAY_COUNT(array)

 Templates
  • TLazySingleton
  • TGuardValue
  • TFixedAllocator
  • TRefCountPtr
TScopeGuard
Not meant for direct consumption : use ON_SCOPE_EXIT instead. RAII class that calls a lambda when it is destroyed. Usage: ON_SCOPE_EXIT{ // statements };
  • TValueOrError<ValueType, FString>
    • TValueOrError<UObject*, FString> LoadAssetFromData(const FAssetData& AssetData);
    • MakeError()
    • MakeValue()
  • TOptional<Type>
    • When IsSet() returns true, the GetValue() is meaningful.
    • Otherwise GetValue() is meaningless.