9#define WARNING_LOCATION(Line) __FILE__ "(" PREPROCESSOR_TO_STRING(Line) ")"
20#define PLAYWORLD_PACKAGE_PREFIX TEXT("UEDPIE")
22#ifndef WITH_EDITORONLY_DATA
23 #if !PLATFORM_CAN_SUPPORT_EDITORONLY_DATA || UE_SERVER || PLATFORM_IOS
24 #define WITH_EDITORONLY_DATA 0
26 #define WITH_EDITORONLY_DATA 1
32#define WITH_METADATA WITH_EDITORONLY_DATA
33#elif WITH_EDITORONLY_DATA && !WITH_METADATA
34#error WITH_EDITORONLY_DATA=1 requires WITH_METADATA=1
38#ifndef UE_CHECK_DISABLE_OPTIMIZATION
39#define UE_CHECK_DISABLE_OPTIMIZATION 0
45#define UE_DISABLE_OPTIMIZATION_SHIP PRAGMA_DISABLE_OPTIMIZATION_ACTUAL
49 #define UE_ENABLE_OPTIMIZATION_SHIP PRAGMA_DISABLE_OPTIMIZATION_ACTUAL
51 #define UE_ENABLE_OPTIMIZATION_SHIP PRAGMA_ENABLE_OPTIMIZATION_ACTUAL
55#if UE_CHECK_DISABLE_OPTIMIZATION
56 #define UE_DISABLE_OPTIMIZATION static_assert(false, "Error UE_DISABLE_OPTIMIZATION submitted. Use UE_DISABLE_OPTIMIZATION_SHIP to submit with optimizations off.");
57 #define UE_ENABLE_OPTIMIZATION static_assert(false, "Error UE_ENABLE_OPTIMIZATION submitted. Use UE_ENABLE_OPTIMIZATION_SHIP to submit with optimizations off.");
59 #define UE_DISABLE_OPTIMIZATION UE_DISABLE_OPTIMIZATION_SHIP
60 #define UE_ENABLE_OPTIMIZATION UE_ENABLE_OPTIMIZATION_SHIP
63#define PRAGMA_DISABLE_OPTIMIZATION \
64 UE_DEPRECATED_MACRO(5.2, "PRAGMA_DISABLE_OPTIMIZATION has been deprecated. Use UE_DISABLE_OPTIMIZATION for temporary development or UE_DISABLE_OPTIMIZATION_SHIP to submit") \
65 UE_DISABLE_OPTIMIZATION_SHIP
67#define PRAGMA_ENABLE_OPTIMIZATION \
68 UE_DEPRECATED_MACRO(5.2, "PRAGMA_ENABLE_OPTIMIZATION has been deprecated. Use UE_ENABLE_OPTIMIZATION for temporary development or UE_ENABLE_OPTIMIZATION_SHIP to submit") \
69 UE_ENABLE_OPTIMIZATION_SHIP
72 #define FORCEINLINE_DEBUGGABLE FORCEINLINE_DEBUGGABLE_ACTUAL
74 #define FORCEINLINE_DEBUGGABLE FORCEINLINE
79#if !defined(UE_DONT_INLINE_CALL)
80 #if defined(__clang__) && defined(__has_cpp_attribute) && __has_cpp_attribute(clang::noinline)
81 #define UE_DONT_INLINE_CALL [[clang::noinline]]
83 #define UE_DONT_INLINE_CALL
89 #define CLOCK_CYCLES(Timer) {Timer -= FPlatformTime::Cycles();}
90 #define UNCLOCK_CYCLES(Timer) {Timer += FPlatformTime::Cycles();}
92 #define CLOCK_CYCLES(Timer)
93 #define UNCLOCK_CYCLES(Timer)
96#define SHUTDOWN_IF_EXIT_REQUESTED
97#define RETURN_IF_EXIT_REQUESTED
98#define RETURN_VAL_IF_EXIT_REQUESTED(x)
100#if CHECK_PUREVIRTUALS
101#define PURE_VIRTUAL(func,...) =0;
103#define PURE_VIRTUAL(func,...) { LowLevelFatalError(TEXT("Pure virtual not implemented (%s)"), TEXT(#func)); __VA_ARGS__ }
108#ifndef USING_CODE_ANALYSIS
109 #define USING_CODE_ANALYSIS 0
112#if USING_CODE_ANALYSIS
113 #if !defined( CA_IN ) || !defined( CA_OUT ) || !defined( CA_READ_ONLY ) || !defined( CA_WRITE_ONLY ) || !defined( CA_VALID_POINTER ) || !defined( CA_CHECK_RETVAL ) || !defined( CA_NO_RETURN ) || !defined( CA_SUPPRESS ) || !defined( CA_ASSUME )
114 #error Code analysis macros are not configured correctly for this platform
121 #define CA_WRITE_ONLY
122 #define CA_VALID_POINTER
123 #define CA_CHECK_RETVAL
125 #define CA_SUPPRESS( WarningNumber )
126 #define CA_ASSUME( Expr ) ((void)sizeof((bool)(Expr)))
127 #define CA_CONSTANT_IF(Condition) if (Condition)
130#ifndef USING_INSTRUMENTATION
131 #define USING_INSTRUMENTATION 0
134#ifndef USING_THREAD_SANITISER
135 #define USING_THREAD_SANITISER 0
138#if USING_THREAD_SANITISER || USING_INSTRUMENTATION
139 #if !defined( TSAN_SAFE ) || !defined( TSAN_BEFORE ) || !defined( TSAN_AFTER ) || !defined( TSAN_ATOMIC )
140 #error Thread Sanitiser macros are not configured correctly for this platform
145 #define TSAN_BEFORE(Addr)
146 #define TSAN_AFTER(Addr)
147 #define TSAN_ATOMIC(Type) Type
169 #define UE_PUSH_MACRO(name) _Pragma(PREPROCESSOR_TO_STRING(push_macro(name)))
170 #define UE_POP_MACRO(name) _Pragma(PREPROCESSOR_TO_STRING(pop_macro(name)))
172 #define UE_PUSH_MACRO(name) __pragma(push_macro(name))
173 #define UE_POP_MACRO(name) __pragma(pop_macro(name))
178 #define ANONYMOUS_VARIABLE( Name ) PREPROCESSOR_JOIN(Name, __COUNTER__)
182 #define ANONYMOUS_VARIABLE( Name ) PREPROCESSOR_JOIN(Name, __LINE__)
186#define UE_CALL_ONCE(Func, ...) static int32 ANONYMOUS_VARIABLE(ThreadSafeOnce) = ((Func)(__VA_ARGS__), 1)
188#if defined (__INTELLISENSE__)
190 #define UE_DEPRECATED(Version, Message)
192 #define PRAGMA_DISABLE_INTERNAL_WARNINGS
193 #define PRAGMA_ENABLE_INTERNAL_WARNINGS
194 #define UE_EXPERIMENTAL(Version, Message)
195 #define PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS
196 #define PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS
302 #define UE_DEPRECATED(Version, Message) [[deprecated(Message " - Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.")]]
313 #define UE_DEPRECATED_ERROR(Version, Message) [[deprecated(Message " - ** This is a compile error so as to avoid data loss, or similar. ** You will need to update your code to get it to compile correctly.")]]
318 #define UE_DEPRECATED_ERROR_WITH_MOVED_MEMBER_MESSAGE(Version, Member, Message) \
319 [[deprecated(Message " ** This is a compile error so as to avoid data loss, or similar. ** You will need to update your code to get it to compile correctly.")]] \
320 FDeprecationCompileError Member;
323 #define UE_DEPRECATED_ERROR_WITH_MOVED_MEMBER(Version, Member) UE_DEPRECATED_ERROR_WITH_MOVED_MEMBER_MESSAGE(Version, Member, "The member " #Member " has moved. Use the Get/Set" #Member " accessors instead.")
326 #define UE_DEPRECATED_ERROR_WITH_MOVED_BOOL_MEMBER(Version, Member) UE_DEPRECATED_ERROR_WITH_MOVED_MEMBER_MESSAGE(Version, b##Member, "The member b" #Member " has moved. Use the Get/Set" #Member " accessors instead.")
340 #if UE_VALIDATE_INTERNAL_API
341 #define UE_INTERNAL [[deprecated("This API is internal to the engine. As such, there is no guarantee that it won't change or be removed in future releases. Please use at your own risk.")]]
342 #define PRAGMA_DISABLE_INTERNAL_WARNINGS PRAGMA_DISABLE_DEPRECATION_WARNINGS
343 #define PRAGMA_ENABLE_INTERNAL_WARNINGS PRAGMA_ENABLE_DEPRECATION_WARNINGS
346 #define PRAGMA_DISABLE_INTERNAL_WARNINGS
347 #define PRAGMA_ENABLE_INTERNAL_WARNINGS
364 #if UE_VALIDATE_EXPERIMENTAL_API
365 #define UE_EXPERIMENTAL(Version, Message) [[deprecated(Message " - This API is experimental. As such, there is no guarantee that it won't change or be removed in future releases. Please use at your own risk.")]]
366 #define PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS PRAGMA_DISABLE_DEPRECATION_WARNINGS
367 #define PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS PRAGMA_ENABLE_DEPRECATION_WARNINGS
369 #define UE_EXPERIMENTAL(Version, Message)
370 #define PRAGMA_DISABLE_EXPERIMENTAL_WARNINGS
371 #define PRAGMA_ENABLE_EXPERIMENTAL_WARNINGS
376#ifndef UE_DEPRECATED_FORGAME
377 #define UE_DEPRECATED_FORGAME PREPROCESSOR_NOTHING_FUNCTION
380#ifndef UE_DEPRECATED_FORENGINE
381 #define UE_DEPRECATED_FORENGINE UE_DEPRECATED
388#if defined(UE_DIRECT_HEADER_COMPILE)
390 #define UE_DEPRECATED_HEADER(Version, Message)
391#elif defined(_MSC_VER)
392 #if UE_WARNINGS_AS_ERRORS
393 #define UE_DEPRECATED_HEADER(Version, Message) __pragma(message(__FILE__ "(" PREPROCESSOR_TO_STRING(__LINE__) "): error C4996: " Message " Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile."))
395 #define UE_DEPRECATED_HEADER(Version, Message) __pragma(message(__FILE__ "(" PREPROCESSOR_TO_STRING(__LINE__) "): warning C4996: " Message " Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile."))
398 #define UE_DEPRECATED_HEADER(Version, Message) _Pragma(PREPROCESSOR_TO_STRING(message(Message " Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.")))
408#ifndef UE_STRIP_DEPRECATED_PROPERTIES
409 #define UE_STRIP_DEPRECATED_PROPERTIES 0
412template <
bool bIsDeprecated>
420#define UE_STATIC_DEPRECATE(Version, bExpression, Message) \
421 struct PREPROCESSOR_JOIN(FDeprecationMsg_, __LINE__) { \
422 [[deprecated(Message " - Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.")]] \
423 static constexpr int condition(TStaticDeprecateExpression<true>) { return 1; } \
424 static constexpr int condition(TStaticDeprecateExpression<false>) { return 1; } \
426 enum class PREPROCESSOR_JOIN(EDeprecationMsg_, __LINE__) { Value = PREPROCESSOR_JOIN(FDeprecationMsg_, __LINE__)::condition(TStaticDeprecateExpression<!!(bExpression)>()) }
431#define UE_STATIC_ASSERT_WARN(bExpression, Message) \
432 struct PREPROCESSOR_JOIN(FStaticWarningMsg_, __LINE__) { \
433 [[deprecated(Message)]] \
434 static constexpr int condition(TStaticDeprecateExpression<true>) { return 1; } \
435 static constexpr int condition(TStaticDeprecateExpression<false>) { return 1; } \
437 enum class PREPROCESSOR_JOIN(EStaticWarningMsg_, __LINE__) { Value = PREPROCESSOR_JOIN(FStaticWarningMsg_, __LINE__)::condition(TStaticDeprecateExpression<!(bExpression)>()) }
442#define UE_PTRDIFF_TO_INT32(argument) static_cast<int32>(argument)
443#define UE_PTRDIFF_TO_UINT32(argument) static_cast<uint32>(argument)
457#define UE_NONCOPYABLE(TypeName) \
458 TypeName(TypeName&&) = delete; \
459 TypeName(const TypeName&) = delete; \
460 TypeName& operator=(const TypeName&) = delete; \
461 TypeName& operator=(TypeName&&) = delete;
493 return InternalId ==
Other.InternalId;
498 return InternalId !=
Other.InternalId;
503 return UserId.InternalId;
541 return InternalId >= 0;
546 return InternalId ==
Other.InternalId;
551 return InternalId !=
Other.InternalId;
556 return InternalId <
Other.InternalId;
561 return InternalId <=
Other.InternalId;
566 return InternalId >
Other.InternalId;
571 return InternalId >=
Other.InternalId;
619#ifndef UE_WITH_REMOTE_OBJECT_HANDLE
620 #define UE_WITH_REMOTE_OBJECT_HANDLE 0
EInputDeviceConnectionState
Definition CoreMiscDefines.h:594
ENoInit
Definition CoreMiscDefines.h:158
@ NoInit
Definition CoreMiscDefines.h:158
@ INDEX_NONE
Definition CoreMiscDefines.h:150
EPerElement
Definition CoreMiscDefines.h:163
@ PerElement
Definition CoreMiscDefines.h:163
constexpr FPlatformUserId PLATFORMUSERID_NONE
Definition CoreMiscDefines.h:516
@ UNICODE_BOM
Definition CoreMiscDefines.h:151
constexpr FInputDeviceId INPUTDEVICEID_NONE
Definition CoreMiscDefines.h:590
EForceInit
Definition CoreMiscDefines.h:154
@ ForceInitToZero
Definition CoreMiscDefines.h:156
@ ForceInit
Definition CoreMiscDefines.h:155
EInPlace
Definition CoreMiscDefines.h:162
@ InPlace
Definition CoreMiscDefines.h:162
EConstEval
Definition CoreMiscDefines.h:161
@ ConstEval
Definition CoreMiscDefines.h:161
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition CoreMiscDefines.h:312
Definition CoreMiscDefines.h:414