5#if WITH_VERSE_VM || defined(__INTELLISENSE__)
25struct FAllocationContext;
38#define VCPPCLASSINFO_PORTABLE_MSC_SUPER \
40 __pragma(warning(push)) __pragma(warning(disable : 4495)) __super __pragma(warning(pop))
42#define VCPPCLASSINFO_PORTABLE_MSC_SUPER Super
45#define DECLARE_BASE_VCPPCLASSINFO(API) \
47 auto CheckSuperClass() \
52 API void VisitInheritedAndNonInheritedReferences(::Verse::FAbstractVisitor& Visitor); \
53 API void VisitInheritedAndNonInheritedReferences(::Verse::FMarkStackVisitor& Visitor); \
56 API static ::Verse::VCppClassInfo StaticCppClassInfo;
58#define DECLARE_DERIVED_VCPPCLASSINFO(API, SuperClass) \
60 template <typename TVisitor> \
61 void VisitReferencesImpl(TVisitor&); \
64 auto CheckSuperClass() \
66 auto SuperThis = VCPPCLASSINFO_PORTABLE_MSC_SUPER::CheckSuperClass(); \
67 static_assert(std::is_same_v<decltype(SuperThis), SuperClass*>, \
68 "Declared super-class " #SuperClass " does not match actual super-class."); \
72 API void VisitInheritedAndNonInheritedReferences(::Verse::FAbstractVisitor& Visitor); \
73 API void VisitInheritedAndNonInheritedReferences(::Verse::FMarkStackVisitor& Visitor); \
76 using Super = SuperClass; \
77 API static ::Verse::VCppClassInfo StaticCppClassInfo;
79#define DEFINE_BASE_OR_DERIVED_VCPPCLASSINFO(CellType, SuperClassInfoPtr) \
80 ::Verse::VCppClassInfo CellType::StaticCppClassInfo = { \
82 (SuperClassInfoPtr), \
84 [](::Verse::VCell* This, ::Verse::FMarkStackVisitor& Visitor) -> void { \
85 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
86 This->StaticCast<CellType>().VisitInheritedAndNonInheritedReferences(Visitor); \
88 [](::Verse::VCell* This, ::Verse::FAbstractVisitor& Visitor) -> void { \
89 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
90 ::Verse::FAbstractVisitor::FReferrerContext Context(Visitor, FReferenceToken(This)); \
91 This->StaticCast<CellType>().VisitInheritedAndNonInheritedReferences(Visitor); \
93 [](::Verse::VCell* This) -> void { \
94 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
95 This->StaticCast<CellType>().ConductCensusImpl(); \
97 std::is_trivially_destructible_v<CellType> ? nullptr : [](::Verse::VCell* This) -> void { \
98 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
99 This->StaticCast<CellType>().~CellType(); \
101 [](::Verse::FAllocationContext Context, ::Verse::VCell* This, ::Verse::VCell* Other, const TFunction<void(::Verse::VValue, ::Verse::VValue)>& HandlePlaceholder) -> ::Verse::ECompares { \
102 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
103 return This->StaticCast<CellType>().EqualImpl(Context, Other, HandlePlaceholder); \
105 [](::Verse::VCell* This) -> uint32 { \
106 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
107 return This->StaticCast<CellType>().GetTypeHashImpl(); \
109 [](::Verse::FAllocationContext Context, ::Verse::VCell* This) -> ::Verse::VValue { \
110 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
111 return This->StaticCast<CellType>().MeltImpl(Context); \
113 [](::Verse::FAllocationContext Context, ::Verse::VCell* This, ::Verse::VTask* Task, ::Verse::FOp* AwaitPC) -> ::Verse::FOpResult { \
114 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
115 return This->StaticCast<CellType>().FreezeImpl(Context, Task, AwaitPC); \
117 [](::Verse::FAllocationContext Context, ::Verse::VCell* This, ::Verse::VValue InputValue) -> bool { \
119 return This->StaticCast<CellType>().SubsumesImpl(Context, InputValue); \
121 [](::Verse::FAllocationContext Context, ::Verse::VCell* This, ::Verse::FDebuggerVisitor& Visitor) -> void { \
122 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
123 This->StaticCast<CellType>().VisitMembersImpl(Context, Visitor); \
125 [](::Verse::FAllocationContext Context, ::Verse::VCell* This, FUtf8StringBuilderBase& Builder, ::Verse::EValueStringFormat Format, TSet<const void*>& VisitedObjects, uint32 RecursionDepth) -> void { \
127 This->StaticCast<CellType>().AppendToStringImpl(Context, Builder, Format, VisitedObjects, RecursionDepth); \
129 [](::Verse::FRunningContext Context, ::Verse::VCell* This, ::Verse::EValueJSONFormat Format, TMap<const void*, ::Verse::EVisitState>& VisitedObjects, const ::Verse::VerseVMToJsonCallback& Callback, uint32 RecursionDepth, FJsonObject* Defs) -> TSharedPtr<FJsonValue> { \
131 return This->StaticCast<CellType>().ToJSONImpl(Context, Format, VisitedObjects, Callback, RecursionDepth, Defs); \
133 [](::Verse::FRunningContext Context, ::Verse::VCell* This, const FJsonValue& JsonValue, ::Verse::EValueJSONFormat Format) -> ::Verse::VValue { \
134 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
135 return This->StaticCast<CellType>().FromJSONImpl(Context, JsonValue, Format); \
137 [](::Verse::FAllocationContext Context, ::Verse::VCell*& This, ::Verse::FStructuredArchiveVisitor& Visitor) -> void { \
139 CellType* Scratch = This != nullptr ? &This->StaticCast<CellType>() : nullptr; \
140 CellType::SerializeLayout(Context, Scratch, Visitor); \
143 [](::Verse::FAllocationContext Context, ::Verse::VCell* This, ::Verse::FStructuredArchiveVisitor& Visitor) -> void { \
145 This->StaticCast<CellType>().SerializeImpl(Context, Visitor); \
147 CellType::SerializeIdentity}; \
148 ::Verse::VCppClassInfoRegister CellType##_Register(&CellType::StaticCppClassInfo);
150#define DEFINE_BASE_VCPPCLASSINFO(CellType) \
151 DEFINE_BASE_OR_DERIVED_VCPPCLASSINFO(CellType, nullptr) \
152 void CellType::VisitInheritedAndNonInheritedReferences(::Verse::FAbstractVisitor& Visitor) \
154 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
155 VisitReferencesImpl(Visitor); \
158 void CellType::VisitInheritedAndNonInheritedReferences(::Verse::FMarkStackVisitor& Visitor) \
160 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
161 VisitReferencesImpl(Visitor); \
164#define DEFINE_DERIVED_VCPPCLASSINFO(CellType) \
165 static_assert(!std::is_same_v<CellType::Super, CellType>, #CellType " declares itself as its super-class in DECLARE_DERIVED_VCPPCLASSINFO."); \
166 static_assert(std::is_base_of_v<CellType::Super, CellType>, #CellType " doesn't derive from the super-class declared by DECLARE_DERIVED_VCPPCLASSINFO."); \
167 static_assert(std::is_base_of_v<::Verse::VCell, CellType::Super>, #CellType "'s super-class as declared by DECLARE_DERIVED_VCPPCLASSINFO does not derive from VCell."); \
168 static_assert(!std::is_polymorphic_v<CellType>, "VCell-derived C++ classes must not have virtual methods."); \
169 DEFINE_BASE_OR_DERIVED_VCPPCLASSINFO(CellType, &CellType::Super::StaticCppClassInfo) \
170 void CellType::VisitInheritedAndNonInheritedReferences(::Verse::FAbstractVisitor& Visitor) \
172 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
173 Super::VisitInheritedAndNonInheritedReferences(Visitor); \
174 VisitReferencesImpl(Visitor); \
177 void CellType::VisitInheritedAndNonInheritedReferences(::Verse::FMarkStackVisitor& Visitor) \
179 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
180 Super::VisitInheritedAndNonInheritedReferences(Visitor); \
181 VisitReferencesImpl(Visitor); \
184#define DEFINE_TRIVIAL_VISIT_REFERENCES(CellType) \
185 template <typename TVisitor> \
186 void CellType::VisitReferencesImpl(TVisitor&) \
188 AutoRTFM::UnreachableIfClosed("#jira SOL-8416"); \
254template <
typename VisitorType,
typename ValueType>
257template <
typename VisitorType,
typename KeyType,
typename ValueType>
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
const bool
Definition NetworkReplayStreaming.h:178
decltype(auto) Visit(Func &&Callable, Variants &&... Args)
Definition TVariant.h:271
#define V_FORCEINLINE
Definition VVMVerse.h:30
Definition JsonObject.h:23
Definition JsonValue.h:22
Definition AndroidPlatformMisc.h:14
Definition UnrealString.h.inl:34
Definition SharedPointer.h:692
Definition StringBuilder.h:79
@ Visitor
Definition XmppMultiUserChat.h:94
bool IsA(const UStruct *)
Definition MassEntityElementTypes.h:49
EValueJSONFormat
Definition VVMJson.h:47
EValueStringFormat
Definition VVMValuePrinting.h:17
EVisitState
Definition VVMJson.h:54