├── LICENSE ├── Plugins └── GMP │ ├── Config │ └── FilterPlugin.ini │ ├── GMP.uplugin │ ├── GenPluginBuild.bat │ └── Source │ ├── GMP │ ├── GMP.Build.cs │ ├── GMP │ │ ├── GMPArchive.h │ │ ├── GMPBPLib.h │ │ ├── GMPClass2Name.h │ │ ├── GMPClass2Prop.h │ │ ├── GMPEditorUtils.h │ │ ├── GMPFunction.h │ │ ├── GMPHub.h │ │ ├── GMPJsonSerializer.h │ │ ├── GMPJsonSerializer.inl │ │ ├── GMPKey.h │ │ ├── GMPLocalSharedStorage.h │ │ ├── GMPMacros.h │ │ ├── GMPMessageKey.h │ │ ├── GMPOnScopeExit.h │ │ ├── GMPProtoSerializer.h │ │ ├── GMPReflection.h │ │ ├── GMPRpcUtils.h │ │ ├── GMPSerializer.h │ │ ├── GMPSignals.inl │ │ ├── GMPSignalsImpl.h │ │ ├── GMPSignalsInc.h │ │ ├── GMPStruct.h │ │ ├── GMPTickBase.h │ │ ├── GMPTypeTraits.h │ │ ├── GMPUnion.h │ │ ├── GMPUtils.h │ │ ├── GMPValueOneOf.h │ │ └── GMPWorldLocals.h │ ├── Private │ │ ├── GMPArchive.cpp │ │ ├── GMPBPLib.cpp │ │ ├── GMPCore.cpp │ │ ├── GMPEditorUtils.cpp │ │ ├── GMPHub.cpp │ │ ├── GMPJsonSerializer.cpp │ │ ├── GMPJsonUtils.h │ │ ├── GMPLocalSharedStorage.cpp │ │ ├── GMPLocalSharedStorageInternal.h │ │ ├── GMPMessageKey.cpp │ │ ├── GMPMeta.cpp │ │ ├── GMPMeta.h │ │ ├── GMPModule.cpp │ │ ├── GMPProtoSerializer.cpp │ │ ├── GMPProtoSerializerBP.cpp │ │ ├── GMPProtoSerializerCpp.cpp │ │ ├── GMPProtoSerializerEditor.cpp │ │ ├── GMPProtoSerializerEditor.h │ │ ├── GMPProtoSerializerUStruct.cpp │ │ ├── GMPProtoUtils.cpp │ │ ├── GMPProtoUtils.h │ │ ├── GMPReflection.cpp │ │ ├── GMPRpcProxy.cpp │ │ ├── GMPRpcProxy.h │ │ ├── GMPRpcUtils.cpp │ │ ├── GMPSerializer.cpp │ │ ├── GMPSignalsImpl.cpp │ │ ├── GMPUnion.cpp │ │ ├── GMPUtils.cpp │ │ ├── GMPValueOneOf.cpp │ │ ├── XConsoleManager.cpp │ │ └── XConsolePythonSupport.h │ ├── Shared │ │ ├── GMPCore.h │ │ ├── GMPHelper.h │ │ ├── GMPSignals.h │ │ ├── NeuronActionFactory.h │ │ ├── PuertsSupport.h │ │ ├── UnLuaSupport.h │ │ ├── UnrealCompatibility.h │ │ └── XConsoleManager.h │ └── ThirdParty │ │ ├── google │ │ └── protobuf │ │ │ ├── descriptor.proto │ │ │ ├── descriptor.upb.c │ │ │ └── descriptor.upb.h │ │ ├── rapidjson │ │ ├── allocators.h │ │ ├── cursorstreamwrapper.h │ │ ├── document.h │ │ ├── encodedstream.h │ │ ├── encodings.h │ │ ├── error │ │ │ ├── en.h │ │ │ └── error.h │ │ ├── filereadstream.h │ │ ├── filewritestream.h │ │ ├── fwd.h │ │ ├── internal │ │ │ ├── biginteger.h │ │ │ ├── clzll.h │ │ │ ├── diyfp.h │ │ │ ├── dragonbox.h │ │ │ ├── dragonbox_to_chars.cpp │ │ │ ├── dragonbox_to_chars.h │ │ │ ├── dtoa.h │ │ │ ├── ieee754.h │ │ │ ├── itoa.h │ │ │ ├── meta.h │ │ │ ├── pow10.h │ │ │ ├── regex.h │ │ │ ├── stack.h │ │ │ ├── strfunc.h │ │ │ ├── strtod.h │ │ │ └── swap.h │ │ ├── istreamwrapper.h │ │ ├── lookaheadreader.h │ │ ├── memorybuffer.h │ │ ├── memorystream.h │ │ ├── msinttypes │ │ │ ├── inttypes.h │ │ │ └── stdint.h │ │ ├── ostreamwrapper.h │ │ ├── pointer.h │ │ ├── prettywriter.h │ │ ├── rapidjson.h │ │ ├── rapidjson.natvis │ │ ├── reader.h │ │ ├── schema.h │ │ ├── stream.h │ │ ├── stringbuffer.h │ │ ├── uri.h │ │ └── writer.h │ │ └── upb │ │ ├── base │ │ ├── descriptor_constants.h │ │ ├── internal │ │ │ └── log2.h │ │ ├── status.c │ │ ├── status.h │ │ ├── status.hpp │ │ ├── string_view.h │ │ └── string_view.hpp │ │ ├── collections │ │ ├── array.h │ │ └── map.h │ │ ├── generated_code_macros.h │ │ ├── generated_code_support.h │ │ ├── hash │ │ ├── common.c │ │ ├── common.h │ │ ├── int_table.h │ │ └── str_table.h │ │ ├── io │ │ ├── chunked_input_stream.c │ │ ├── chunked_input_stream.h │ │ ├── chunked_output_stream.c │ │ ├── chunked_output_stream.h │ │ ├── string.h │ │ ├── tokenizer.c │ │ ├── tokenizer.h │ │ ├── zero_copy_input_stream.h │ │ └── zero_copy_output_stream.h │ │ ├── json │ │ ├── decode.h │ │ ├── encode.h │ │ ├── json_decode.c │ │ └── json_encode.c │ │ ├── lex │ │ ├── atoi.c │ │ ├── atoi.h │ │ ├── round_trip.c │ │ ├── round_trip.h │ │ ├── strtod.c │ │ ├── strtod.h │ │ ├── unicode.c │ │ └── unicode.h │ │ ├── libupb.cpp │ │ ├── libupb.h │ │ ├── mem │ │ ├── alloc.c │ │ ├── alloc.h │ │ ├── arena.c │ │ ├── arena.h │ │ ├── arena.hpp │ │ └── internal │ │ │ └── arena.h │ │ ├── message │ │ ├── accessors.c │ │ ├── accessors.h │ │ ├── accessors_split64.h │ │ ├── array.c │ │ ├── array.h │ │ ├── array_split64.h │ │ ├── copy.c │ │ ├── copy.h │ │ ├── internal │ │ │ ├── accessors.h │ │ │ ├── array.h │ │ │ ├── extension.h │ │ │ ├── map.h │ │ │ ├── map_entry.h │ │ │ ├── map_sorter.h │ │ │ ├── message.h │ │ │ └── types.h │ │ ├── map.c │ │ ├── map.h │ │ ├── map_gencode_util.h │ │ ├── map_sorter.c │ │ ├── message.c │ │ ├── message.h │ │ ├── promote.c │ │ ├── promote.h │ │ ├── tagged_ptr.h │ │ ├── types.h │ │ └── value.h │ │ ├── mini_descriptor │ │ ├── build_enum.c │ │ ├── build_enum.h │ │ ├── decode.c │ │ ├── decode.h │ │ ├── internal │ │ │ ├── base92.c │ │ │ ├── base92.h │ │ │ ├── decoder.h │ │ │ ├── encode.c │ │ │ ├── encode.h │ │ │ ├── encode.hpp │ │ │ ├── modifiers.h │ │ │ └── wire_constants.h │ │ ├── link.c │ │ └── link.h │ │ ├── mini_table │ │ ├── compat.c │ │ ├── compat.h │ │ ├── enum.h │ │ ├── extension.h │ │ ├── extension_registry.c │ │ ├── extension_registry.h │ │ ├── field.h │ │ ├── file.h │ │ ├── internal │ │ │ ├── enum.h │ │ │ ├── extension.h │ │ │ ├── field.h │ │ │ ├── file.h │ │ │ ├── internal_message.c │ │ │ ├── message.h │ │ │ └── sub.h │ │ ├── message.h │ │ ├── mini_table_message.c │ │ └── sub.h │ │ ├── port │ │ ├── atomic.h │ │ ├── def.inc │ │ ├── undef.inc │ │ └── vsnprintf_compat.h │ │ ├── reflection │ │ ├── common.h │ │ ├── def.h │ │ ├── def.hpp │ │ ├── def_pool.c │ │ ├── def_pool.h │ │ ├── def_type.c │ │ ├── def_type.h │ │ ├── desc_state.c │ │ ├── enum_def.c │ │ ├── enum_def.h │ │ ├── enum_reserved_range.c │ │ ├── enum_reserved_range.h │ │ ├── enum_value_def.c │ │ ├── enum_value_def.h │ │ ├── extension_range.c │ │ ├── extension_range.h │ │ ├── field_def.c │ │ ├── field_def.h │ │ ├── file_def.c │ │ ├── file_def.h │ │ ├── internal │ │ │ ├── def_builder.c │ │ │ ├── def_builder.h │ │ │ ├── def_pool.h │ │ │ ├── desc_state.h │ │ │ ├── enum_def.h │ │ │ ├── enum_reserved_range.h │ │ │ ├── enum_value_def.h │ │ │ ├── extension_range.h │ │ │ ├── field_def.h │ │ │ ├── file_def.h │ │ │ ├── message_def.h │ │ │ ├── message_reserved_range.h │ │ │ ├── method_def.h │ │ │ ├── oneof_def.h │ │ │ ├── service_def.h │ │ │ ├── strdup2.c │ │ │ └── strdup2.h │ │ ├── message.h │ │ ├── message.hpp │ │ ├── message_def.c │ │ ├── message_def.h │ │ ├── message_reserved_range.c │ │ ├── message_reserved_range.h │ │ ├── method_def.c │ │ ├── method_def.h │ │ ├── oneof_def.c │ │ ├── oneof_def.h │ │ ├── reflection_message.c │ │ ├── service_def.c │ │ └── service_def.h │ │ ├── text │ │ ├── encode.h │ │ └── text_encode.c │ │ ├── util │ │ ├── compare.c │ │ ├── compare.h │ │ ├── def_to_proto.c │ │ ├── def_to_proto.h │ │ ├── required_fields.c │ │ └── required_fields.h │ │ └── wire │ │ ├── decode.h │ │ ├── decode_fast.c │ │ ├── decode_fast.h │ │ ├── encode.h │ │ ├── eps_copy_input_stream.c │ │ ├── eps_copy_input_stream.h │ │ ├── internal │ │ ├── constants.h │ │ ├── decode.h │ │ ├── naive.c │ │ ├── range2-neon.c │ │ ├── range2-sse.c │ │ ├── swap.h │ │ └── utf8_range.h │ │ ├── reader.c │ │ ├── reader.h │ │ ├── types.h │ │ ├── wire_decode.c │ │ └── wire_encode.c │ ├── GMPEditor │ ├── GMPEditor │ │ ├── GMPEditor.Build.cs │ │ ├── Private │ │ │ ├── GMPBPCompilerExtension.cpp │ │ │ ├── GMPBPCompilerExtension.h │ │ │ ├── GMPBPMetaCustomization.cpp │ │ │ ├── GMPBPMetaCustomization.h │ │ │ ├── GMPEditorModule.cpp │ │ │ ├── K2Node_FormatStr.cpp │ │ │ ├── K2Node_FormatStr.h │ │ │ ├── K2Node_GMPStructUnion.cpp │ │ │ ├── K2Node_GMPStructUnion.h │ │ │ ├── K2Node_ListenMessage.cpp │ │ │ ├── K2Node_MessageBase.cpp │ │ │ └── K2Node_NotifyMessage.cpp │ │ └── Public │ │ │ ├── K2Neuron.cpp │ │ │ ├── K2Neuron.h │ │ │ ├── K2NeuronAction.cpp │ │ │ ├── K2NeuronAction.h │ │ │ ├── K2Node_ListenMessage.h │ │ │ ├── K2Node_MessageBase.h │ │ │ └── K2Node_NotifyMessage.h │ ├── MessageTags │ │ ├── Classes │ │ │ ├── MessageTagContainer.h │ │ │ ├── MessageTagsManager.h │ │ │ └── MessageTagsSettings.h │ │ ├── MessageTags.Build.cs │ │ ├── Private │ │ │ ├── MessageTagContainer.cpp │ │ │ ├── MessageTagRedirectors.cpp │ │ │ ├── MessageTagsManager.cpp │ │ │ ├── MessageTagsModule.cpp │ │ │ ├── MessageTagsSettings.cpp │ │ │ └── NativeMessageTags.cpp │ │ └── Public │ │ │ ├── MessageTagRedirectors.h │ │ │ ├── MessageTags.h │ │ │ ├── MessageTagsModule.h │ │ │ └── NativeMessageTags.h │ └── MessageTagsEditor │ │ ├── MessageTagsEditor.Build.cs │ │ ├── Private │ │ ├── AssetTypeActions_MessageTagAssetBase.cpp │ │ ├── MessageTagContainerCustomization.cpp │ │ ├── MessageTagContainerCustomization.h │ │ ├── MessageTagCustomization.cpp │ │ ├── MessageTagCustomization.h │ │ ├── MessageTagEditorUtilities.cpp │ │ ├── MessageTagEditorUtilities.h │ │ ├── MessageTagSearchFilter.cpp │ │ ├── MessageTagSearchFilter.h │ │ ├── MessageTagStyle.cpp │ │ ├── MessageTagStyle.h │ │ ├── MessageTagsEditorModule.cpp │ │ ├── MessageTagsGraphPanelPinFactory.h │ │ ├── MessageTagsSettingsCustomization.cpp │ │ ├── MessageTagsSettingsCustomization.h │ │ ├── SAddNewMessageTagSourceWidget.cpp │ │ ├── SAddNewMessageTagSourceWidget.h │ │ ├── SAddNewMessageTagWidget.cpp │ │ ├── SAddNewMessageTagWidget.h │ │ ├── SAddNewRestrictedMessageTagWidget.cpp │ │ ├── SAddNewRestrictedMessageTagWidget.h │ │ ├── SMessageTagChip.cpp │ │ ├── SMessageTagCombo.cpp │ │ ├── SMessageTagContainerCombo.cpp │ │ ├── SMessageTagContainerGraphPin.cpp │ │ ├── SMessageTagContainerGraphPin.h │ │ ├── SMessageTagGraphPin.cpp │ │ ├── SMessageTagGraphPin.h │ │ ├── SMessageTagPicker.cpp │ │ ├── SMessageTagWidget.cpp │ │ ├── SRenameMessageTagDialog.cpp │ │ └── SRenameMessageTagDialog.h │ │ └── Public │ │ ├── AssetTypeActions_MessageTagAssetBase.h │ │ ├── MessageTagContainerCustomizationOptions.h │ │ ├── MessageTagCustomizationOptions.h │ │ ├── MessageTagsEditorModule.h │ │ ├── SMessageTagChip.h │ │ ├── SMessageTagCombo.h │ │ ├── SMessageTagContainerCombo.h │ │ ├── SMessageTagPicker.h │ │ └── SMessageTagWidget.h │ └── ThirdParty │ └── PropertyCompatibility.include ├── README.md └── pics ├── 1.png ├── 10.jpg ├── 11.png ├── 12.png ├── 13.png ├── 14.jpg ├── 2.jpg ├── 3.png ├── 4.png ├── 5.jpg ├── 6.jpg ├── 7.jpg ├── 8.jpg └── 9.jpg /Plugins/GMP/Config/FilterPlugin.ini: -------------------------------------------------------------------------------- 1 | [FilterPlugin] 2 | ; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and 3 | ; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively. 4 | ; 5 | ; Examples: 6 | ; /README.txt 7 | ; /Extras/... 8 | ; /Binaries/ThirdParty/*.dll 9 | -------------------------------------------------------------------------------- /Plugins/GMP/GMP.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "1.0", 5 | "FriendlyName": "Genaric Message Plugin", 6 | "Description": "Genaric Message Plugin across C++/script", 7 | "Category": "GameFramework", 8 | "CreatedBy": "wangjieest", 9 | "CreatedByURL": "", 10 | "DocsURL": "", 11 | "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/b92f7efebd46473f947622e0b37b1970", 12 | "SupportURL": "https://github.com/wangjieest/GenericMessagePlugin", 13 | "EnabledByDefault": true, 14 | "Modules": [ 15 | { 16 | "Name": "GMP", 17 | "Type": "Runtime", 18 | "LoadingPhase": "PreDefault", 19 | "WhitelistPlatforms": [ "Win64", "Linux", "Mac", "IOS", "Android" ] 20 | }, 21 | { 22 | "Name": "GMPEditor", 23 | "Type": "UncookedOnly", 24 | "LoadingPhase": "PreDefault", 25 | "WhitelistPlatforms": [ "Win64", "Linux", "Mac" ] 26 | }, 27 | { 28 | "Name": "MessageTags", 29 | "Type": "UncookedOnly", 30 | "LoadingPhase": "PreDefault", 31 | "WhitelistPlatforms": [ "Win64", "Linux", "Mac" ] 32 | }, 33 | { 34 | "Name": "MessageTagsEditor", 35 | "Type": "UncookedOnly", 36 | "LoadingPhase": "PreDefault", 37 | "WhitelistPlatforms": [ "Win64", "Linux", "Mac" ] 38 | } 39 | ], 40 | "Plugins": [ 41 | { 42 | "Name": "AssetManagerEditor", 43 | "Enabled": true 44 | }, 45 | { 46 | "Name": "GameplayTagsEditor", 47 | "Enabled": true 48 | } 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /Plugins/GMP/GenPluginBuild.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | pushd %~dp0 4 | for /f "delims=" %%a in ('dir . /B *.uplugin') do set PluginName=%%~na 5 | 6 | rem Win64+Android+Linux+Mac+iOS 7 | set "TargetPlatforms=Win64+Android" 8 | 9 | rem RunUAT.bat BuildPlugin -Plugin="%~dp0%PluginName%.uplugin" -Package="%OutputDir%" -TargetPlatforms=Win64+Linux -compile 10 | 11 | setlocal EnableDelayedExpansion 12 | set "UEThirdVersion=" 13 | set "UESecondVersion=" 14 | set "UELastestVersion=" 15 | echo Finding UnrealEngines... 16 | for /f "tokens=*" %%a in ('reg query "HKLM\SOFTWARE\EpicGames\Unreal Engine"') do ( 17 | set "UELastestVersion=%%~nxa" 18 | 19 | for /f "tokens=1,2 delims=:" %%x in ('reg query "%%a" /v "InstalledDirectory" ^| find /i "InstalledDirectory"') do ( 20 | set "Tmp1=%%x" 21 | set "Tmp2=%%y" 22 | set "UELastestPath=!Tmp1:~-1!:!Tmp2!" 23 | ) 24 | if exist "!UELastestPath!\Engine\Build\BatchFiles\RunUAT.bat" ( 25 | echo !UELastestVersion! 26 | echo>Build_!UELastestVersion!.bat @echo off 27 | echo>>Build_!UELastestVersion!.bat ^:Rebuild 28 | echo>>Build_!UELastestVersion!.bat @pushd %%~dp0 29 | echo>>Build_!UELastestVersion!.bat @pushd .. 30 | echo>>Build_!UELastestVersion!.bat @call "!UELastestPath!\Engine\Build\BatchFiles\RunUAT.bat" BuildPlugin -Plugin=%%~dp0%PluginName%.uplugin -Package="%~dp0..\%PluginName%!UELastestVersion!" -TargetPlatforms=%TargetPlatforms% -compile 31 | echo>>Build_!UELastestVersion!.bat if ERRORLEVEL 1 pause ^& goto ^Retry 32 | echo>>Build_!UELastestVersion!.bat pause 33 | echo>>Build_!UELastestVersion!.bat rmdir /S /Q "%PluginName%!UELastestVersion!" 34 | echo>>Build_!UELastestVersion!.bat goto ^:eof 35 | echo>>Build_!UELastestVersion!.bat ^:Retry 36 | echo>>Build_!UELastestVersion!.bat rmdir /S /Q "%PluginName%!UELastestVersion!" 37 | echo>>Build_!UELastestVersion!.bat goto ^:Rebuild 38 | ) 39 | ) 40 | 41 | if "%UELastestVersion%" equ "" ( 42 | echo No Version Found! & pause 43 | exit /b 1 44 | ) 45 | 46 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/GMP/GMPEditorUtils.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #include "CoreMinimal.h" 5 | 6 | #if WITH_EDITOR 7 | #include "TimerManager.h" 8 | namespace GMP 9 | { 10 | namespace FEditorUtils 11 | { 12 | bool DelayExecImpl(const UObject* InObj, FTimerDelegate Delegate, float InDelay, bool bEnsureExec); 13 | template 14 | auto DelayExec(const UObject* InObj, F&& Lambda, float InDelay = 0.f, bool bEnsureExec = true) 15 | { 16 | if (InObj) 17 | return DelayExecImpl(InObj, FTimerDelegate::CreateWeakLambda(const_cast(InObj), Forward(Lambda)), InDelay, bEnsureExec); 18 | else 19 | return DelayExecImpl(InObj, FTimerDelegate::CreateLambda(Forward(Lambda)), InDelay, bEnsureExec); 20 | } 21 | 22 | void GetReferenceAssets(const UObject* InObj, const TArray& PathIdArray, TMap>& OutRef, TMap>& OutDep, bool bRecur); 23 | void UnloadPackages(const UObject* InObj, TArray PathIdArray, TDelegate)> OnResult); 24 | void DeletePackages(const UObject* InObj, TArray PathIdArray, TDelegate)> OnResult); 25 | } // namespace FEditorUtils 26 | } // namespace GMP 27 | #endif 28 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/GMP/GMPKey.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #include "CoreMinimal.h" 5 | 6 | #include "GMPKey.generated.h" 7 | 8 | #ifndef GMP_WITH_SIGNAL_ORDER 9 | #define GMP_WITH_SIGNAL_ORDER 1 10 | #endif 11 | 12 | namespace GMP 13 | { 14 | struct FGMPListenOrder 15 | { 16 | #if GMP_WITH_SIGNAL_ORDER 17 | int32 Order = 0; 18 | #endif 19 | FGMPListenOrder(int32 InOrder = 0) 20 | #if GMP_WITH_SIGNAL_ORDER 21 | : Order(InOrder) 22 | #endif 23 | { 24 | } 25 | GMP_API static FGMPListenOrder MaxOrder; 26 | GMP_API static FGMPListenOrder MinOrder; 27 | }; 28 | 29 | struct FGMPListenOptions : public FGMPListenOrder 30 | { 31 | FGMPListenOptions() {} 32 | 33 | FGMPListenOptions(int32 InTimes, int32 InOrder = 0) 34 | : FGMPListenOrder(InOrder) 35 | , Times(InTimes) 36 | { 37 | } 38 | FGMPListenOptions(FGMPListenOrder InOrder, int32 InTimes = -1) 39 | : FGMPListenOrder(InOrder) 40 | , Times(InTimes) 41 | { 42 | } 43 | 44 | int32 Times = -1; 45 | 46 | GMP_API static FGMPListenOptions Default; 47 | }; 48 | } // namespace GMP 49 | using FGMPListenOrder = GMP::FGMPListenOrder; 50 | 51 | USTRUCT(BlueprintType) 52 | struct FGMPKey 53 | { 54 | GENERATED_BODY() 55 | public: 56 | FGMPKey(int64 In = 0) 57 | : Key(In) 58 | { 59 | } 60 | 61 | UPROPERTY() 62 | int64 Key; 63 | 64 | public: 65 | FORCEINLINE auto GetKey() const { return Key; } 66 | FORCEINLINE bool IsValid() const { return !!Key; } 67 | 68 | operator int64() const { return Key; } 69 | explicit operator bool() const { return IsValid(); } 70 | FString ToString() const { return LexToString(Key); } 71 | 72 | GMP_API static FGMPKey NextGMPKey(); 73 | GMP_API static FGMPKey NextGMPKey(GMP::FGMPListenOptions Options); 74 | 75 | friend uint32 GetTypeHash(FGMPKey In) { return GetTypeHash(In.Key); } 76 | friend bool operator==(const FGMPKey& Lhs, const FGMPKey& Rhs) { return (Lhs.Key == Rhs.Key); } 77 | friend bool operator<(const FGMPKey& Lhs, const FGMPKey& Rhs) { return (Lhs.Key < Rhs.Key); } 78 | }; 79 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/GMP/GMPLocalSharedStorage.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #include "CoreMinimal.h" 5 | #include "UObject/UnrealType.h" 6 | #include "Templates/UnrealTemplate.h" 7 | #include "Kismet/BlueprintFunctionLibrary.h" 8 | #include "GMP/GMPClass2Prop.h" 9 | 10 | #include "GMPLocalSharedStorage.generated.h" 11 | 12 | UENUM(BlueprintType) 13 | enum ELocalSharedOverrideMode : uint8 14 | { 15 | Skip, 16 | Override, 17 | }; 18 | 19 | UCLASS(Transient) 20 | class GMP_API ULocalSharedStorage : public UBlueprintFunctionLibrary 21 | { 22 | GENERATED_BODY() 23 | public: 24 | template 25 | static bool SetLocalSharedStorage(UObject* InCtx, FName Key, T& Data, ELocalSharedOverrideMode Mode = ELocalSharedOverrideMode::Skip) 26 | { 27 | return SetLocalSharedStorage(InCtx, Key, Mode, GMP::TClass2Prop::GetProperty(), std::addressof(Data)); 28 | } 29 | 30 | template 31 | static const T* GetLocalSharedStorage(UObject* InCtx, FName Key) 32 | { 33 | return static_cast(GetLocalSharedStorageImpl(InCtx, Key, GMP::TClass2Prop::GetProperty())); 34 | } 35 | 36 | template 37 | static const T& GetLocalSharedStorage(UObject* InCtx, FName Key, T& Default) 38 | { 39 | auto Ret = GetLocalSharedStorage(InCtx, Key); 40 | return Ret ? *Ret : Default; 41 | } 42 | 43 | protected: 44 | UFUNCTION(CustomThunk, BlueprintCallable, meta = (DisplayName = "SetLocalSharedStorage", Mode = "0", WorldContext = "InCtx", CustomStructureParam = "Data")) 45 | static bool K2_SetLocalSharedStorage(UObject* InCtx, FName Key, ELocalSharedOverrideMode Mode, bool bGameScope, int32& Data); 46 | DECLARE_FUNCTION(execK2_SetLocalSharedStorage); 47 | 48 | UFUNCTION(CustomThunk, BlueprintCallable, meta = (DisplayName = "GetLocalSharedStorage", WorldContext = "InCtx", CustomStructureParam = "Data")) 49 | static bool K2_GetLocalSharedStorage(UObject* InCtx, FName Key, bool bGameScope, int32& Data); 50 | DECLARE_FUNCTION(execK2_GetLocalSharedStorage); 51 | 52 | private: 53 | static bool SetLocalSharedStorageImpl(UObject* InCtx, FName Key, ELocalSharedOverrideMode Mode, const FProperty* Prop, const void* Data); 54 | static void* GetLocalSharedStorageImpl(UObject* InCtx, FName Key, const FProperty* Prop); 55 | }; 56 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/GMP/GMPOnScopeExit.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #include 5 | #include 6 | namespace GMP 7 | { 8 | namespace OnScopeExit 9 | { 10 | enum class EState 11 | { 12 | ON_SUCCESS = 1, 13 | ON_FAILURE = 2, 14 | RUN_ALWAYS = 3, 15 | RUN_NEVER = 4, 16 | }; 17 | 18 | template 19 | class TScopeGuard 20 | { 21 | public: 22 | TScopeGuard(Fun&& f, EState state) 23 | : fun_(std::move(f)) 24 | , state_(state) 25 | { 26 | } 27 | 28 | ~TScopeGuard() 29 | { 30 | #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) 31 | int exceptions = std::uncaught_exceptions(); 32 | #else 33 | int exceptions = std::uncaught_exception() ? 1 : 0; 34 | #endif 35 | if (state_ == EState::RUN_ALWAYS || (state_ == EState::ON_FAILURE && exceptions > 0) || (state_ == EState::ON_SUCCESS && exceptions == 0)) 36 | { 37 | fun_(); 38 | } 39 | } 40 | 41 | void dismiss(bool reset = false) 42 | { 43 | state_ = EState::RUN_NEVER; 44 | // if (reset) 45 | // fun_ = nullptr; 46 | } 47 | 48 | TScopeGuard() = delete; 49 | TScopeGuard(const TScopeGuard&) = delete; 50 | TScopeGuard& operator=(const TScopeGuard&) = delete; 51 | 52 | TScopeGuard(TScopeGuard&& rhs) 53 | : fun_(std::move(rhs.fun_)) 54 | , state_(rhs.state_) 55 | { 56 | rhs.dismiss(true); 57 | } 58 | 59 | private: 60 | Fun fun_; 61 | EState state_; 62 | }; 63 | template 64 | inline TScopeGuard operator+(EState state, Fun&& fn) 65 | { 66 | return TScopeGuard(std::forward(fn), state); 67 | } 68 | } // namespace OnScopeExit 69 | } // namespace GMP 70 | 71 | #define Z_SCOPEGUARD_CONCATENATE_IMPL__(s1, s2) s1##s2 72 | #define Z_SCOPEGUARD_CONCATENATE__(s1, s2) Z_SCOPEGUARD_CONCATENATE_IMPL__(s1, s2) 73 | 74 | // Helper macro 75 | #define GMP_SCOPE_EXIT auto Z_SCOPEGUARD_CONCATENATE__(OnScopeExit_, __LINE__) = GMP::OnScopeExit::EState(GMP::OnScopeExit ::EState::RUN_ALWAYS) + [&]() 76 | 77 | #define GMP_SCOPE_SUCCESS auto Z_SCOPEGUARD_CONCATENATE__(OnScopeExit_, __LINE__) = GMP::OnScopeExit ::EState(GMP::OnScopeExit ::EState::ON_SUCCESS) + [&]() 78 | 79 | #define GMP_SCOPE_FAIL auto Z_SCOPEGUARD_CONCATENATE__(OnScopeExit_, __LINE__) = GMP::OnScopeExit::EState(GMP::OnScopeExit ::EState::ON_FAILURE) + [&]() 80 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/GMP/GMPProtoSerializer.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #include "CoreMinimal.h" 5 | 6 | #include "GMPReflection.h" 7 | #include "GMPSerializer.h" 8 | #include "GMPUnion.h" 9 | #include "Misc/FileHelper.h" 10 | #include "Templates/UnrealTemplate.h" 11 | #include "Templates/UnrealTypeTraits.h" 12 | 13 | #if defined(GMP_WITH_UPB) 14 | namespace GMP 15 | { 16 | namespace Proto 17 | { 18 | GMP_API bool AddProto(const char* InBuf, uint32 InSize); 19 | GMP_API bool AddProtos(const char* InBuf, uint32 InSize); 20 | GMP_API void ClearProtos(); 21 | 22 | namespace Serializer 23 | { 24 | GMP_API bool UStructToProtoImpl(FArchive& Ar, const UScriptStruct* Struct, const void* StructAddr); 25 | GMP_API bool UStructToProtoImpl(TArray& Out, const UScriptStruct* Struct, const void* StructAddr); 26 | } // namespace Serializer 27 | template 28 | bool UStructToProto(T& Out, const UScriptStruct* Struct, const uint8* ValueAddr) 29 | { 30 | return Serializer::UStructToProtoImpl(Out, Struct, ValueAddr); 31 | } 32 | template 33 | bool UStructToProto(T& Out, const DataType& Data) 34 | { 35 | return UStructToProto(Out, TypeTraits::StaticStruct(), static_cast(std::addressof(Data))); 36 | } 37 | template 38 | bool UStructToProtoFile(const DataType& Data, const TCHAR* Filename, bool bLowCase = true) 39 | { 40 | TArray Ret; 41 | UStructToProto(Ret, TypeTraits::StaticStruct(), (const uint8*)std::addressof(Data)); 42 | return FFileHelper::SaveArrayToFile(Ret, Filename); 43 | } 44 | 45 | namespace Deserializer 46 | { 47 | GMP_API bool UStructFromProtoImpl(FArchive& Ar, const UScriptStruct* Struct, void* StructAddr); 48 | GMP_API bool UStructFromProtoImpl(TConstArrayView In, const UScriptStruct* Struct, void* StructAddr); 49 | } // namespace Deserializer 50 | template 51 | bool UStructFromProto(T&& In, const UScriptStruct* Struct, uint8* OutStructAddr) 52 | { 53 | return Deserializer::UStructFromProtoImpl(Forward(In), Struct, OutStructAddr); 54 | } 55 | template 56 | bool UStructFromProto(T&& In, DataType& OutData) 57 | { 58 | return UStructFromProto(Forward(In), TypeTraits::StaticStruct(), static_cast(std::addressof(OutData))); 59 | } 60 | template 61 | bool UStructFromProtoFile(const TCHAR* Filename, DataType& OutData) 62 | { 63 | TUniquePtr Reader(IFileManager::Get().CreateFileReader(Filename)); 64 | return Reader && UStructFromProto(*Reader, TypeTraits::StaticStruct(), (uint8*)std::addressof(OutData)); 65 | } 66 | } // namespace Proto 67 | } // namespace GMP 68 | #endif 69 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/GMP/GMPSignalsInc.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #include "CoreMinimal.h" 5 | 6 | #include "GMPSignals.inl" 7 | #include "UObject/Interface.h" 8 | 9 | #include "GMPSignalsInc.generated.h" 10 | 11 | UINTERFACE(MinimalAPI, meta = (CannotImplementInterfaceInBlueprint)) 12 | class UGMPSignalHandle : public UInterface 13 | { 14 | GENERATED_BODY() 15 | }; 16 | 17 | class GMP_API IGMPSignalHandle 18 | { 19 | GENERATED_BODY() 20 | public: 21 | UFUNCTION(BlueprintCallable, Category = "GMP") 22 | virtual void DisconnectAll() { GMPSignalHandle.DisconnectAll(); } 23 | UFUNCTION(BlueprintCallable, Category = "GMP") 24 | virtual void Disconnect(FGMPKey Key) { GMPSignalHandle.Disconnect(Key); } 25 | 26 | protected: 27 | friend class GMP::FMessageHub; 28 | GMP::FSigHandle GMPSignalHandle; 29 | }; 30 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Private/GMPCore.cpp: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #include "GMPCore.h" 4 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Private/GMPLocalSharedStorageInternal.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "GMPLocalSharedStorage.h" 5 | #include "InstancedStruct.h" 6 | 7 | #include "GMPLocalSharedStorageInternal.generated.h" 8 | 9 | UCLASS(Transient) 10 | class ULocalSharedStorageInternal : public UObject 11 | { 12 | GENERATED_BODY() 13 | public: 14 | static void AddReferencedObjects(UObject* InThis, FReferenceCollector& Collector); 15 | 16 | protected: 17 | friend class ULocalSharedStorage; 18 | // auto gc 19 | UPROPERTY() 20 | TMap StructMap; 21 | 22 | // auto gc 23 | UPROPERTY() 24 | TMap> ObjectMap; 25 | 26 | // no gc 27 | struct FPropertyStore 28 | { 29 | const FProperty* Prop = nullptr; 30 | size_t Addr[1]; 31 | 32 | struct FDeleter 33 | { 34 | void operator()(FPropertyStore* Ptr) const 35 | { 36 | if (Ptr && Ptr->Prop) 37 | { 38 | Ptr->Prop->DestroyValue(Ptr->Addr); 39 | } 40 | FMemory::Free(Ptr); 41 | } 42 | }; 43 | }; 44 | 45 | using FPropertyStorePtr = TUniquePtr; 46 | TMap PropertyStore; 47 | }; 48 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Private/GMPMessageKey.cpp: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | #include "GMPMessageKey.h" 3 | #include "GMPSignalsImpl.h" 4 | #include "GMPStruct.h" 5 | 6 | namespace GMP 7 | { 8 | #if GMP_TRACE_MSG_STACK 9 | static TMap> MsgkeyLocations; 10 | static TArray> MsgKeyStack; 11 | static TArray BPMsgKeyStack; 12 | 13 | const TCHAR* DebugNativeMsgFileLine(FName Key) 14 | { 15 | if (auto Find = MsgkeyLocations.Find(Key)) 16 | { 17 | struct FTmpMsgLocation : public TThreadSingleton 18 | { 19 | TStringBuilder<2048> TmpMsgLocation; 20 | }; 21 | auto& Ref = FTmpMsgLocation::Get().TmpMsgLocation; 22 | Ref.Reset(); 23 | Ref.Append(FString::Join(*Find, TEXT(" | "))); 24 | return *Ref; 25 | } 26 | return TEXT("Unkown"); 27 | } 28 | 29 | #endif 30 | const TCHAR* DebugCurrentMsgFileLine() 31 | { 32 | #if GMP_TRACE_MSG_STACK 33 | if (MsgKeyStack.Num() > 0) 34 | { 35 | if (auto MsgKey = GMP::FMSGKEYFind(*MsgKeyStack.Last().Value)) 36 | return DebugNativeMsgFileLine(*MsgKeyStack.Last().Value); 37 | } 38 | #endif 39 | return TEXT("Unkown"); 40 | } 41 | 42 | #if GMP_TRACE_MSG_STACK 43 | void GMPTraceEnterBP(const FString& MsgStr, FString&& Loc) 44 | { 45 | if (auto MsgKey = FMSGKEYFind(MsgStr)) 46 | { 47 | MsgkeyLocations.FindOrAdd(MsgKey).Emplace(MoveTemp(Loc)); 48 | } 49 | BPMsgKeyStack.Emplace(MsgStr); 50 | } 51 | 52 | void GMPTraceLeaveBP(const FString& MsgStr) 53 | { 54 | ensureAlways(MsgStr == BPMsgKeyStack.Pop(EAllowShrinking::No)); 55 | } 56 | 57 | void MSGKEY_TYPE::GMPTraceEnter(const ANSICHAR* File, int32 Line) 58 | { 59 | if (FMSGKEYFind(*this)) 60 | { 61 | MsgkeyLocations.FindOrAdd(*this).Emplace(FString::Printf(TEXT("%s:%d"), ANSI_TO_TCHAR(File), Line)); 62 | } 63 | MsgKeyStack.Emplace(this->Ptr(), this->Ptr()); 64 | } 65 | 66 | void MSGKEY_TYPE::GMPTraceLeave() 67 | { 68 | ensureAlways(this->Ptr() == MsgKeyStack.Pop(EAllowShrinking::No).Key); 69 | } 70 | 71 | 72 | #endif 73 | 74 | } 75 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Private/GMPMeta.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #include "CoreMinimal.h" 5 | 6 | #include "GMPMeta.generated.h" 7 | 8 | USTRUCT() 9 | struct FGMPTagMetaType 10 | { 11 | GENERATED_BODY() 12 | 13 | #if WITH_EDITORONLY_DATA 14 | UPROPERTY() 15 | FName Type; 16 | #endif 17 | }; 18 | 19 | USTRUCT() 20 | struct FGMPTagMetaSrc 21 | { 22 | GENERATED_BODY() 23 | public: 24 | #if WITH_EDITORONLY_DATA 25 | UPROPERTY() 26 | FName Tag; 27 | 28 | UPROPERTY() 29 | TArray Parameters; 30 | 31 | UPROPERTY() 32 | TArray ResponseTypes; 33 | #endif 34 | }; 35 | 36 | USTRUCT() 37 | struct FGMPTagMetaBase 38 | { 39 | GENERATED_BODY() 40 | public: 41 | UPROPERTY() 42 | FName Tag; 43 | 44 | UPROPERTY() 45 | TArray Parameters; 46 | 47 | UPROPERTY() 48 | TArray ResponseTypes; 49 | 50 | #if WITH_EDITORONLY_DATA 51 | FGMPTagMetaBase() {} 52 | FGMPTagMetaBase(FGMPTagMetaSrc& Src); 53 | #endif 54 | }; 55 | 56 | USTRUCT() 57 | struct FGMPTagMeta : public FGMPTagMetaBase 58 | { 59 | GENERATED_BODY() 60 | public: 61 | #if WITH_EDITORONLY_DATA 62 | UPROPERTY() 63 | FString DecComment; 64 | #endif 65 | }; 66 | 67 | USTRUCT() 68 | struct FGMPTagTypes 69 | { 70 | GENERATED_BODY() 71 | public: 72 | UPROPERTY() 73 | TArray ParameterTypes; 74 | 75 | UPROPERTY() 76 | TArray ResponseTypes; 77 | }; 78 | 79 | UCLASS(defaultconfig, config = GMPMeta) 80 | class UGMPMeta : public UObject 81 | { 82 | GENERATED_BODY() 83 | public: 84 | UGMPMeta(); 85 | GMP_API static const TArray* GetTagMeta(const UObject* InWorldContextObj, FName MsgTag); 86 | GMP_API static const TArray* GetSvrMeta(const UObject* InWorldContextObj, FName MsgTag); 87 | void CollectTags(); 88 | 89 | protected: 90 | virtual void PostInitProperties() override; 91 | 92 | UPROPERTY() 93 | TMap GMPTypes; 94 | 95 | UPROPERTY(Config) 96 | TArray MessageTagsList; 97 | 98 | #if WITH_EDITORONLY_DATA 99 | int32 GMPMetaVersion = 0; 100 | UPROPERTY(EditAnywhere, Config, Category = "GMPMeta") 101 | TArray GMPTagFileList; 102 | #endif 103 | }; 104 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Private/GMPProtoSerializerEditor.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | #pragma once 3 | 4 | #include "GMPProtoSerializer.h" 5 | 6 | #if WITH_EDITOR 7 | #if defined(GMP_WITH_UPB) && GMP_WITH_UPB 8 | #include "Editor.h" 9 | #include "GMPEditorUtils.h" 10 | #include "GMPProtoUtils.h" 11 | #include "UnrealCompatibility.h" 12 | #include "upb/libupb.h" 13 | 14 | // Must be last 15 | #include "upb/port/def.inc" 16 | namespace upb 17 | { 18 | namespace generator 19 | { 20 | struct FPreGenerator 21 | { 22 | FDynamicArena Arena; 23 | TArray Descriptors; 24 | 25 | using FNameType = FString; 26 | 27 | TMap ProtoNames; 28 | TMap ProtoMap; 29 | TMap ProtoDescs; 30 | 31 | TMap> ProtoDeps; 32 | 33 | void PreAddProtoDesc(upb_StringView Buf); 34 | void PreAddProtoDesc(TArrayView Buf); 35 | 36 | bool PreAddProto(upb_StringView Buf); 37 | 38 | void Reset(); 39 | 40 | TArray GenerateProtoList() const; 41 | template 42 | TArray FillDefPool(DefPoolType& Pool, TMap& OutMap) 43 | { 44 | auto ProtoList = GenerateProtoList(); 45 | TArray FileDefs; 46 | for (auto Proto : ProtoList) 47 | { 48 | if (auto FileDef = Pool.AddProto(Proto)) 49 | { 50 | FileDefs.Add(FileDef); 51 | OutMap.Emplace(*FileDef, ProtoDescs.FindChecked(Proto)); 52 | } 53 | } 54 | return FileDefs; 55 | } 56 | void AddProtoImpl(TArray& Results, const FNameType& ProtoName) const; 57 | static FPreGenerator& GetPreGenerator(); 58 | }; 59 | 60 | template 61 | TArray FillDefPool(DefPoolType& Pool, TMap& OutMap) 62 | { 63 | return FPreGenerator::GetPreGenerator().FillDefPool(Pool, OutMap); 64 | } 65 | 66 | TArray> GatherFileDescriptorProtosForDir(FString RootDir); 67 | FString GatherRootDir(UWorld* InWorld); 68 | } // namespace generator 69 | } // namespace upb 70 | #include "upb/port/undef.inc" 71 | 72 | #endif // GMP_WITH_UPB 73 | #endif // WITH_EDITOR 74 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Private/GMPProtoSerializerUStruct.cpp: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #include "GMPProtoSerializerEditor.h" 4 | 5 | #if defined(GMP_WITH_UPB) && 0 6 | #if WITH_EDITOR 7 | #include "Editor.h" 8 | #include "GMPEditorUtils.h" 9 | #include "GMPProtoUtils.h" 10 | #include "HAL/PlatformFile.h" 11 | #include "Misc/FileHelper.h" 12 | #include "UnrealCompatibility.h" 13 | #include "upb/libupb.h" 14 | #include "upb/util/def_to_proto.h" 15 | #include "upb/wire/types.h" 16 | 17 | #include 18 | 19 | // Must be last 20 | #include "upb/port/def.inc" 21 | 22 | namespace GMP 23 | { 24 | namespace Proto 25 | { 26 | 27 | } // namespace Proto 28 | } // namespace GMP 29 | 30 | #include "upb/port/undef.inc" 31 | #endif // WITH_EDITOR 32 | #endif 33 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Private/GMPProtoUtils.cpp: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #include "GMPProtoUtils.h" 4 | 5 | void UProtoDescriptor::GetPreloadDependencies(TArray& OutDeps) 6 | { 7 | Super::GetPreloadDependencies(OutDeps); 8 | OutDeps.Append(Deps); 9 | } 10 | 11 | void UProtoDescriptor::RegisterProto() 12 | { 13 | if (bRegistered) 14 | return; 15 | bRegistered = true; 16 | 17 | for (auto Dep : Deps) 18 | { 19 | if (Dep) 20 | { 21 | Dep->RegisterProto(); 22 | } 23 | } 24 | 25 | // 26 | extern void RegisterProtoDesc(const char*, size_t); 27 | RegisterProtoDesc(reinterpret_cast(Desc.GetData()), Desc.Num()); 28 | } 29 | 30 | void UProtoDefinedStruct::PostLoad() 31 | { 32 | Super::PostLoad(); 33 | if (auto Desc = ProtoDesc.LoadSynchronous()) 34 | { 35 | Desc->RegisterProto(); 36 | } 37 | } 38 | 39 | void UProtoDefinedStruct::GetPreloadDependencies(TArray& OutDeps) 40 | { 41 | Super::GetPreloadDependencies(OutDeps); 42 | if (auto Desc = ProtoDesc.LoadSynchronous()) 43 | { 44 | OutDeps.Add(Desc); 45 | } 46 | } 47 | 48 | void UProtoDefinedEnum::PostLoad() 49 | { 50 | Super::PostLoad(); 51 | if (auto Desc = ProtoDesc.LoadSynchronous()) 52 | { 53 | Desc->RegisterProto(); 54 | } 55 | } 56 | 57 | void UProtoDefinedEnum::GetPreloadDependencies(TArray& OutDeps) 58 | { 59 | Super::GetPreloadDependencies(OutDeps); 60 | if (auto Desc = ProtoDesc.LoadSynchronous()) 61 | { 62 | OutDeps.Add(Desc); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Private/GMPRpcUtils.cpp: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #include "GMPRpcUtils.h" 4 | 5 | #include "Engine/Engine.h" 6 | #include "GMPBPLib.h" 7 | #include "GMPRpcProxy.h" 8 | #include "GameFramework/PlayerController.h" 9 | 10 | namespace GMP 11 | { 12 | FString FRpcMessageUtils::ProxyGetNameSafe(APlayerController* PC) 13 | { 14 | return ::GetNameSafe(PC); 15 | } 16 | 17 | UPackageMap* FRpcMessageUtils::GetPackageMap(APlayerController* PC) 18 | { 19 | return UGMPBPLib::GetPackageMap(PC); 20 | } 21 | 22 | const int32 FRpcMessageUtils::GetMaxBytes() 23 | { 24 | return UGMPRpcProxy::MaxByteCount; 25 | } 26 | 27 | void FRpcMessageUtils::PostRPCMsg(APlayerController* PC, const UObject* Sender, const FString& MessageStr, TArray& Buffer, bool bReliable) 28 | { 29 | UGMPRpcProxy::CallMessageRemote(PC, Sender, MessageStr, Buffer, bReliable); 30 | } 31 | 32 | APlayerController* FRpcMessageUtils::GetLocalPC(const UObject* Obj) 33 | { 34 | if (UWorld* World = GEngine->GetWorldFromContextObject(Obj, EGetWorldErrorMode::LogAndReturnNull)) 35 | { 36 | if (!World->GetAuthGameMode()) 37 | return World->GetFirstPlayerController(); 38 | } 39 | return nullptr; 40 | } 41 | 42 | bool FRpcMessageUtils::Z_VerifyRPC(APlayerController* PC, const UObject* Obj, const FMSGKEY& MessageName, const TArray& Props) 43 | { 44 | UObject* WorldContext = GEngine->GetWorldFromContextObject(Obj, EGetWorldErrorMode::LogAndReturnNull); 45 | WorldContext = WorldContext ? WorldContext : PC; 46 | return UGMPRpcValidation::VerifyRpc(WorldContext, MessageName, Props); 47 | } 48 | 49 | int32 FRpcMessageUtils::GetPlayerLocalSequence(const APlayerController& PC) 50 | { 51 | return UGMPRpcValidation::GetNextPlayerSequence(PC); 52 | } 53 | } // namespace GMP 54 | 55 | FGMPRpcBatchScope::FGMPRpcBatchScope(UGMPRpcProxy* InProxy) 56 | : Proxy(InProxy) 57 | { 58 | UGMPRpcProxy::IncreaseBatchRef(Proxy); 59 | } 60 | 61 | FGMPRpcBatchScope::FGMPRpcBatchScope(APlayerController* PC) 62 | : FGMPRpcBatchScope(PC ? PC->FindComponentByClass() : static_cast(nullptr)) 63 | { 64 | #if WITH_EDITOR 65 | VerifyFrameNumber = GFrameNumber; 66 | #endif 67 | } 68 | 69 | FGMPRpcBatchScope::~FGMPRpcBatchScope() 70 | { 71 | #if WITH_EDITOR 72 | if (ensureAlways(VerifyFrameNumber == GFrameNumber)) 73 | #endif 74 | { 75 | UGMPRpcProxy::DecreaseBatchRef(Proxy); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Private/GMPSerializer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #include "GMPSerializer.h" 4 | 5 | #include "UObject/NameTypes.h" 6 | 7 | namespace GMP 8 | { 9 | namespace Serializer 10 | { 11 | const FLazyName NAME_Text = TEXT("Text"); 12 | const FLazyName NAME_DateTime = TEXT("DateTime"); 13 | const FLazyName NAME_Guid = TEXT("Guid"); 14 | const FLazyName NAME_Color = TEXT("Color"); 15 | const FLazyName NAME_LinearColor = TEXT("LinearColor"); 16 | const FLazyName NAME_MemResVersion = TEXT("MemResVersion"); 17 | const TCHAR* Str_Ticks = TEXT("Ticks"); 18 | const TCHAR* Str_Max = TEXT("max"); 19 | const TCHAR* Str_Min = TEXT("min"); 20 | const TCHAR* Str_FutureNow = TEXT("now"); 21 | 22 | bool StripUserDefinedStructName(FStringView& InOutName) 23 | { 24 | FStringView NameView = InOutName; 25 | const int32 GuidStrLen = 32; 26 | const int32 MinimalPostfixlen = GuidStrLen + 3; 27 | if (NameView.Len() > MinimalPostfixlen) 28 | { 29 | NameView.LeftChopInline(GuidStrLen + 1); 30 | int32 FirstCharToRemove = -1; 31 | const bool bCharFound = NameView.FindLastChar(TCHAR('_'), FirstCharToRemove); 32 | if (bCharFound && (FirstCharToRemove > 0)) 33 | { 34 | InOutName = FStringView(NameView.GetData(), FirstCharToRemove); 35 | return true; 36 | } 37 | } 38 | return false; 39 | } 40 | 41 | bool StripUserDefinedStructName(FString& InOutName) 42 | { 43 | FStringView NameView = InOutName; 44 | const int32 GuidStrLen = 32; 45 | const int32 MinimalPostfixlen = GuidStrLen + 3; 46 | if (NameView.Len() > MinimalPostfixlen) 47 | { 48 | NameView.LeftChopInline(GuidStrLen + 1); 49 | int32 FirstCharToRemove = -1; 50 | const bool bCharFound = NameView.FindLastChar(TCHAR('_'), FirstCharToRemove); 51 | if (bCharFound && (FirstCharToRemove > 0)) 52 | { 53 | InOutName = FString(FirstCharToRemove, NameView.GetData()); 54 | return true; 55 | } 56 | } 57 | return false; 58 | } 59 | 60 | FString AsFString(const ANSICHAR* Str, int64 Len) 61 | { 62 | FString Ret; 63 | auto Size = FUTF8ToTCHAR_Convert::ConvertedLength(Str, Len); 64 | Ret.GetCharArray().AddUninitialized(Size + 1); 65 | FUTF8ToTCHAR_Convert::Convert(&Ret[0], Size, Str, Len); 66 | Ret.GetCharArray()[Size] = '\0'; 67 | return Ret; 68 | } 69 | 70 | FName GetAuthoredFNameForField(FName InName) 71 | { 72 | TStringBuilder<256> StrBuilder; 73 | InName.ToString(StrBuilder); 74 | FStringView NameView(StrBuilder.GetData(), StrBuilder.Len()); 75 | if (!StripUserDefinedStructName(NameView)) 76 | return InName; 77 | else 78 | return FName(NameView.Len(), NameView.GetData()); 79 | } 80 | 81 | } // namespace Serializer 82 | } // namespace GMP 83 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Private/GMPValueOneOf.cpp: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #include "GMPValueOneOf.h" 4 | 5 | #include "GMPJsonUtils.h" 6 | #include "GMPProtoUtils.h" 7 | #include "GMPJsonSerializer.h" 8 | #include "GMPProtoSerializer.h" 9 | 10 | int32 FGMPValueOneOf::IterateKeyValueImpl(int32 Idx, FString& OutKey, FGMPValueOneOf& OutValue, bool bBinary) const 11 | { 12 | if (!bBinary) 13 | { 14 | return UGMPJsonUtils::IterateKeyValueImpl(*this, Idx, OutKey, OutValue); 15 | } 16 | else 17 | { 18 | return UGMPProtoUtils::IterateKeyValueImpl(*this, Idx, OutKey, OutValue); 19 | } 20 | } 21 | 22 | bool FGMPValueOneOf::LoadFromFile(const FString& FilePath, bool bBinary /*=false*/) 23 | { 24 | if (!bBinary) 25 | { 26 | return GMP::Json::UStructFromJsonFile(*FilePath, *this); 27 | } 28 | else 29 | { 30 | return GMP::Proto::UStructFromProtoFile(*FilePath, *this); 31 | } 32 | } 33 | 34 | bool FGMPValueOneOf::AsValueImpl(FProperty* Prop, void* Out, FName SubKey, bool bBinary) const 35 | { 36 | if (!bBinary) 37 | { 38 | return UGMPJsonUtils::AsValueImpl(*this, Prop, Out, SubKey); 39 | } 40 | else 41 | { 42 | return UGMPProtoUtils::AsValueImpl(*this, Prop, Out, SubKey); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Private/XConsolePythonSupport.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | 7 | #include "Kismet/BlueprintFunctionLibrary.h" 8 | #include "Commandlets/Commandlet.h" 9 | 10 | #include "XConsolePythonSupport.generated.h" 11 | 12 | UCLASS(NotBlueprintType) 13 | class UXConsolePythonSupport : public UBlueprintFunctionLibrary 14 | { 15 | GENERATED_BODY() 16 | #if WITH_EDITOR 17 | public: 18 | UFUNCTION(BlueprintCallable, BlueprintInternalUseOnly) 19 | static void XConsolePauseCommandPipeline(UWorld* InWorld, const FString& Reason); 20 | UFUNCTION(BlueprintCallable, BlueprintInternalUseOnly) 21 | static void XConsoleContinueCommandPipeline(UWorld* InWorld, const FString& Reason); 22 | 23 | UFUNCTION(BlueprintCallable, BlueprintInternalUseOnly) 24 | static int32 XConsoleGetPipelineInteger(); 25 | UFUNCTION(BlueprintCallable, BlueprintInternalUseOnly) 26 | static void XConsoleSetPipelineInteger(const int32& InVal); 27 | 28 | UFUNCTION(BlueprintCallable, BlueprintInternalUseOnly) 29 | static FString XConsoleGetPipelineString(); 30 | UFUNCTION(BlueprintCallable, BlueprintInternalUseOnly) 31 | static void XConsoleSetPipelineString(const FString& InVal); 32 | #endif 33 | virtual bool IsEditorOnly() const override { return true; } 34 | }; 35 | 36 | UCLASS(NotBlueprintType) 37 | class UXConsoleExecCommandlet : public UCommandlet 38 | { 39 | GENERATED_BODY() 40 | public: 41 | UXConsoleExecCommandlet(); 42 | 43 | virtual int32 Main(const FString& Params) override; 44 | virtual bool IsEditorOnly() const override { return true; } 45 | }; 46 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Shared/GMPHelper.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #include "GMPCore.h" 5 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Shared/GMPSignals.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #include "GMP/GMPSignalsImpl.h" 5 | 6 | template 7 | using TGMPSignal = GMP::TSignal; 8 | 9 | using FGMPSignal = TGMPSignal<>; 10 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/Shared/NeuronActionFactory.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | 7 | #include "NeuronActionFactory.generated.h" 8 | 9 | /* 10 | * just a entry for factory functions 11 | * extend factory function by derived fromt this class 12 | */ 13 | UCLASS(Abstract, Const, Transient, notplaceable, NotBlueprintable, NotBlueprintType, BlueprintInternalUseOnly, meta = (NeuronAction)) 14 | class GMP_API UNeuronActionFactory : public UObject 15 | { 16 | GENERATED_BODY() 17 | }; 18 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/rapidjson/cursorstreamwrapper.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_CURSORSTREAMWRAPPER_H_ 16 | #define RAPIDJSON_CURSORSTREAMWRAPPER_H_ 17 | 18 | #include "stream.h" 19 | 20 | #if defined(__GNUC__) 21 | RAPIDJSON_DIAG_PUSH 22 | RAPIDJSON_DIAG_OFF(effc++) 23 | #endif 24 | 25 | #if defined(_MSC_VER) && _MSC_VER <= 1800 26 | RAPIDJSON_DIAG_PUSH 27 | RAPIDJSON_DIAG_OFF(4702) // unreachable code 28 | RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated 29 | #endif 30 | 31 | RAPIDJSON_NAMESPACE_BEGIN 32 | 33 | 34 | //! Cursor stream wrapper for counting line and column number if error exists. 35 | /*! 36 | \tparam InputStream Any stream that implements Stream Concept 37 | */ 38 | template > 39 | class CursorStreamWrapper : public GenericStreamWrapper { 40 | public: 41 | typedef typename Encoding::Ch Ch; 42 | 43 | CursorStreamWrapper(InputStream& is): 44 | GenericStreamWrapper(is), line_(1), col_(0) {} 45 | 46 | // counting line and column number 47 | Ch Take() { 48 | Ch ch = this->is_.Take(); 49 | if(ch == '\n') { 50 | line_ ++; 51 | col_ = 0; 52 | } else { 53 | col_ ++; 54 | } 55 | return ch; 56 | } 57 | 58 | //! Get the error line number, if error exists. 59 | size_t GetLine() const { return line_; } 60 | //! Get the error column number, if error exists. 61 | size_t GetColumn() const { return col_; } 62 | 63 | private: 64 | size_t line_; //!< Current Line 65 | size_t col_; //!< Current Column 66 | }; 67 | 68 | #if defined(_MSC_VER) && _MSC_VER <= 1800 69 | RAPIDJSON_DIAG_POP 70 | #endif 71 | 72 | #if defined(__GNUC__) 73 | RAPIDJSON_DIAG_POP 74 | #endif 75 | 76 | RAPIDJSON_NAMESPACE_END 77 | 78 | #endif // RAPIDJSON_CURSORSTREAMWRAPPER_H_ 79 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/rapidjson/internal/clzll.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_CLZLL_H_ 16 | #define RAPIDJSON_CLZLL_H_ 17 | 18 | #include "../rapidjson.h" 19 | 20 | #if defined(_MSC_VER) && !defined(UNDER_CE) 21 | #include 22 | #if defined(_WIN64) 23 | #pragma intrinsic(_BitScanReverse64) 24 | #else 25 | #pragma intrinsic(_BitScanReverse) 26 | #endif 27 | #endif 28 | 29 | RAPIDJSON_NAMESPACE_BEGIN 30 | namespace internal { 31 | 32 | inline uint32_t clzll(uint64_t x) { 33 | // Passing 0 to __builtin_clzll is UB in GCC and results in an 34 | // infinite loop in the software implementation. 35 | RAPIDJSON_ASSERT(x != 0); 36 | 37 | #if defined(_MSC_VER) && !defined(UNDER_CE) 38 | unsigned long r = 0; 39 | #if defined(_WIN64) 40 | _BitScanReverse64(&r, x); 41 | #else 42 | // Scan the high 32 bits. 43 | if (_BitScanReverse(&r, static_cast(x >> 32))) 44 | return 63 - (r + 32); 45 | 46 | // Scan the low 32 bits. 47 | _BitScanReverse(&r, static_cast(x & 0xFFFFFFFF)); 48 | #endif // _WIN64 49 | 50 | return 63 - r; 51 | #elif (defined(__GNUC__) && __GNUC__ >= 4) || RAPIDJSON_HAS_BUILTIN(__builtin_clzll) 52 | // __builtin_clzll wrapper 53 | return static_cast(__builtin_clzll(x)); 54 | #else 55 | // naive version 56 | uint32_t r = 0; 57 | while (!(x & (static_cast(1) << 63))) { 58 | x <<= 1; 59 | ++r; 60 | } 61 | 62 | return r; 63 | #endif // _MSC_VER 64 | } 65 | 66 | #define RAPIDJSON_CLZLL RAPIDJSON_NAMESPACE::internal::clzll 67 | 68 | } // namespace internal 69 | RAPIDJSON_NAMESPACE_END 70 | 71 | #endif // RAPIDJSON_CLZLL_H_ 72 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/rapidjson/internal/swap.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_INTERNAL_SWAP_H_ 16 | #define RAPIDJSON_INTERNAL_SWAP_H_ 17 | 18 | #include "../rapidjson.h" 19 | 20 | #if defined(__clang__) 21 | RAPIDJSON_DIAG_PUSH 22 | RAPIDJSON_DIAG_OFF(c++98-compat) 23 | #endif 24 | 25 | RAPIDJSON_NAMESPACE_BEGIN 26 | namespace internal { 27 | 28 | //! Custom swap() to avoid dependency on C++ header 29 | /*! \tparam T Type of the arguments to swap, should be instantiated with primitive C++ types only. 30 | \note This has the same semantics as std::swap(). 31 | */ 32 | template 33 | inline void Swap(T& a, T& b) RAPIDJSON_NOEXCEPT { 34 | T tmp = a; 35 | a = b; 36 | b = tmp; 37 | } 38 | 39 | } // namespace internal 40 | RAPIDJSON_NAMESPACE_END 41 | 42 | #if defined(__clang__) 43 | RAPIDJSON_DIAG_POP 44 | #endif 45 | 46 | #endif // RAPIDJSON_INTERNAL_SWAP_H_ 47 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/rapidjson/memorybuffer.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_MEMORYBUFFER_H_ 16 | #define RAPIDJSON_MEMORYBUFFER_H_ 17 | 18 | #include "stream.h" 19 | #include "internal/stack.h" 20 | 21 | RAPIDJSON_NAMESPACE_BEGIN 22 | 23 | //! Represents an in-memory output byte stream. 24 | /*! 25 | This class is mainly for being wrapped by EncodedOutputStream or AutoUTFOutputStream. 26 | 27 | It is similar to FileWriteBuffer but the destination is an in-memory buffer instead of a file. 28 | 29 | Differences between MemoryBuffer and StringBuffer: 30 | 1. StringBuffer has Encoding but MemoryBuffer is only a byte buffer. 31 | 2. StringBuffer::GetString() returns a null-terminated string. MemoryBuffer::GetBuffer() returns a buffer without terminator. 32 | 33 | \tparam Allocator type for allocating memory buffer. 34 | \note implements Stream concept 35 | */ 36 | template 37 | struct GenericMemoryBuffer { 38 | typedef char Ch; // byte 39 | 40 | GenericMemoryBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {} 41 | 42 | void Put(Ch c) { *stack_.template Push() = c; } 43 | void Flush() {} 44 | 45 | void Clear() { stack_.Clear(); } 46 | void ShrinkToFit() { stack_.ShrinkToFit(); } 47 | Ch* Push(size_t count) { return stack_.template Push(count); } 48 | void Pop(size_t count) { stack_.template Pop(count); } 49 | 50 | const Ch* GetBuffer() const { 51 | return stack_.template Bottom(); 52 | } 53 | 54 | size_t GetSize() const { return stack_.GetSize(); } 55 | 56 | static const size_t kDefaultCapacity = 256; 57 | mutable internal::Stack stack_; 58 | }; 59 | 60 | typedef GenericMemoryBuffer<> MemoryBuffer; 61 | 62 | //! Implement specialized version of PutN() with memset() for better performance. 63 | template<> 64 | inline void PutN(MemoryBuffer& memoryBuffer, char c, size_t n) { 65 | std::memset(memoryBuffer.stack_.Push(n), c, n * sizeof(c)); 66 | } 67 | 68 | RAPIDJSON_NAMESPACE_END 69 | 70 | #endif // RAPIDJSON_MEMORYBUFFER_H_ 71 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/rapidjson/ostreamwrapper.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_OSTREAMWRAPPER_H_ 16 | #define RAPIDJSON_OSTREAMWRAPPER_H_ 17 | 18 | #include "stream.h" 19 | #include 20 | 21 | #ifdef __clang__ 22 | RAPIDJSON_DIAG_PUSH 23 | RAPIDJSON_DIAG_OFF(padded) 24 | #endif 25 | 26 | RAPIDJSON_NAMESPACE_BEGIN 27 | 28 | //! Wrapper of \c std::basic_ostream into RapidJSON's Stream concept. 29 | /*! 30 | The classes can be wrapped including but not limited to: 31 | 32 | - \c std::ostringstream 33 | - \c std::stringstream 34 | - \c std::wpstringstream 35 | - \c std::wstringstream 36 | - \c std::ifstream 37 | - \c std::fstream 38 | - \c std::wofstream 39 | - \c std::wfstream 40 | 41 | \tparam StreamType Class derived from \c std::basic_ostream. 42 | */ 43 | 44 | template 45 | class BasicOStreamWrapper { 46 | public: 47 | typedef typename StreamType::char_type Ch; 48 | BasicOStreamWrapper(StreamType& stream) : stream_(stream) {} 49 | 50 | void Put(Ch c) { 51 | stream_.put(c); 52 | } 53 | 54 | void Flush() { 55 | stream_.flush(); 56 | } 57 | 58 | // Not implemented 59 | char Peek() const { RAPIDJSON_ASSERT(false); return 0; } 60 | char Take() { RAPIDJSON_ASSERT(false); return 0; } 61 | size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; } 62 | char* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } 63 | size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; } 64 | 65 | private: 66 | BasicOStreamWrapper(const BasicOStreamWrapper&); 67 | BasicOStreamWrapper& operator=(const BasicOStreamWrapper&); 68 | 69 | StreamType& stream_; 70 | }; 71 | 72 | typedef BasicOStreamWrapper OStreamWrapper; 73 | typedef BasicOStreamWrapper WOStreamWrapper; 74 | 75 | #ifdef __clang__ 76 | RAPIDJSON_DIAG_POP 77 | #endif 78 | 79 | RAPIDJSON_NAMESPACE_END 80 | 81 | #endif // RAPIDJSON_OSTREAMWRAPPER_H_ 82 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/rapidjson/rapidjson.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | null 6 | true 7 | false 8 | {(const Ch*)data_.ss.str,na} 9 | {(const Ch*)((size_t)data_.s.str & 0x0000FFFFFFFFFFFF),[data_.s.length]na} 10 | {data_.n.i.i} 11 | {data_.n.u.u} 12 | {data_.n.i64} 13 | {data_.n.u64} 14 | {data_.n.d} 15 | Object members={data_.o.size} 16 | Array members={data_.a.size} 17 | 18 | data_.o.size 19 | data_.o.capacity 20 | 21 | data_.o.size 22 | 23 | (rapidjson::GenericMember<$T1,$T2>*)(((size_t)data_.o.members) & 0x0000FFFFFFFFFFFF) 24 | 25 | 26 | data_.a.size 27 | data_.a.capacity 28 | 29 | data_.a.size 30 | 31 | (rapidjson::GenericValue<$T1,$T2>*)(((size_t)data_.a.elements) & 0x0000FFFFFFFFFFFF) 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/base/internal/log2.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | /// 5 | // Use of this source code is governed by a BSD-style 6 | // license that can be found in the LICENSE file or at 7 | // https://developers.google.com/open-source/licenses/bsd 8 | 9 | #ifndef UPB_BASE_INTERNAL_LOG2_H_ 10 | #define UPB_BASE_INTERNAL_LOG2_H_ 11 | 12 | // Must be last. 13 | #include "upb/port/def.inc" 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | UPB_INLINE int upb_Log2Ceiling(int x) { 20 | if (x <= 1) return 0; 21 | #ifdef __GNUC__ 22 | return 32 - __builtin_clz(x - 1); 23 | #else 24 | int lg2 = 0; 25 | while ((1 << lg2) < x) lg2++; 26 | return lg2; 27 | #endif 28 | } 29 | 30 | UPB_INLINE int upb_Log2CeilingSize(int x) { return 1 << upb_Log2Ceiling(x); } 31 | 32 | #ifdef __cplusplus 33 | } /* extern "C" */ 34 | #endif 35 | 36 | #include "upb/port/undef.inc" 37 | 38 | #endif /* UPB_BASE_INTERNAL_LOG2_H_ */ 39 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/collections/array.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | // Temporary hack to fix gRPC. Do not use. 9 | 10 | #ifndef UPB_COLLECTIONS_ARRAY_H_ 11 | #define UPB_COLLECTIONS_ARRAY_H_ 12 | 13 | // IWYU pragma: begin_exports 14 | #include "upb/message/array.h" 15 | // IWYU pragma: end_exports 16 | 17 | #endif /* UPB_COLLECTIONS_ARRAY_H_ */ 18 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/collections/map.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | // Temporary hack to fix gRPC. Do not use. 9 | 10 | #ifndef UPB_COLLECTIONS_MAP_H_ 11 | #define UPB_COLLECTIONS_MAP_H_ 12 | 13 | // IWYU pragma: begin_exports 14 | #include "upb/message/map.h" 15 | // IWYU pragma: end_exports 16 | 17 | #endif /* UPB_COLLECTIONS_MAP_H_ */ 18 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/generated_code_macros.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_GENERATED_CODE_MACROS_H_ 9 | #define UPB_GENERATED_CODE_MACROS_H_ 10 | 11 | // IWYU pragma: begin_exports 12 | #include "upb/message/array.h" 13 | // IWYU pragma: end_exports 14 | 15 | 16 | #ifdef __cplusplus 17 | #include "upb/port/def.inc" 18 | 19 | #ifndef DEFAULT_ARENA_PARAMETER 20 | extern UPB_API struct upb_Arena* get_upb_global_arena(); 21 | extern UPB_API bool set_upb_global_arena(struct upb_Arena*); 22 | 23 | #define DEFAULT_ARENA_PARAMETER = get_upb_global_arena() 24 | #endif 25 | 26 | #if !defined(UPB_VALID_ARENA) 27 | UPB_INLINE struct upb_Arena* upb_valid_arena(struct upb_Arena*& arena) { return arena; } 28 | #define UPB_VALID_ARENA(x) upb_valid_arena(x) 29 | #endif 30 | 31 | #ifndef UPB_ITERATOR_SUPPORT 32 | template 33 | struct upb_range_t 34 | { 35 | protected: 36 | struct upb_iterator 37 | { 38 | const struct upb_Array* _arr; 39 | size_t _index; 40 | 41 | upb_iterator(const struct upb_Array * arr, size_t index) : _arr(arr), _index(index) {} 42 | upb_iterator& operator++() { ++_index; return *this; } 43 | explicit operator bool() const { return _arr && _index < upb_Array_Size(_arr); } 44 | bool operator!() const { return !(bool)*this; } 45 | T* operator->() const { return ((T*const*)upb_Array_DataPtr(_arr))[_index]; } 46 | T& operator*() const { return *(this->operator->()); } 47 | bool operator==(const upb_iterator& rhs) const { return _arr == rhs._arr && _index == rhs._index; } 48 | bool operator!=(const upb_iterator& rhs) const { return !(*this == rhs); } 49 | }; 50 | const struct upb_Array * _arr; 51 | public: 52 | upb_range_t(const struct upb_Array * arr) : _arr(arr) {} 53 | upb_iterator begin() const { return upb_iterator(_arr, 0); } 54 | upb_iterator end() const { return upb_iterator(_arr, upb_Array_Size(_arr)); } 55 | 56 | }; 57 | #define UPB_ITERATOR_SUPPORT(name, type) upb_range_t name() const { return upb_range_t(_##name##_upb_array(nullptr)); } 58 | #endif 59 | 60 | #include "upb/port/undef.inc" 61 | 62 | #endif // __cplusplus 63 | 64 | #endif // UPB_GENERATED_CODE_MACROS_H_ 65 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/generated_code_support.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_GENERATED_CODE_SUPPORT_H_ 9 | #define UPB_GENERATED_CODE_SUPPORT_H_ 10 | 11 | // IWYU pragma: begin_exports 12 | #include "upb/message/accessors.h" 13 | #include "upb/message/array.h" 14 | #include "upb/message/copy.h" 15 | #include "upb/message/internal/accessors.h" 16 | #include "upb/message/internal/array.h" 17 | #include "upb/message/internal/extension.h" 18 | #include "upb/message/internal/message.h" 19 | #include "upb/message/map_gencode_util.h" 20 | #include "upb/message/message.h" 21 | #include "upb/mini_descriptor/decode.h" 22 | #include "upb/mini_table/enum.h" 23 | #include "upb/mini_table/extension.h" 24 | #include "upb/mini_table/extension_registry.h" 25 | #include "upb/mini_table/field.h" 26 | #include "upb/mini_table/file.h" 27 | #include "upb/mini_table/message.h" 28 | #include "upb/mini_table/sub.h" 29 | #include "upb/wire/decode.h" 30 | #include "upb/wire/decode_fast.h" 31 | #include "upb/wire/encode.h" 32 | // IWYU pragma: end_exports 33 | 34 | 35 | #ifdef __cplusplus 36 | #include "upb/libupb.h" 37 | #include "upb/generated_code_macros.h" 38 | 39 | #ifndef UPB_STRINGVIEW 40 | #include "upb/base/string_view.hpp" 41 | #define UPB_STRINGVIEW upb::StringView 42 | #endif 43 | 44 | #endif // __cplusplus 45 | 46 | #endif // UPB_GENERATED_CODE_SUPPORT_H_ 47 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/io/chunked_input_stream.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_IO_CHUNKED_INPUT_STREAM_H_ 32 | #define UPB_IO_CHUNKED_INPUT_STREAM_H_ 33 | 34 | #include "upb/io/zero_copy_input_stream.h" 35 | #include "upb/mem/arena.h" 36 | 37 | // Must be last. 38 | #include "upb/port/def.inc" 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | // A ZeroCopyInputStream which wraps a flat buffer and limits the number of 45 | // bytes that can be returned by a single call to Next(). 46 | upb_ZeroCopyInputStream* upb_ChunkedInputStream_New(const void* data, 47 | size_t size, size_t limit, 48 | upb_Arena* arena); 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #include "upb/port/undef.inc" 55 | 56 | #endif /* UPB_IO_CHUNKED_INPUT_STREAM_H_ */ 57 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/io/chunked_output_stream.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_IO_CHUNKED_OUTPUT_STREAM_H_ 32 | #define UPB_IO_CHUNKED_OUTPUT_STREAM_H_ 33 | 34 | #include "upb/io/zero_copy_output_stream.h" 35 | #include "upb/mem/arena.h" 36 | 37 | // Must be last. 38 | #include "upb/port/def.inc" 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | // A ZeroCopyOutputStream which wraps a flat buffer and limits the number of 45 | // bytes that can be returned by a single call to Next(). 46 | upb_ZeroCopyOutputStream* upb_ChunkedOutputStream_New(void* data, size_t size, 47 | size_t limit, 48 | upb_Arena* arena); 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #include "upb/port/undef.inc" 55 | 56 | #endif /* UPB_IO_CHUNKED_OUTPUT_STREAM_H_ */ 57 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/json/decode.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_JSON_DECODE_H_ 32 | #define UPB_JSON_DECODE_H_ 33 | 34 | #include "upb/reflection/def.h" 35 | 36 | // Must be last. 37 | #include "upb/port/def.inc" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | enum { upb_JsonDecode_IgnoreUnknown = 1 }; 44 | 45 | UPB_API bool upb_JsonDecode(const char* buf, size_t size, upb_Message* msg, 46 | const upb_MessageDef* m, const upb_DefPool* symtab, 47 | int options, upb_Arena* arena, upb_Status* status); 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #include "upb/port/undef.inc" 54 | 55 | #endif /* UPB_JSONDECODE_H_ */ 56 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/lex/atoi.c: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include "upb/lex/atoi.h" 32 | 33 | // Must be last. 34 | #include "upb/port/def.inc" 35 | 36 | const char* upb_BufToUint64(const char* ptr, const char* end, uint64_t* val) { 37 | uint64_t u64 = 0; 38 | while (ptr < end) { 39 | unsigned ch = *ptr - '0'; 40 | if (ch >= 10) break; 41 | if (u64 > UINT64_MAX / 10 || u64 * 10 > UINT64_MAX - ch) { 42 | return NULL; // integer overflow 43 | } 44 | u64 *= 10; 45 | u64 += ch; 46 | ptr++; 47 | } 48 | 49 | *val = u64; 50 | return ptr; 51 | } 52 | 53 | const char* upb_BufToInt64(const char* ptr, const char* end, int64_t* val, 54 | bool* is_neg) { 55 | bool neg = false; 56 | uint64_t u64; 57 | 58 | if (ptr != end && *ptr == '-') { 59 | ptr++; 60 | neg = true; 61 | } 62 | 63 | ptr = upb_BufToUint64(ptr, end, &u64); 64 | if (!ptr || u64 > (uint64_t)INT64_MAX + neg) { 65 | return NULL; // integer overflow 66 | } 67 | 68 | *val = neg ? -u64 : u64; 69 | if (is_neg) *is_neg = neg; 70 | return ptr; 71 | } 72 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/lex/atoi.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_LEX_ATOI_H_ 32 | #define UPB_LEX_ATOI_H_ 33 | 34 | #include 35 | 36 | // Must be last. 37 | #include "upb/port/def.inc" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | // We use these hand-written routines instead of strto[u]l() because the "long 44 | // long" variants aren't in c89. Also our version allows setting a ptr limit. 45 | // Return the new position of the pointer after parsing the int, or NULL on 46 | // integer overflow. 47 | 48 | const char* upb_BufToUint64(const char* ptr, const char* end, uint64_t* val); 49 | const char* upb_BufToInt64(const char* ptr, const char* end, int64_t* val, 50 | bool* is_neg); 51 | 52 | #ifdef __cplusplus 53 | } /* extern "C" */ 54 | #endif 55 | 56 | #include "upb/port/undef.inc" 57 | 58 | #endif /* UPB_LEX_ATOI_H_ */ 59 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/lex/round_trip.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_LEX_ROUND_TRIP_H_ 32 | #define UPB_LEX_ROUND_TRIP_H_ 33 | 34 | // Must be last. 35 | #include "upb/port/def.inc" 36 | 37 | // Encodes a float or double that is round-trippable, but as short as possible. 38 | // These routines are not fully optimal (not guaranteed to be shortest), but are 39 | // short-ish and match the implementation that has been used in protobuf since 40 | // the beginning. 41 | 42 | // The given buffer size must be at least kUpb_RoundTripBufferSize. 43 | enum { kUpb_RoundTripBufferSize = 32 }; 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | void _upb_EncodeRoundTripDouble(double val, char* buf, size_t size); 50 | void _upb_EncodeRoundTripFloat(float val, char* buf, size_t size); 51 | 52 | #ifdef __cplusplus 53 | } /* extern "C" */ 54 | #endif 55 | 56 | #include "upb/port/undef.inc" 57 | 58 | #endif /* UPB_LEX_ROUND_TRIP_H_ */ 59 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/lex/strtod.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_LEX_STRTOD_H_ 32 | #define UPB_LEX_STRTOD_H_ 33 | 34 | // Must be last. 35 | #include "upb/port/def.inc" 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | double _upb_NoLocaleStrtod(const char *str, char **endptr); 42 | 43 | #ifdef __cplusplus 44 | } /* extern "C" */ 45 | #endif 46 | 47 | #include "upb/port/undef.inc" 48 | 49 | #endif /* UPB_LEX_STRTOD_H_ */ 50 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/lex/unicode.c: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include "upb/lex/unicode.h" 32 | 33 | // Must be last. 34 | #include "upb/port/def.inc" 35 | 36 | int upb_Unicode_ToUTF8(uint32_t cp, char* out) { 37 | if (cp <= 0x7f) { 38 | out[0] = cp; 39 | return 1; 40 | } 41 | if (cp <= 0x07ff) { 42 | out[0] = (cp >> 6) | 0xc0; 43 | out[1] = (cp & 0x3f) | 0x80; 44 | return 2; 45 | } 46 | if (cp <= 0xffff) { 47 | out[0] = (cp >> 12) | 0xe0; 48 | out[1] = ((cp >> 6) & 0x3f) | 0x80; 49 | out[2] = (cp & 0x3f) | 0x80; 50 | return 3; 51 | } 52 | if (cp <= 0x10ffff) { 53 | out[0] = (cp >> 18) | 0xf0; 54 | out[1] = ((cp >> 12) & 0x3f) | 0x80; 55 | out[2] = ((cp >> 6) & 0x3f) | 0x80; 56 | out[3] = (cp & 0x3f) | 0x80; 57 | return 4; 58 | } 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mem/alloc.c: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #include "upb/mem/alloc.h" 9 | 10 | #include 11 | 12 | // Must be last. 13 | #include "upb/port/def.inc" 14 | #if defined(__UNREAL__) 15 | #else 16 | 17 | static void* upb_global_allocfunc(upb_alloc* alloc, void* ptr, size_t oldsize, 18 | size_t size) { 19 | UPB_UNUSED(alloc); 20 | UPB_UNUSED(oldsize); 21 | if (size == 0) { 22 | free(ptr); 23 | return NULL; 24 | } else { 25 | return realloc(ptr, size); 26 | } 27 | } 28 | 29 | upb_alloc upb_alloc_global = {&upb_global_allocfunc}; 30 | #endif 31 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/message/copy.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_MESSAGE_COPY_H_ 9 | #define UPB_MESSAGE_COPY_H_ 10 | 11 | #include "upb/mem/arena.h" 12 | #include "upb/message/array.h" 13 | #include "upb/message/map.h" 14 | #include "upb/mini_table/message.h" 15 | 16 | // Must be last. 17 | #include "upb/port/def.inc" 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | // Deep clones a message using the provided target arena. 24 | UPB_API upb_Message* upb_Message_DeepClone(const upb_Message* message, 25 | const upb_MiniTable* mini_table, 26 | upb_Arena* arena); 27 | 28 | // Deep clones array contents. 29 | UPB_API upb_Array* upb_Array_DeepClone(const upb_Array* array, upb_CType value_type, 30 | const upb_MiniTable* sub, upb_Arena* arena); 31 | 32 | // Deep clones map contents. 33 | UPB_API upb_Map* upb_Map_DeepClone(const upb_Map* map, upb_CType key_type, 34 | upb_CType value_type, 35 | const upb_MiniTable* map_entry_table, 36 | upb_Arena* arena); 37 | 38 | // Deep copies the message from src to dst. 39 | UPB_API bool upb_Message_DeepCopy(upb_Message* dst, const upb_Message* src, 40 | const upb_MiniTable* mini_table, upb_Arena* arena); 41 | 42 | #ifdef __cplusplus 43 | } /* extern "C" */ 44 | #endif 45 | 46 | #include "upb/port/undef.inc" 47 | 48 | #endif // UPB_MESSAGE_COPY_H_ 49 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/message/internal/types.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_MINI_TABLE_INTERNAL_TYPES_H_ 9 | #define UPB_MINI_TABLE_INTERNAL_TYPES_H_ 10 | 11 | typedef struct upb_Message_InternalData upb_Message_InternalData; 12 | 13 | typedef struct { 14 | union { 15 | upb_Message_InternalData* internal; 16 | 17 | // Force 8-byte alignment, since the data members may contain members that 18 | // require 8-byte alignment. 19 | double d; 20 | }; 21 | } upb_Message_Internal; 22 | 23 | #endif // UPB_MINI_TABLE_INTERNAL_TYPES_H_ 24 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/message/message.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | // Public APIs for message operations that do not depend on the schema. 9 | // 10 | // MiniTable-based accessors live in accessors.h. 11 | 12 | #ifndef UPB_MESSAGE_MESSAGE_H_ 13 | #define UPB_MESSAGE_MESSAGE_H_ 14 | 15 | #include 16 | 17 | #include "upb/mem/arena.h" 18 | #include "upb/message/types.h" // IWYU pragma: export 19 | #include "upb/mini_table/message.h" 20 | 21 | // Must be last. 22 | #include "upb/port/def.inc" 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | // Creates a new message with the given mini_table on the given arena. 29 | UPB_API upb_Message* upb_Message_New(const upb_MiniTable* mini_table, 30 | upb_Arena* arena); 31 | 32 | // Adds unknown data (serialized protobuf data) to the given message. 33 | // The data is copied into the message instance. 34 | void upb_Message_AddUnknown(upb_Message* msg, const char* data, size_t len, 35 | upb_Arena* arena); 36 | 37 | // Returns a reference to the message's unknown data. 38 | const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len); 39 | 40 | // Removes partial unknown data from message. 41 | void upb_Message_DeleteUnknown(upb_Message* msg, const char* data, size_t len); 42 | 43 | // Returns the number of extensions present in this message. 44 | size_t upb_Message_ExtensionCount(const upb_Message* msg); 45 | 46 | #ifdef __cplusplus 47 | } /* extern "C" */ 48 | #endif 49 | 50 | #include "upb/port/undef.inc" 51 | 52 | #endif /* UPB_MESSAGE_MESSAGE_H_ */ 53 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/message/types.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_MESSAGE_TYPES_H_ 32 | #define UPB_MESSAGE_TYPES_H_ 33 | 34 | // This typedef is in a leaf header to resolve a circular dependency between 35 | // messages and mini tables. 36 | typedef void upb_Message; 37 | 38 | #endif /* UPB_MESSAGE_TYPES_H_ */ 39 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/message/value.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | // Users should include array.h or map.h instead. 9 | // IWYU pragma: private, include "upb/message/array.h" 10 | 11 | #ifndef UPB_MESSAGE_VALUE_H_ 12 | #define UPB_MESSAGE_VALUE_H_ 13 | 14 | #include 15 | 16 | #include "upb/base/string_view.h" 17 | #include "upb/message/tagged_ptr.h" 18 | #include "upb/message/types.h" 19 | 20 | typedef union { 21 | bool bool_val; 22 | float float_val; 23 | double double_val; 24 | int32_t int32_val; 25 | int64_t int64_val; 26 | uint32_t uint32_val; 27 | uint64_t uint64_val; 28 | const struct upb_Array* array_val; 29 | const struct upb_Map* map_val; 30 | const upb_Message* msg_val; 31 | upb_StringView str_val; 32 | 33 | // EXPERIMENTAL: A tagged upb_Message*. Users must use this instead of 34 | // msg_val if unlinked sub-messages may possibly be in use. See the 35 | // documentation in kUpb_DecodeOption_ExperimentalAllowUnlinked for more 36 | // information. 37 | upb_TaggedMessagePtr tagged_msg_val; 38 | } upb_MessageValue; 39 | 40 | typedef union { 41 | struct upb_Array* array; 42 | struct upb_Map* map; 43 | upb_Message* msg; 44 | } upb_MutableMessageValue; 45 | 46 | #endif /* UPB_MESSAGE_VALUE_H_ */ 47 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_descriptor/internal/base92.c: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include "upb/mini_descriptor/internal/base92.h" 32 | 33 | const char _kUpb_ToBase92[] = { 34 | ' ', '!', '#', '$', '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', 35 | '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', 36 | '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 37 | 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 38 | 'Z', '[', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 39 | 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 40 | 'w', 'x', 'y', 'z', '{', '|', '}', '~', 41 | }; 42 | 43 | const int8_t _kUpb_FromBase92[] = { 44 | 0, 1, -1, 2, 3, 4, 5, -1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 45 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 46 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 47 | 55, 56, 57, -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 48 | 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 49 | }; 50 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_descriptor/internal/modifiers.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_MINI_DESCRIPTOR_INTERNAL_MODIFIERS_H_ 9 | #define UPB_MINI_DESCRIPTOR_INTERNAL_MODIFIERS_H_ 10 | 11 | // Must be last. 12 | #include "upb/port/def.inc" 13 | 14 | typedef enum { 15 | kUpb_FieldModifier_IsRepeated = 1 << 0, 16 | kUpb_FieldModifier_IsPacked = 1 << 1, 17 | kUpb_FieldModifier_IsClosedEnum = 1 << 2, 18 | kUpb_FieldModifier_IsProto3Singular = 1 << 3, 19 | kUpb_FieldModifier_IsRequired = 1 << 4, 20 | kUpb_FieldModifier_ValidateUtf8 = 1 << 5, 21 | } kUpb_FieldModifier; 22 | 23 | // These modifiers are also used on the wire. 24 | typedef enum { 25 | kUpb_MessageModifier_ValidateUtf8 = 1 << 0, 26 | kUpb_MessageModifier_DefaultIsPacked = 1 << 1, 27 | kUpb_MessageModifier_IsExtendable = 1 << 2, 28 | } kUpb_MessageModifier; 29 | 30 | #include "upb/port/undef.inc" 31 | 32 | #endif // UPB_MINI_DESCRIPTOR_INTERNAL_MODIFIERS_H_ 33 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_descriptor/internal/wire_constants.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_MINI_DESCRIPTOR_INTERNAL_WIRE_CONSTANTS_H_ 9 | #define UPB_MINI_DESCRIPTOR_INTERNAL_WIRE_CONSTANTS_H_ 10 | 11 | #include "upb/base/descriptor_constants.h" 12 | 13 | // Must be last. 14 | #include "upb/port/def.inc" 15 | 16 | typedef enum { 17 | kUpb_EncodedType_Double = 0, 18 | kUpb_EncodedType_Float = 1, 19 | kUpb_EncodedType_Fixed32 = 2, 20 | kUpb_EncodedType_Fixed64 = 3, 21 | kUpb_EncodedType_SFixed32 = 4, 22 | kUpb_EncodedType_SFixed64 = 5, 23 | kUpb_EncodedType_Int32 = 6, 24 | kUpb_EncodedType_UInt32 = 7, 25 | kUpb_EncodedType_SInt32 = 8, 26 | kUpb_EncodedType_Int64 = 9, 27 | kUpb_EncodedType_UInt64 = 10, 28 | kUpb_EncodedType_SInt64 = 11, 29 | kUpb_EncodedType_OpenEnum = 12, 30 | kUpb_EncodedType_Bool = 13, 31 | kUpb_EncodedType_Bytes = 14, 32 | kUpb_EncodedType_String = 15, 33 | kUpb_EncodedType_Group = 16, 34 | kUpb_EncodedType_Message = 17, 35 | kUpb_EncodedType_ClosedEnum = 18, 36 | 37 | kUpb_EncodedType_RepeatedBase = 20, 38 | } upb_EncodedType; 39 | 40 | typedef enum { 41 | kUpb_EncodedFieldModifier_FlipPacked = 1 << 0, 42 | kUpb_EncodedFieldModifier_IsRequired = 1 << 1, 43 | kUpb_EncodedFieldModifier_IsProto3Singular = 1 << 2, 44 | kUpb_EncodedFieldModifier_FlipValidateUtf8 = 1 << 3, 45 | } upb_EncodedFieldModifier; 46 | 47 | enum { 48 | kUpb_EncodedValue_MinField = ' ', 49 | kUpb_EncodedValue_MaxField = 'I', 50 | kUpb_EncodedValue_MinModifier = 'L', 51 | kUpb_EncodedValue_MaxModifier = '[', 52 | kUpb_EncodedValue_End = '^', 53 | kUpb_EncodedValue_MinSkip = '_', 54 | kUpb_EncodedValue_MaxSkip = '~', 55 | kUpb_EncodedValue_OneofSeparator = '~', 56 | kUpb_EncodedValue_FieldSeparator = '|', 57 | kUpb_EncodedValue_MinOneofField = ' ', 58 | kUpb_EncodedValue_MaxOneofField = 'b', 59 | kUpb_EncodedValue_MaxEnumMask = 'A', 60 | }; 61 | 62 | enum { 63 | kUpb_EncodedVersion_EnumV1 = '!', 64 | kUpb_EncodedVersion_ExtensionV1 = '#', 65 | kUpb_EncodedVersion_MapV1 = '%', 66 | kUpb_EncodedVersion_MessageV1 = '$', 67 | kUpb_EncodedVersion_MessageSetV1 = '&', 68 | }; 69 | 70 | #include "upb/port/undef.inc" 71 | 72 | #endif // UPB_MINI_DESCRIPTOR_INTERNAL_WIRE_CONSTANTS_H_ 73 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_table/compat.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_MINI_TABLE_COMPAT_H_ 9 | #define UPB_MINI_TABLE_COMPAT_H_ 10 | 11 | #include "upb/mini_table/message.h" 12 | 13 | // Must be last. 14 | #include "upb/port/def.inc" 15 | 16 | // upb does not support mixing minitables from different sources but these 17 | // functions are still used by some existing users so for now we make them 18 | // available here. This may or may not change in the future so do not add 19 | // them to new code. 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | // Checks if memory layout of src is compatible with dst. 26 | bool upb_MiniTable_Compatible(const upb_MiniTable* src, 27 | const upb_MiniTable* dst); 28 | 29 | typedef enum { 30 | kUpb_MiniTableEquals_NotEqual, 31 | kUpb_MiniTableEquals_Equal, 32 | kUpb_MiniTableEquals_OutOfMemory, 33 | } upb_MiniTableEquals_Status; 34 | 35 | // Checks equality of mini tables originating from different language runtimes. 36 | upb_MiniTableEquals_Status upb_MiniTable_Equals(const upb_MiniTable* src, 37 | const upb_MiniTable* dst); 38 | 39 | #ifdef __cplusplus 40 | } /* extern "C" */ 41 | #endif 42 | 43 | #include "upb/port/undef.inc" 44 | 45 | #endif /* UPB_MINI_TABLE_COMPAT_H_ */ 46 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_table/enum.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_MINI_TABLE_ENUM_H_ 9 | #define UPB_MINI_TABLE_ENUM_H_ 10 | 11 | #include "upb/mini_table/internal/enum.h" 12 | 13 | // Must be last 14 | #include "upb/port/def.inc" 15 | 16 | typedef struct upb_MiniTableEnum upb_MiniTableEnum; 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | // Validates enum value against range defined by enum mini table. 23 | UPB_INLINE bool upb_MiniTableEnum_CheckValue(const struct upb_MiniTableEnum* e, 24 | uint32_t val) { 25 | _kUpb_FastEnumCheck_Status status = _upb_MiniTable_CheckEnumValueFast(e, val); 26 | if (UPB_UNLIKELY(status == _kUpb_FastEnumCheck_CannotCheckFast)) { 27 | return _upb_MiniTable_CheckEnumValueSlow(e, val); 28 | } 29 | return status == _kUpb_FastEnumCheck_ValueIsInEnum ? true : false; 30 | } 31 | 32 | #ifdef __cplusplus 33 | } /* extern "C" */ 34 | #endif 35 | 36 | #include "upb/port/undef.inc" 37 | 38 | #endif /* UPB_MINI_TABLE_ENUM_H_ */ 39 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_table/extension.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_MINI_TABLE_EXTENSION_H_ 9 | #define UPB_MINI_TABLE_EXTENSION_H_ 10 | 11 | #include "upb/mini_table/internal/extension.h" 12 | 13 | typedef struct upb_MiniTableExtension upb_MiniTableExtension; 14 | 15 | #endif /* UPB_MINI_TABLE_EXTENSION_H_ */ 16 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_table/file.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_MINI_TABLE_FILE_H_ 32 | #define UPB_MINI_TABLE_FILE_H_ 33 | 34 | #include "upb/mini_table/internal/file.h" 35 | 36 | typedef struct upb_MiniTableFile upb_MiniTableFile; 37 | 38 | #endif /* UPB_MINI_TABLE_FILE_H_ */ 39 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_table/internal/extension.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ 32 | #define UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ 33 | 34 | #include "upb/mini_table/internal/field.h" 35 | #include "upb/mini_table/internal/sub.h" 36 | 37 | // Must be last. 38 | #include "upb/port/def.inc" 39 | 40 | struct upb_MiniTableExtension { 41 | // Do not move this field. We need to be able to alias pointers. 42 | struct upb_MiniTableField field; 43 | 44 | const struct upb_MiniTable* extendee; 45 | union upb_MiniTableSub sub; // NULL unless submessage or proto2 enum 46 | }; 47 | 48 | #include "upb/port/undef.inc" 49 | 50 | #endif /* UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ */ 51 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_table/internal/file.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_MINI_TABLE_INTERNAL_FILE_H_ 32 | #define UPB_MINI_TABLE_INTERNAL_FILE_H_ 33 | 34 | #include "upb/mini_table/internal/enum.h" 35 | #include "upb/mini_table/internal/extension.h" 36 | #include "upb/mini_table/internal/message.h" 37 | 38 | // Must be last. 39 | #include "upb/port/def.inc" 40 | 41 | struct upb_MiniTableFile { 42 | const struct upb_MiniTable** msgs; 43 | const struct upb_MiniTableEnum** enums; 44 | const struct upb_MiniTableExtension** exts; 45 | int msg_count; 46 | int enum_count; 47 | int ext_count; 48 | }; 49 | 50 | #include "upb/port/undef.inc" 51 | 52 | #endif /* UPB_MINI_TABLE_INTERNAL_FILE_H_ */ 53 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_table/internal/internal_message.c: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #include "upb/mini_table/internal/message.h" 9 | 10 | const struct upb_MiniTable _kUpb_MiniTable_Empty = { 11 | .subs = NULL, 12 | .fields = NULL, 13 | .size = 0, 14 | .field_count = 0, 15 | .ext = kUpb_ExtMode_NonExtendable, 16 | .dense_below = 0, 17 | .table_mask = -1, 18 | .required_count = 0, 19 | }; 20 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_table/internal/sub.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_MINI_TABLE_INTERNAL_SUB_H_ 32 | #define UPB_MINI_TABLE_INTERNAL_SUB_H_ 33 | 34 | #include "upb/mini_table/internal/enum.h" 35 | #include "upb/mini_table/internal/message.h" 36 | 37 | union upb_MiniTableSub { 38 | const struct upb_MiniTable* submsg; 39 | const struct upb_MiniTableEnum* subenum; 40 | }; 41 | 42 | #endif /* UPB_MINI_TABLE_INTERNAL_SUB_H_ */ 43 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_table/mini_table_message.c: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #include "upb/mini_table/message.h" 9 | 10 | #include 11 | 12 | #include "upb/mem/arena.h" 13 | #include "upb/mini_table/internal/message.h" 14 | 15 | // Must be last. 16 | #include "upb/port/def.inc" 17 | 18 | const upb_MiniTableField* upb_MiniTable_FindFieldByNumber( 19 | const upb_MiniTable* t, uint32_t number) { 20 | const size_t i = ((size_t)number) - 1; // 0 wraps to SIZE_MAX 21 | 22 | // Ideal case: index into dense fields 23 | if (i < t->dense_below) { 24 | UPB_ASSERT(t->fields[i].number == number); 25 | return &t->fields[i]; 26 | } 27 | 28 | // Slow case: binary search 29 | int lo = t->dense_below; 30 | int hi = t->field_count - 1; 31 | while (lo <= hi) { 32 | int mid = (lo + hi) / 2; 33 | uint32_t num = t->fields[mid].number; 34 | if (num < number) { 35 | lo = mid + 1; 36 | continue; 37 | } 38 | if (num > number) { 39 | hi = mid - 1; 40 | continue; 41 | } 42 | return &t->fields[mid]; 43 | } 44 | return NULL; 45 | } 46 | 47 | static bool upb_MiniTable_Is_Oneof(const upb_MiniTableField* f) { 48 | return f->presence < 0; 49 | } 50 | 51 | const upb_MiniTableField* upb_MiniTable_GetOneof(const upb_MiniTable* m, 52 | const upb_MiniTableField* f) { 53 | if (UPB_UNLIKELY(!upb_MiniTable_Is_Oneof(f))) { 54 | return NULL; 55 | } 56 | const upb_MiniTableField* ptr = &m->fields[0]; 57 | const upb_MiniTableField* end = &m->fields[m->field_count]; 58 | while (++ptr < end) { 59 | if (ptr->presence == (*f).presence) { 60 | return ptr; 61 | } 62 | } 63 | return NULL; 64 | } 65 | 66 | bool upb_MiniTable_NextOneofField(const upb_MiniTable* m, 67 | const upb_MiniTableField** f) { 68 | const upb_MiniTableField* ptr = *f; 69 | const upb_MiniTableField* end = &m->fields[m->field_count]; 70 | while (++ptr < end) { 71 | if (ptr->presence == (*f)->presence) { 72 | *f = ptr; 73 | return true; 74 | } 75 | } 76 | return false; 77 | } 78 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/mini_table/sub.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_MINI_TABLE_SUB_H_ 32 | #define UPB_MINI_TABLE_SUB_H_ 33 | 34 | #include "upb/mini_table/internal/sub.h" 35 | 36 | typedef union upb_MiniTableSub upb_MiniTableSub; 37 | 38 | #endif /* UPB_MINI_TABLE_INTERNAL_SUB_H_ */ 39 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/port/vsnprintf_compat.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_PORT_VSNPRINTF_COMPAT_H_ 32 | #define UPB_PORT_VSNPRINTF_COMPAT_H_ 33 | 34 | // Must be last. 35 | #include "upb/port/def.inc" 36 | 37 | UPB_INLINE int _upb_vsnprintf(char* buf, size_t size, const char* fmt, 38 | va_list ap) { 39 | #if defined(__MINGW64__) || defined(__MINGW32__) || defined(_MSC_VER) 40 | // The msvc runtime has a non-conforming vsnprintf() that requires the 41 | // following compatibility code to become conformant. 42 | int n = -1; 43 | if (size != 0) n = _vsnprintf_s(buf, size, _TRUNCATE, fmt, ap); 44 | if (n == -1) n = _vscprintf(fmt, ap); 45 | return n; 46 | #else 47 | return vsnprintf(buf, size, fmt, ap); 48 | #endif 49 | } 50 | 51 | #include "upb/port/undef.inc" 52 | 53 | #endif // UPB_PORT_VSNPRINTF_COMPAT_H_ 54 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/common.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | // IWYU pragma: private, include "upb/reflection/def.h" 9 | 10 | // Declarations common to all public def types. 11 | 12 | #ifndef UPB_REFLECTION_COMMON_H_ 13 | #define UPB_REFLECTION_COMMON_H_ 14 | 15 | // begin:google_only 16 | // #ifndef UPB_BOOTSTRAP_STAGE0 17 | // #include "net/proto2/proto/descriptor.upb.h" 18 | // #else 19 | // #include "google/protobuf/descriptor.upb.h" 20 | // #endif 21 | // end:google_only 22 | 23 | // begin:github_only 24 | #include "google/protobuf/descriptor.upb.h" 25 | // end:github_only 26 | 27 | typedef enum { 28 | kUpb_Syntax_Proto2 = 2, 29 | kUpb_Syntax_Proto3 = 3, 30 | kUpb_Syntax_Editions = 99 31 | } upb_Syntax; 32 | 33 | // Forward declarations for circular references. 34 | typedef struct upb_DefPool upb_DefPool; 35 | typedef struct upb_EnumDef upb_EnumDef; 36 | typedef struct upb_EnumReservedRange upb_EnumReservedRange; 37 | typedef struct upb_EnumValueDef upb_EnumValueDef; 38 | typedef struct upb_ExtensionRange upb_ExtensionRange; 39 | typedef struct upb_FieldDef upb_FieldDef; 40 | typedef struct upb_FileDef upb_FileDef; 41 | typedef struct upb_MessageDef upb_MessageDef; 42 | typedef struct upb_MessageReservedRange upb_MessageReservedRange; 43 | typedef struct upb_MethodDef upb_MethodDef; 44 | typedef struct upb_OneofDef upb_OneofDef; 45 | typedef struct upb_ServiceDef upb_ServiceDef; 46 | 47 | // EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// 48 | 49 | typedef struct upb_DefBuilder upb_DefBuilder; 50 | 51 | #endif /* UPB_REFLECTION_COMMON_H_ */ 52 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/def.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_REFLECTION_DEF_H_ 32 | #define UPB_REFLECTION_DEF_H_ 33 | 34 | #include "upb/reflection/def_pool.h" 35 | #include "upb/reflection/enum_def.h" 36 | #include "upb/reflection/enum_value_def.h" 37 | #include "upb/reflection/extension_range.h" 38 | #include "upb/reflection/field_def.h" 39 | #include "upb/reflection/file_def.h" 40 | #include "upb/reflection/message_def.h" 41 | #include "upb/reflection/method_def.h" 42 | #include "upb/reflection/oneof_def.h" 43 | #include "upb/reflection/service_def.h" 44 | 45 | #endif /* UPB_REFLECTION_DEF_H_ */ 46 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/def_type.c: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include "upb/reflection/def_type.h" 32 | 33 | // Must be last. 34 | #include "upb/port/def.inc" 35 | 36 | upb_deftype_t _upb_DefType_Type(upb_value v) { 37 | const uintptr_t num = (uintptr_t)upb_value_getconstptr(v); 38 | return num & UPB_DEFTYPE_MASK; 39 | } 40 | 41 | upb_value _upb_DefType_Pack(const void* ptr, upb_deftype_t type) { 42 | uintptr_t num = (uintptr_t)ptr; 43 | UPB_ASSERT((num & UPB_DEFTYPE_MASK) == 0); 44 | num |= type; 45 | return upb_value_constptr((const void*)num); 46 | } 47 | 48 | const void* _upb_DefType_Unpack(upb_value v, upb_deftype_t type) { 49 | uintptr_t num = (uintptr_t)upb_value_getconstptr(v); 50 | return (num & UPB_DEFTYPE_MASK) == type 51 | ? (const void*)(num & ~UPB_DEFTYPE_MASK) 52 | : NULL; 53 | } 54 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/def_type.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_REFLECTION_DEF_TYPE_H_ 9 | #define UPB_REFLECTION_DEF_TYPE_H_ 10 | 11 | #include "upb/hash/common.h" 12 | 13 | // Must be last. 14 | #include "upb/port/def.inc" 15 | 16 | // Inside a symtab we store tagged pointers to specific def types. 17 | typedef enum { 18 | UPB_DEFTYPE_MASK = 7, 19 | 20 | // Only inside symtab table. 21 | UPB_DEFTYPE_EXT = 0, 22 | UPB_DEFTYPE_MSG = 1, 23 | UPB_DEFTYPE_ENUM = 2, 24 | UPB_DEFTYPE_ENUMVAL = 3, 25 | UPB_DEFTYPE_SERVICE = 4, 26 | 27 | // Only inside message table. 28 | UPB_DEFTYPE_FIELD = 0, 29 | UPB_DEFTYPE_ONEOF = 1, 30 | } upb_deftype_t; 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | // Our 3-bit pointer tagging requires all pointers to be multiples of 8. 37 | // The arena will always yield 8-byte-aligned addresses, however we put 38 | // the defs into arrays. For each element in the array to be 8-byte-aligned, 39 | // the sizes of each def type must also be a multiple of 8. 40 | // 41 | // If any of these asserts fail, we need to add or remove padding on 32-bit 42 | // machines (64-bit machines will have 8-byte alignment already due to 43 | // pointers, which all of these structs have). 44 | UPB_INLINE void _upb_DefType_CheckPadding(size_t size) { 45 | UPB_ASSERT((size & UPB_DEFTYPE_MASK) == 0); 46 | } 47 | 48 | upb_deftype_t _upb_DefType_Type(upb_value v); 49 | 50 | upb_value _upb_DefType_Pack(const void* ptr, upb_deftype_t type); 51 | 52 | const void* _upb_DefType_Unpack(upb_value v, upb_deftype_t type); 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #include "upb/port/undef.inc" 59 | 60 | #endif /* UPB_REFLECTION_DEF_TYPE_H_ */ 61 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/desc_state.c: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include "upb/reflection/internal/desc_state.h" 32 | 33 | // Must be last. 34 | #include "upb/port/def.inc" 35 | 36 | bool _upb_DescState_Grow(upb_DescState* d, upb_Arena* a) { 37 | const size_t oldbufsize = d->bufsize; 38 | const int used = d->ptr - d->buf; 39 | 40 | if (!d->buf) { 41 | d->buf = upb_Arena_Malloc(a, d->bufsize); 42 | if (!d->buf) return false; 43 | d->ptr = d->buf; 44 | d->e.end = d->buf + d->bufsize; 45 | } 46 | 47 | if (oldbufsize - used < kUpb_MtDataEncoder_MinSize) { 48 | d->bufsize *= 2; 49 | d->buf = upb_Arena_Realloc(a, d->buf, oldbufsize, d->bufsize); 50 | if (!d->buf) return false; 51 | d->ptr = d->buf + used; 52 | d->e.end = d->buf + d->bufsize; 53 | } 54 | 55 | return true; 56 | } 57 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/enum_reserved_range.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // IWYU pragma: private, include "upb/reflection/def.h" 32 | 33 | #ifndef UPB_REFLECTION_ENUM_RESERVED_RANGE_H_ 34 | #define UPB_REFLECTION_ENUM_RESERVED_RANGE_H_ 35 | 36 | #include "upb/reflection/common.h" 37 | 38 | // Must be last. 39 | #include "upb/port/def.inc" 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | int32_t upb_EnumReservedRange_Start(const upb_EnumReservedRange* r); 46 | int32_t upb_EnumReservedRange_End(const upb_EnumReservedRange* r); 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #include "upb/port/undef.inc" 53 | 54 | #endif /* UPB_REFLECTION_ENUM_RESERVED_RANGE_H_ */ 55 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/enum_value_def.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // IWYU pragma: private, include "upb/reflection/def.h" 32 | 33 | #ifndef UPB_REFLECTION_ENUM_VALUE_DEF_H_ 34 | #define UPB_REFLECTION_ENUM_VALUE_DEF_H_ 35 | 36 | #include "upb/reflection/common.h" 37 | 38 | // Must be last. 39 | #include "upb/port/def.inc" 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | const upb_EnumDef* upb_EnumValueDef_Enum(const upb_EnumValueDef* v); 46 | const char* upb_EnumValueDef_FullName(const upb_EnumValueDef* v); 47 | bool upb_EnumValueDef_HasOptions(const upb_EnumValueDef* v); 48 | uint32_t upb_EnumValueDef_Index(const upb_EnumValueDef* v); 49 | UPB_API const char* upb_EnumValueDef_Name(const upb_EnumValueDef* v); 50 | UPB_API int32_t upb_EnumValueDef_Number(const upb_EnumValueDef* v); 51 | const UPB_DESC(EnumValueOptions) * 52 | upb_EnumValueDef_Options(const upb_EnumValueDef* v); 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #include "upb/port/undef.inc" 59 | 60 | #endif /* UPB_REFLECTION_ENUM_VALUE_DEF_H_ */ 61 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/extension_range.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // IWYU pragma: private, include "upb/reflection/def.h" 32 | 33 | #ifndef UPB_REFLECTION_EXTENSION_RANGE_H_ 34 | #define UPB_REFLECTION_EXTENSION_RANGE_H_ 35 | 36 | #include "upb/reflection/common.h" 37 | 38 | // Must be last. 39 | #include "upb/port/def.inc" 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | int32_t upb_ExtensionRange_Start(const upb_ExtensionRange* r); 46 | int32_t upb_ExtensionRange_End(const upb_ExtensionRange* r); 47 | 48 | bool upb_ExtensionRange_HasOptions(const upb_ExtensionRange* r); 49 | const UPB_DESC(ExtensionRangeOptions) * 50 | upb_ExtensionRange_Options(const upb_ExtensionRange* r); 51 | 52 | #ifdef __cplusplus 53 | } /* extern "C" */ 54 | #endif 55 | 56 | #include "upb/port/undef.inc" 57 | 58 | #endif /* UPB_REFLECTION_EXTENSION_RANGE_H_ */ 59 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/file_def.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | // IWYU pragma: private, include "upb/reflection/def.h" 9 | 10 | #ifndef UPB_REFLECTION_FILE_DEF_H_ 11 | #define UPB_REFLECTION_FILE_DEF_H_ 12 | 13 | #include "upb/reflection/common.h" 14 | 15 | // Must be last. 16 | #include "upb/port/def.inc" 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | const upb_FileDef* upb_FileDef_Dependency(const upb_FileDef* f, int i); 23 | int upb_FileDef_DependencyCount(const upb_FileDef* f); 24 | bool upb_FileDef_HasOptions(const upb_FileDef* f); 25 | UPB_API const char* upb_FileDef_Name(const upb_FileDef* f); 26 | const UPB_DESC(FileOptions) * upb_FileDef_Options(const upb_FileDef* f); 27 | const char* upb_FileDef_Package(const upb_FileDef* f); 28 | int32_t upb_FileDef_Edition(const upb_FileDef* f); 29 | UPB_API const upb_DefPool* upb_FileDef_Pool(const upb_FileDef* f); 30 | 31 | const upb_FileDef* upb_FileDef_PublicDependency(const upb_FileDef* f, int i); 32 | int upb_FileDef_PublicDependencyCount(const upb_FileDef* f); 33 | 34 | const upb_ServiceDef* upb_FileDef_Service(const upb_FileDef* f, int i); 35 | int upb_FileDef_ServiceCount(const upb_FileDef* f); 36 | 37 | UPB_API upb_Syntax upb_FileDef_Syntax(const upb_FileDef* f); 38 | 39 | const upb_EnumDef* upb_FileDef_TopLevelEnum(const upb_FileDef* f, int i); 40 | int upb_FileDef_TopLevelEnumCount(const upb_FileDef* f); 41 | 42 | const upb_FieldDef* upb_FileDef_TopLevelExtension(const upb_FileDef* f, int i); 43 | int upb_FileDef_TopLevelExtensionCount(const upb_FileDef* f); 44 | 45 | const upb_MessageDef* upb_FileDef_TopLevelMessage(const upb_FileDef* f, int i); 46 | int upb_FileDef_TopLevelMessageCount(const upb_FileDef* f); 47 | 48 | const upb_FileDef* upb_FileDef_WeakDependency(const upb_FileDef* f, int i); 49 | int upb_FileDef_WeakDependencyCount(const upb_FileDef* f); 50 | 51 | #ifdef __cplusplus 52 | } /* extern "C" */ 53 | #endif 54 | 55 | #include "upb/port/undef.inc" 56 | 57 | #endif /* UPB_REFLECTION_FILE_DEF_H_ */ 58 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/internal/desc_state.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_REFLECTION_DESC_STATE_INTERNAL_H_ 32 | #define UPB_REFLECTION_DESC_STATE_INTERNAL_H_ 33 | 34 | #include "upb/mem/arena.h" 35 | #include "upb/mini_descriptor/internal/encode.h" 36 | 37 | // Must be last. 38 | #include "upb/port/def.inc" 39 | 40 | // Manages the storage for mini descriptor strings as they are being encoded. 41 | // TODO(b/234740652): Move some of this state directly into the encoder, maybe. 42 | typedef struct { 43 | upb_MtDataEncoder e; 44 | size_t bufsize; 45 | char* buf; 46 | char* ptr; 47 | } upb_DescState; 48 | 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | UPB_INLINE void _upb_DescState_Init(upb_DescState* d) { 54 | d->bufsize = kUpb_MtDataEncoder_MinSize * 2; 55 | d->buf = NULL; 56 | d->ptr = NULL; 57 | } 58 | 59 | bool _upb_DescState_Grow(upb_DescState* d, upb_Arena* a); 60 | 61 | #ifdef __cplusplus 62 | } /* extern "C" */ 63 | #endif 64 | 65 | #include "upb/port/undef.inc" 66 | 67 | #endif /* UPB_REFLECTION_DESC_STATE_INTERNAL_H_ */ 68 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/internal/enum_def.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_REFLECTION_ENUM_DEF_INTERNAL_H_ 32 | #define UPB_REFLECTION_ENUM_DEF_INTERNAL_H_ 33 | 34 | #include "upb/reflection/enum_def.h" 35 | 36 | // Must be last. 37 | #include "upb/port/def.inc" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | upb_EnumDef* _upb_EnumDef_At(const upb_EnumDef* e, int i); 44 | bool _upb_EnumDef_Insert(upb_EnumDef* e, upb_EnumValueDef* v, upb_Arena* a); 45 | const upb_MiniTableEnum* _upb_EnumDef_MiniTable(const upb_EnumDef* e); 46 | 47 | // Allocate and initialize an array of |n| enum defs. 48 | upb_EnumDef* _upb_EnumDefs_New( 49 | upb_DefBuilder* ctx, int n, 50 | const UPB_DESC(EnumDescriptorProto) * const* protos, 51 | const upb_MessageDef* containing_type); 52 | 53 | #ifdef __cplusplus 54 | } /* extern "C" */ 55 | #endif 56 | 57 | #include "upb/port/undef.inc" 58 | 59 | #endif /* UPB_REFLECTION_ENUM_DEF_INTERNAL_H_ */ 60 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/internal/enum_reserved_range.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_REFLECTION_ENUM_RESERVED_RANGE_INTERNAL_H_ 32 | #define UPB_REFLECTION_ENUM_RESERVED_RANGE_INTERNAL_H_ 33 | 34 | #include "upb/reflection/enum_reserved_range.h" 35 | 36 | // Must be last. 37 | #include "upb/port/def.inc" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | upb_EnumReservedRange* _upb_EnumReservedRange_At(const upb_EnumReservedRange* r, 44 | int i); 45 | 46 | // Allocate and initialize an array of |n| reserved ranges owned by |e|. 47 | upb_EnumReservedRange* _upb_EnumReservedRanges_New( 48 | upb_DefBuilder* ctx, int n, 49 | const UPB_DESC(EnumDescriptorProto_EnumReservedRange) * const* protos, 50 | const upb_EnumDef* e); 51 | 52 | #ifdef __cplusplus 53 | } /* extern "C" */ 54 | #endif 55 | 56 | #include "upb/port/undef.inc" 57 | 58 | #endif /* UPB_REFLECTION_ENUM_RESERVED_RANGE_INTERNAL_H_ */ 59 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/internal/enum_value_def.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_ 32 | #define UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_ 33 | 34 | #include "upb/reflection/enum_value_def.h" 35 | 36 | // Must be last. 37 | #include "upb/port/def.inc" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | upb_EnumValueDef* _upb_EnumValueDef_At(const upb_EnumValueDef* v, int i); 44 | 45 | // Allocate and initialize an array of |n| enum value defs owned by |e|. 46 | upb_EnumValueDef* _upb_EnumValueDefs_New( 47 | upb_DefBuilder* ctx, const char* prefix, int n, 48 | const UPB_DESC(EnumValueDescriptorProto) * const* protos, upb_EnumDef* e, 49 | bool* is_sorted); 50 | 51 | const upb_EnumValueDef** _upb_EnumValueDefs_Sorted(const upb_EnumValueDef* v, 52 | int n, upb_Arena* a); 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #include "upb/port/undef.inc" 59 | 60 | #endif /* UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_ */ 61 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/internal/extension_range.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_ 32 | #define UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_ 33 | 34 | #include "upb/reflection/extension_range.h" 35 | 36 | // Must be last. 37 | #include "upb/port/def.inc" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | upb_ExtensionRange* _upb_ExtensionRange_At(const upb_ExtensionRange* r, int i); 44 | 45 | // Allocate and initialize an array of |n| extension ranges owned by |m|. 46 | upb_ExtensionRange* _upb_ExtensionRanges_New( 47 | upb_DefBuilder* ctx, int n, 48 | const UPB_DESC(DescriptorProto_ExtensionRange) * const* protos, 49 | const upb_MessageDef* m); 50 | 51 | #ifdef __cplusplus 52 | } /* extern "C" */ 53 | #endif 54 | 55 | #include "upb/port/undef.inc" 56 | 57 | #endif /* UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_ */ 58 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/internal/file_def.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_REFLECTION_FILE_DEF_INTERNAL_H_ 32 | #define UPB_REFLECTION_FILE_DEF_INTERNAL_H_ 33 | 34 | #include "upb/reflection/file_def.h" 35 | 36 | // Must be last. 37 | #include "upb/port/def.inc" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | const upb_MiniTableExtension* _upb_FileDef_ExtensionMiniTable( 44 | const upb_FileDef* f, int i); 45 | const int32_t* _upb_FileDef_PublicDependencyIndexes(const upb_FileDef* f); 46 | const int32_t* _upb_FileDef_WeakDependencyIndexes(const upb_FileDef* f); 47 | 48 | // upb_FileDef_Package() returns "" if f->package is NULL, this does not. 49 | const char* _upb_FileDef_RawPackage(const upb_FileDef* f); 50 | 51 | void _upb_FileDef_Create(upb_DefBuilder* ctx, 52 | const UPB_DESC(FileDescriptorProto) * file_proto); 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #include "upb/port/undef.inc" 59 | 60 | #endif /* UPB_REFLECTION_FILE_DEF_INTERNAL_H_ */ 61 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/internal/message_reserved_range.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_REFLECTION_MESSAGE_RESERVED_RANGE_INTERNAL_H_ 32 | #define UPB_REFLECTION_MESSAGE_RESERVED_RANGE_INTERNAL_H_ 33 | 34 | #include "upb/reflection/message_reserved_range.h" 35 | 36 | // Must be last. 37 | #include "upb/port/def.inc" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | upb_MessageReservedRange* _upb_MessageReservedRange_At( 44 | const upb_MessageReservedRange* r, int i); 45 | 46 | // Allocate and initialize an array of |n| reserved ranges owned by |m|. 47 | upb_MessageReservedRange* _upb_MessageReservedRanges_New( 48 | upb_DefBuilder* ctx, int n, 49 | const UPB_DESC(DescriptorProto_ReservedRange) * const* protos, 50 | const upb_MessageDef* m); 51 | 52 | #ifdef __cplusplus 53 | } /* extern "C" */ 54 | #endif 55 | 56 | #include "upb/port/undef.inc" 57 | 58 | #endif /* UPB_REFLECTION_MESSAGE_RESERVED_RANGE_INTERNAL_H_ */ 59 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/internal/method_def.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_REFLECTION_METHOD_DEF_INTERNAL_H_ 32 | #define UPB_REFLECTION_METHOD_DEF_INTERNAL_H_ 33 | 34 | #include "upb/reflection/method_def.h" 35 | 36 | // Must be last. 37 | #include "upb/port/def.inc" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | upb_MethodDef* _upb_MethodDef_At(const upb_MethodDef* m, int i); 44 | 45 | // Allocate and initialize an array of |n| method defs owned by |s|. 46 | upb_MethodDef* _upb_MethodDefs_New( 47 | upb_DefBuilder* ctx, int n, 48 | const UPB_DESC(MethodDescriptorProto) * const* protos, upb_ServiceDef* s); 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #include "upb/port/undef.inc" 55 | 56 | #endif /* UPB_REFLECTION_METHOD_DEF_INTERNAL_H_ */ 57 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/internal/oneof_def.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_ 32 | #define UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_ 33 | 34 | #include "upb/reflection/oneof_def.h" 35 | 36 | // Must be last. 37 | #include "upb/port/def.inc" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | upb_OneofDef* _upb_OneofDef_At(const upb_OneofDef* o, int i); 44 | void _upb_OneofDef_Insert(upb_DefBuilder* ctx, upb_OneofDef* o, 45 | const upb_FieldDef* f, const char* name, size_t size); 46 | 47 | // Allocate and initialize an array of |n| oneof defs owned by |m|. 48 | upb_OneofDef* _upb_OneofDefs_New( 49 | upb_DefBuilder* ctx, int n, 50 | const UPB_DESC(OneofDescriptorProto) * const* protos, upb_MessageDef* m); 51 | 52 | size_t _upb_OneofDefs_Finalize(upb_DefBuilder* ctx, upb_MessageDef* m); 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #include "upb/port/undef.inc" 59 | 60 | #endif /* UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_ */ 61 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/internal/service_def.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_ 32 | #define UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_ 33 | 34 | #include "upb/reflection/service_def.h" 35 | 36 | // Must be last. 37 | #include "upb/port/def.inc" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | upb_ServiceDef* _upb_ServiceDef_At(const upb_ServiceDef* s, int i); 44 | 45 | // Allocate and initialize an array of |n| service defs. 46 | upb_ServiceDef* _upb_ServiceDefs_New( 47 | upb_DefBuilder* ctx, int n, 48 | const UPB_DESC(ServiceDescriptorProto) * const* protos); 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #include "upb/port/undef.inc" 55 | 56 | #endif /* UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_ */ 57 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/internal/strdup2.c: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #include "upb/reflection/internal/strdup2.h" 9 | 10 | #include 11 | 12 | #include "upb/mem/arena.h" 13 | 14 | // Must be last. 15 | #include "upb/port/def.inc" 16 | 17 | char* upb_strdup2(const char* s, size_t len, upb_Arena* a) { 18 | size_t n; 19 | char* p; 20 | 21 | // Prevent overflow errors. 22 | if (len == SIZE_MAX) return NULL; 23 | 24 | // Always null-terminate, even if binary data; but don't rely on the input to 25 | // have a null-terminating byte since it may be a raw binary buffer. 26 | n = len + 1; 27 | p = upb_Arena_Malloc(a, n); 28 | if (p) { 29 | if (len != 0) memcpy(p, s, len); 30 | p[len] = 0; 31 | } 32 | return p; 33 | } 34 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/internal/strdup2.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_REFLECTION_INTERNAL_STRDUP2_H_ 9 | #define UPB_REFLECTION_INTERNAL_STRDUP2_H_ 10 | 11 | #include 12 | 13 | #include "upb/mem/arena.h" 14 | 15 | // Must be last. 16 | #include "upb/port/def.inc" 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | // Variant that works with a length-delimited rather than NULL-delimited string, 23 | // as supported by strtable. 24 | char* upb_strdup2(const char* s, size_t len, upb_Arena* a); 25 | 26 | #ifdef __cplusplus 27 | } /* extern "C" */ 28 | #endif 29 | 30 | #include "upb/port/undef.inc" 31 | 32 | #endif /* UPB_REFLECTION_INTERNAL_STRDUP2_H_ */ 33 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/message.hpp: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_REFLECTION_MESSAGE_HPP_ 32 | #define UPB_REFLECTION_MESSAGE_HPP_ 33 | 34 | #include "upb/reflection/message.h" 35 | 36 | namespace upb { 37 | 38 | typedef upb_MessageValue MessageValue; 39 | 40 | } // namespace upb 41 | 42 | #endif // UPB_REFLECTION_MESSAGE_HPP_ 43 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/message_reserved_range.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // IWYU pragma: private, include "upb/reflection/def.h" 32 | 33 | #ifndef UPB_REFLECTION_MESSAGE_RESERVED_RANGE_H_ 34 | #define UPB_REFLECTION_MESSAGE_RESERVED_RANGE_H_ 35 | 36 | #include "upb/reflection/common.h" 37 | 38 | // Must be last. 39 | #include "upb/port/def.inc" 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | int32_t upb_MessageReservedRange_Start(const upb_MessageReservedRange* r); 46 | int32_t upb_MessageReservedRange_End(const upb_MessageReservedRange* r); 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #include "upb/port/undef.inc" 53 | 54 | #endif /* UPB_REFLECTION_MESSAGE_RESERVED_RANGE_H_ */ 55 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/reflection/method_def.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // IWYU pragma: private, include "upb/reflection/def.h" 32 | 33 | #ifndef UPB_REFLECTION_METHOD_DEF_H_ 34 | #define UPB_REFLECTION_METHOD_DEF_H_ 35 | 36 | #include "upb/reflection/common.h" 37 | 38 | // Must be last. 39 | #include "upb/port/def.inc" 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | bool upb_MethodDef_ClientStreaming(const upb_MethodDef* m); 46 | const char* upb_MethodDef_FullName(const upb_MethodDef* m); 47 | bool upb_MethodDef_HasOptions(const upb_MethodDef* m); 48 | int upb_MethodDef_Index(const upb_MethodDef* m); 49 | const upb_MessageDef* upb_MethodDef_InputType(const upb_MethodDef* m); 50 | const char* upb_MethodDef_Name(const upb_MethodDef* m); 51 | const UPB_DESC(MethodOptions) * upb_MethodDef_Options(const upb_MethodDef* m); 52 | const upb_MessageDef* upb_MethodDef_OutputType(const upb_MethodDef* m); 53 | bool upb_MethodDef_ServerStreaming(const upb_MethodDef* m); 54 | const upb_ServiceDef* upb_MethodDef_Service(const upb_MethodDef* m); 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #include "upb/port/undef.inc" 61 | 62 | #endif /* UPB_REFLECTION_METHOD_DEF_H_ */ 63 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/wire/encode.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | // upb_Encode: parsing from a upb_Message using a upb_MiniTable. 9 | 10 | #ifndef UPB_WIRE_ENCODE_H_ 11 | #define UPB_WIRE_ENCODE_H_ 12 | 13 | #include 14 | #include 15 | 16 | #include "upb/mem/arena.h" 17 | #include "upb/mini_table/message.h" 18 | 19 | // Must be last. 20 | #include "upb/port/def.inc" 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | enum { 27 | /* If set, the results of serializing will be deterministic across all 28 | * instances of this binary. There are no guarantees across different 29 | * binary builds. 30 | * 31 | * If your proto contains maps, the encoder will need to malloc()/free() 32 | * memory during encode. */ 33 | kUpb_EncodeOption_Deterministic = 1, 34 | 35 | // When set, unknown fields are not printed. 36 | kUpb_EncodeOption_SkipUnknown = 2, 37 | 38 | // When set, the encode will fail if any required fields are missing. 39 | kUpb_EncodeOption_CheckRequired = 4, 40 | }; 41 | 42 | typedef enum { 43 | kUpb_EncodeStatus_Ok = 0, 44 | kUpb_EncodeStatus_OutOfMemory = 1, // Arena alloc failed 45 | kUpb_EncodeStatus_MaxDepthExceeded = 2, 46 | 47 | // kUpb_EncodeOption_CheckRequired failed but the parse otherwise succeeded. 48 | kUpb_EncodeStatus_MissingRequired = 3, 49 | } upb_EncodeStatus; 50 | 51 | UPB_INLINE uint32_t upb_EncodeOptions_MaxDepth(uint16_t depth) { 52 | return (uint32_t)depth << 16; 53 | } 54 | 55 | UPB_INLINE uint16_t upb_EncodeOptions_GetMaxDepth(uint32_t options) { 56 | return options >> 16; 57 | } 58 | 59 | // Enforce an upper bound on recursion depth. 60 | UPB_INLINE int upb_Encode_LimitDepth(uint32_t encode_options, uint32_t limit) { 61 | uint32_t max_depth = upb_EncodeOptions_GetMaxDepth(encode_options); 62 | if (max_depth > limit) max_depth = limit; 63 | return upb_EncodeOptions_MaxDepth(max_depth) | (encode_options & 0xffff); 64 | } 65 | 66 | UPB_API upb_EncodeStatus upb_Encode(const void* msg, const upb_MiniTable* l, 67 | int options, upb_Arena* arena, char** buf, 68 | size_t* size); 69 | 70 | #ifdef __cplusplus 71 | } /* extern "C" */ 72 | #endif 73 | 74 | #include "upb/port/undef.inc" 75 | 76 | #endif /* UPB_WIRE_ENCODE_H_ */ 77 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/wire/eps_copy_input_stream.c: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include "upb/wire/eps_copy_input_stream.h" 32 | 33 | static const char* _upb_EpsCopyInputStream_NoOpCallback( 34 | upb_EpsCopyInputStream* e, const char* old_end, const char* new_start) { 35 | return new_start; 36 | } 37 | 38 | const char* _upb_EpsCopyInputStream_IsDoneFallbackNoCallback( 39 | upb_EpsCopyInputStream* e, const char* ptr, int overrun) { 40 | return _upb_EpsCopyInputStream_IsDoneFallbackInline( 41 | e, ptr, overrun, _upb_EpsCopyInputStream_NoOpCallback); 42 | } 43 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/wire/internal/constants.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_WIRE_INTERNAL_CONSTANTS_H_ 9 | #define UPB_WIRE_INTERNAL_CONSTANTS_H_ 10 | 11 | #define kUpb_WireFormat_DefaultDepthLimit 100 12 | 13 | // MessageSet wire format is: 14 | // message MessageSet { 15 | // repeated group Item = 1 { 16 | // required int32 type_id = 2; 17 | // required bytes message = 3; 18 | // } 19 | // } 20 | 21 | enum { 22 | kUpb_MsgSet_Item = 1, 23 | kUpb_MsgSet_TypeId = 2, 24 | kUpb_MsgSet_Message = 3, 25 | }; 26 | 27 | #endif /* UPB_WIRE_INTERNAL_CONSTANTS_H_ */ 28 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/wire/internal/swap.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google LLC nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef UPB_WIRE_INTERNAL_SWAP_H_ 32 | #define UPB_WIRE_INTERNAL_SWAP_H_ 33 | 34 | #include 35 | 36 | // Must be last. 37 | #include "upb/port/def.inc" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | UPB_INLINE bool _upb_IsLittleEndian(void) { 44 | int x = 1; 45 | return *(char*)&x == 1; 46 | } 47 | 48 | UPB_INLINE uint32_t _upb_BigEndian_Swap32(uint32_t val) { 49 | if (_upb_IsLittleEndian()) return val; 50 | 51 | return ((val & 0xff) << 24) | ((val & 0xff00) << 8) | 52 | ((val & 0xff0000) >> 8) | ((val & 0xff000000) >> 24); 53 | } 54 | 55 | UPB_INLINE uint64_t _upb_BigEndian_Swap64(uint64_t val) { 56 | if (_upb_IsLittleEndian()) return val; 57 | 58 | return ((uint64_t)_upb_BigEndian_Swap32((uint32_t)val) << 32) | 59 | _upb_BigEndian_Swap32((uint32_t)(val >> 32)); 60 | } 61 | 62 | #ifdef __cplusplus 63 | } /* extern "C" */ 64 | #endif 65 | 66 | #include "upb/port/undef.inc" 67 | 68 | #endif /* UPB_WIRE_INTERNAL_SWAP_H_ */ 69 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/wire/internal/utf8_range.h: -------------------------------------------------------------------------------- 1 | #ifndef THIRD_PARTY_UTF8_RANGE_UTF8_RANGE_H_ 2 | #define THIRD_PARTY_UTF8_RANGE_UTF8_RANGE_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #if (defined(__ARM_NEON) && defined(__aarch64__)) || defined(__SSE4_1__) 9 | int utf8_range2(const unsigned char* data, int len); 10 | #else 11 | int utf8_naive(const unsigned char* data, int len); 12 | static inline int utf8_range2(const unsigned char* data, int len) { 13 | return utf8_naive(data, len); 14 | } 15 | #endif 16 | 17 | #ifdef __cplusplus 18 | } // extern "C" 19 | #endif 20 | 21 | #endif // THIRD_PARTY_UTF8_RANGE_UTF8_RANGE_H_ 22 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/wire/reader.c: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #include "upb/wire/reader.h" 9 | 10 | #include "upb/wire/eps_copy_input_stream.h" 11 | #include "upb/wire/types.h" 12 | 13 | // Must be last. 14 | #include "upb/port/def.inc" 15 | 16 | UPB_NOINLINE _upb_WireReader_ReadLongVarintRet 17 | _upb_WireReader_ReadLongVarint(const char* ptr, uint64_t val) { 18 | _upb_WireReader_ReadLongVarintRet ret = {NULL, 0}; 19 | uint64_t byte; 20 | int i; 21 | for (i = 1; i < 10; i++) { 22 | byte = (uint8_t)ptr[i]; 23 | val += (byte - 1) << (i * 7); 24 | if (!(byte & 0x80)) { 25 | ret.ptr = ptr + i + 1; 26 | ret.val = val; 27 | return ret; 28 | } 29 | } 30 | return ret; 31 | } 32 | 33 | const char* _upb_WireReader_SkipGroup(const char* ptr, uint32_t tag, 34 | int depth_limit, 35 | upb_EpsCopyInputStream* stream) { 36 | if (--depth_limit == 0) return NULL; 37 | uint32_t end_group_tag = (tag & ~7ULL) | kUpb_WireType_EndGroup; 38 | while (!upb_EpsCopyInputStream_IsDone(stream, &ptr)) { 39 | // uint32_t tag; 40 | ptr = upb_WireReader_ReadTag(ptr, &tag); 41 | if (!ptr) return NULL; 42 | if (tag == end_group_tag) return ptr; 43 | ptr = _upb_WireReader_SkipValue(ptr, tag, depth_limit, stream); 44 | if (!ptr) return NULL; 45 | } 46 | return ptr; 47 | } 48 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMP/ThirdParty/upb/wire/types.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2023 Google LLC. All rights reserved. 3 | // 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file or at 6 | // https://developers.google.com/open-source/licenses/bsd 7 | 8 | #ifndef UPB_WIRE_TYPES_H_ 9 | #define UPB_WIRE_TYPES_H_ 10 | 11 | // A list of types as they are encoded on the wire. 12 | typedef enum { 13 | kUpb_WireType_Varint = 0, 14 | kUpb_WireType_64Bit = 1, 15 | kUpb_WireType_Delimited = 2, 16 | kUpb_WireType_StartGroup = 3, 17 | kUpb_WireType_EndGroup = 4, 18 | kUpb_WireType_32Bit = 5 19 | } upb_WireType; 20 | 21 | #endif /* UPB_WIRE_TYPES_H_ */ 22 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/GMPEditor/GMPEditor.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | using System.IO; 5 | 6 | public class GMPEditor : ModuleRules 7 | { 8 | public GMPEditor(ReadOnlyTargetRules Target) 9 | : base(Target) 10 | { 11 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 12 | 13 | // bEnableUndefinedIdentifierWarnings = false; 14 | 15 | PublicIncludePaths.AddRange(new string[] { 16 | ModuleDirectory + "/Public", 17 | // ... add public include paths required here ... 18 | }); 19 | 20 | PrivateIncludePaths.AddRange(new string[] { 21 | ModuleDirectory + "/Private", 22 | // ModuleDirectory + "/ThirdParty", 23 | Path.Combine(ModuleDirectory, "../../", "GMP/ThirdParty"), 24 | // ... add other private include paths required here ... 25 | }); 26 | 27 | PublicDependencyModuleNames.AddRange(new string[] { 28 | "Core", 29 | "Engine", 30 | "CoreUObject", 31 | "MessageTags", 32 | }); 33 | 34 | PrivateDependencyModuleNames.AddRange(new string[] { 35 | "GMP", 36 | "MessageTagsEditor", 37 | "SlateCore", 38 | "Slate", 39 | "EditorStyle", 40 | "Kismet", 41 | "InputCore", 42 | "KismetCompiler", 43 | "KismetWidgets", 44 | "RenderCore", 45 | }); 46 | PrivateDefinitions.Add("SUPPRESS_MONOLITHIC_HEADER_WARNINGS=1"); 47 | 48 | if (Target.Type == TargetRules.TargetType.Editor) 49 | { 50 | PrivateDependencyModuleNames.AddRange(new string[] { 51 | "UnrealEd", 52 | "PropertyEditor", 53 | "BlueprintGraph", 54 | "GraphEditor", 55 | "AssetManagerEditor", 56 | // "GenericStorages", 57 | "GameplayTasks", 58 | }); 59 | } 60 | 61 | DynamicallyLoadedModuleNames.AddRange(new string[] { 62 | // ... add any modules that your module loads dynamically here ... 63 | }); 64 | 65 | BuildVersion Version; 66 | if (BuildVersion.TryRead(BuildVersion.GetDefaultFileName(), out Version)) 67 | { 68 | if (Version.MajorVersion == 4 && Version.MinorVersion < 20) 69 | PrivateDependencyModuleNames.Add("ReferenceViewer"); 70 | else if (Version.MajorVersion > 4 || (Version.MajorVersion == 4 && Version.MinorVersion >= 24)) 71 | PrivateDependencyModuleNames.Add("ToolMenus"); 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/GMPEditor/Private/GMPBPCompilerExtension.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "BlueprintCompilerExtension.h" 6 | #include "GMPBPCompilerExtension.generated.h" 7 | 8 | UCLASS() 9 | class UGMPBPCompilerExtension : public UBlueprintCompilerExtension 10 | { 11 | GENERATED_BODY() 12 | 13 | public: 14 | UGMPBPCompilerExtension(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); 15 | virtual void ProcessBlueprintCompiled(const FKismetCompilerContext& CompilationContext, const FBlueprintCompiledData& Data) override; 16 | }; 17 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/GMPEditor/Private/GMPBPMetaCustomization.h: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "IDetailCustomization.h" 7 | #include "UObject/WeakFieldPtr.h" 8 | 9 | class IDetailLayoutBuilder; 10 | class IBlueprintEditor; 11 | class UBlueprint; 12 | 13 | class FGMPBPMetaCustomization : public IDetailCustomization 14 | { 15 | public: 16 | static TSharedPtr MakeInstance(TSharedPtr InBlueprintEditor); 17 | 18 | protected: 19 | FGMPBPMetaCustomization(TSharedPtr InBlueprintEditor, UBlueprint* Blueprint) 20 | : BlueprintEditorPtr(InBlueprintEditor) 21 | , BlueprintPtr(Blueprint) 22 | { 23 | } 24 | virtual void CustomizeDetails(IDetailLayoutBuilder& DetailLayout) override; 25 | 26 | TWeakPtr BlueprintEditorPtr; 27 | TWeakObjectPtr BlueprintPtr; 28 | }; 29 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTags/MessageTags.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | namespace UnrealBuildTool.Rules 4 | { 5 | public class MessageTags : ModuleRules 6 | { 7 | public MessageTags(ReadOnlyTargetRules Target) 8 | : base(Target) 9 | { 10 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 11 | PublicIncludePaths.AddRange(new string[]{ 12 | ModuleDirectory + "/Public", 13 | ModuleDirectory + "/Classes", 14 | }); 15 | 16 | PrivateIncludePaths.AddRange(new string[]{ 17 | ModuleDirectory + "/Private", 18 | }); 19 | 20 | PublicDependencyModuleNames.AddRange(new string[]{ 21 | "Core", 22 | "CoreUObject", 23 | "Engine", 24 | "DeveloperSettings", 25 | "GMP", 26 | }); 27 | PrivateDependencyModuleNames.AddRange( 28 | new string[] 29 | { 30 | "Projects", 31 | "Json", 32 | "JsonUtilities", 33 | "DeveloperSettings", 34 | "Projects", 35 | } 36 | ); 37 | 38 | if (Target.Type == TargetType.Editor) 39 | { 40 | PrivateDependencyModuleNames.AddRange(new string[]{ 41 | "SlateCore", 42 | "Slate", 43 | }); 44 | BuildVersion Version; 45 | if (BuildVersion.TryRead(BuildVersion.GetDefaultFileName(), out Version)) 46 | { 47 | if (Version.MajorVersion > 4 || (Version.MajorVersion == 4 && Version.MinorVersion >= 26)) 48 | { 49 | PrivateDependencyModuleNames.AddRange(new string[]{ 50 | "DeveloperSettings" 51 | }); 52 | } 53 | } 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTags/Private/MessageTagsModule.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "MessageTagsModule.h" 4 | #include "Misc/ConfigCacheIni.h" 5 | #include "HAL/IConsoleManager.h" 6 | #include "UObject/Package.h" 7 | 8 | FSimpleMulticastDelegate IMessageTagsModule::OnMessageTagTreeChanged; 9 | FSimpleMulticastDelegate IMessageTagsModule::OnTagSettingsChanged; 10 | 11 | class FMessageTagsModule : public IMessageTagsModule 12 | { 13 | // Begin IModuleInterface 14 | virtual void StartupModule() override; 15 | virtual void ShutdownModule() override; 16 | // End IModuleInterface 17 | }; 18 | 19 | IMPLEMENT_MODULE( FMessageTagsModule, MessageTags ) 20 | DEFINE_LOG_CATEGORY(LogMessageTags); 21 | 22 | void FMessageTagsModule::StartupModule() 23 | { 24 | // This will force initialization 25 | UMessageTagsManager::Get(); 26 | } 27 | 28 | #if !(UE_BUILD_SHIPPING || UE_BUILD_TEST) 29 | int32 MessageTagPrintReportOnShutdown = 0; 30 | static FAutoConsoleVariableRef CVarMessageTagPrintReportOnShutdown(TEXT("MessageTags.PrintReportOnShutdown"), MessageTagPrintReportOnShutdown, TEXT("Print message tag replication report on shutdown"), ECVF_Default ); 31 | #endif 32 | 33 | 34 | void FMessageTagsModule::ShutdownModule() 35 | { 36 | #if !(UE_BUILD_SHIPPING || UE_BUILD_TEST) 37 | if (MessageTagPrintReportOnShutdown) 38 | { 39 | UMessageTagsManager::Get().PrintReplicationFrequencyReport(); 40 | } 41 | #endif 42 | 43 | UMessageTagsManager::SingletonManager = nullptr; 44 | } 45 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTags/Public/MessageTagRedirectors.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UObject/ObjectMacros.h" 7 | #include "UObject/Object.h" 8 | #include "UObject/SoftObjectPath.h" 9 | #include "MessageTagContainer.h" 10 | 11 | #include "MessageTagRedirectors.generated.h" 12 | 13 | /** A single redirect from a deleted tag to the new tag that should replace it */ 14 | USTRUCT() 15 | struct MESSAGETAGS_API FMessageTagRedirect 16 | { 17 | GENERATED_BODY() 18 | 19 | public: 20 | FMessageTagRedirect() { } 21 | 22 | UPROPERTY(EditAnywhere, Category = MessageTags) 23 | FName OldTagName; 24 | 25 | UPROPERTY(EditAnywhere, Category = MessageTags) 26 | FName NewTagName; 27 | 28 | friend inline bool operator==(const FMessageTagRedirect& A, const FMessageTagRedirect& B) 29 | { 30 | return A.OldTagName == B.OldTagName && A.NewTagName == B.NewTagName; 31 | } 32 | 33 | // This enables lookups by old tag name via FindByKey 34 | bool operator==(FName OtherOldTagName) const 35 | { 36 | return OldTagName == OtherOldTagName; 37 | } 38 | }; 39 | 40 | class MESSAGETAGS_API FMessageTagRedirectors 41 | { 42 | public: 43 | static FMessageTagRedirectors& Get(); 44 | 45 | /** Sees if the tag name should be redirected to a different tag, returns null if there is no active redirect */ 46 | const FMessageTag* RedirectTag(const FName& InTagName) const; 47 | 48 | /** Refreshes the redirect map after a config change */ 49 | void RefreshTagRedirects(); 50 | 51 | private: 52 | FMessageTagRedirectors(); 53 | 54 | /** The map of ini-configured tag redirectors */ 55 | TMap TagRedirects; 56 | }; -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTags/Public/MessageTags.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Misc/MonolithicHeaderBoilerplate.h" 6 | MONOLITHIC_HEADER_BOILERPLATE() 7 | 8 | #include "MessageTagsManager.h" 9 | #include "MessageTagContainer.h" 10 | #include "MessageTagAssetInterface.h" 11 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTags/Public/MessageTagsModule.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Delegates/Delegate.h" 7 | #include "EngineGlobals.h" 8 | #include "MessageTagContainer.h" 9 | #include "MessageTagsManager.h" 10 | #include "HAL/Platform.h" 11 | #include "Modules/ModuleInterface.h" 12 | #include "Modules/ModuleManager.h" 13 | #include "UObject/NameTypes.h" 14 | 15 | /** 16 | * The public interface to this module, generally you should access the manager directly instead 17 | */ 18 | class IMessageTagsModule : public IModuleInterface 19 | { 20 | 21 | public: 22 | 23 | /** 24 | * Singleton-like access to this module's interface. This is just for convenience! 25 | * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already. 26 | * 27 | * @return Returns singleton instance, loading the module on demand if needed 28 | */ 29 | static inline IMessageTagsModule& Get() 30 | { 31 | static const FName MessageTagModuleName(TEXT("MessageTags")); 32 | return FModuleManager::LoadModuleChecked< IMessageTagsModule >(MessageTagModuleName); 33 | } 34 | 35 | /** 36 | * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true. 37 | * 38 | * @return True if the module is loaded and ready to use 39 | */ 40 | static inline bool IsAvailable() 41 | { 42 | static const FName MessageTagModuleName(TEXT("MessageTags")); 43 | return FModuleManager::Get().IsModuleLoaded(MessageTagModuleName); 44 | } 45 | 46 | /** Delegate for when assets are added to the tree */ 47 | static MESSAGETAGS_API FSimpleMulticastDelegate OnMessageTagTreeChanged; 48 | 49 | /** Delegate that gets called after the settings have changed in the editor */ 50 | static MESSAGETAGS_API FSimpleMulticastDelegate OnTagSettingsChanged; 51 | 52 | }; 53 | 54 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/MessageTagsEditor.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright GenericMessagePlugin, Inc. All Rights Reserved. 2 | 3 | namespace UnrealBuildTool.Rules 4 | { 5 | public class MessageTagsEditor : ModuleRules 6 | { 7 | public MessageTagsEditor(ReadOnlyTargetRules Target) 8 | : base(Target) 9 | { 10 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 11 | PublicIncludePaths.AddRange(new string[]{ 12 | ModuleDirectory + "/Public", 13 | }); 14 | 15 | PrivateIncludePaths.AddRange(new string[]{ 16 | ModuleDirectory + "/Private", 17 | }); 18 | PublicIncludePathModuleNames.AddRange(new string[]{ 19 | "AssetTools", 20 | "AssetRegistry", 21 | }); 22 | 23 | PrivateDependencyModuleNames.AddRange(new string[]{ 24 | "ApplicationCore", 25 | "Core", 26 | "CoreUObject", 27 | "Engine", 28 | "AssetTools", 29 | "AssetRegistry", 30 | "MessageTags", 31 | "InputCore", 32 | "Slate", 33 | "SlateCore", 34 | "EditorStyle", 35 | "BlueprintGraph", 36 | "KismetCompiler", 37 | "GraphEditor", 38 | "ContentBrowser", 39 | "MainFrame", 40 | "UnrealEd", 41 | "SourceControl", 42 | "KismetWidgets", 43 | "PropertyEditor", 44 | "GMP", 45 | "Kismet", 46 | 47 | "AssetManagerEditor", 48 | }); 49 | 50 | PrivateIncludePathModuleNames.AddRange(new string[]{ 51 | "Settings", 52 | "SettingsEditor", 53 | "Projects", 54 | }); 55 | 56 | BuildVersion Version; 57 | if (BuildVersion.TryRead(BuildVersion.GetDefaultFileName(), out Version)) 58 | { 59 | if (Version.MajorVersion == 4 && Version.MinorVersion < 20) 60 | PrivateDependencyModuleNames.Add("ReferenceViewer"); 61 | if (Version.MajorVersion > 4 || (Version.MajorVersion == 4 && Version.MinorVersion >= 24)) 62 | PrivateDependencyModuleNames.Add("ToolMenus"); 63 | if (Version.MajorVersion > 4 || (Version.MajorVersion == 4 && Version.MinorVersion >= 26)) 64 | PrivateDependencyModuleNames.Add("ContentBrowserData"); 65 | if(Version.MajorVersion > 4) 66 | PrivateDependencyModuleNames.Add("EditorFramework"); 67 | if(Version.MajorVersion >= 5 && Version.MinorVersion > 0) 68 | PrivateDependencyModuleNames.Add("ToolWidgets"); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Private/MessageTagContainerCustomization.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "IPropertyTypeCustomization.h" 6 | #include "Misc/EngineVersionComparison.h" 7 | #if UE_VERSION_NEWER_THAN(5, 0, 0) 8 | 9 | struct FGameplayTag; 10 | class IPropertyHandle; 11 | class FDetailWidgetRow; 12 | class IDetailChildrenBuilder; 13 | class IPropertyTypeCustomizationUtils; 14 | 15 | /** Customization for the message tag container struct */ 16 | class FMessageTagContainerCustomization : public IPropertyTypeCustomization 17 | { 18 | public: 19 | FMessageTagContainerCustomization(); 20 | 21 | /** Overridden to show an edit button to launch the message tag editor */ 22 | virtual void CustomizeHeader(TSharedRef StructPropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; 23 | 24 | /** Overridden to do nothing */ 25 | virtual void CustomizeChildren(TSharedRef InStructPropertyHandle, IDetailChildrenBuilder& ChildBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override {} 26 | 27 | private: 28 | /** Cached property handle */ 29 | TSharedPtr StructPropertyHandle; 30 | 31 | void OnPasteTag() const; 32 | bool CanPasteTag() const; 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Private/MessageTagCustomization.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "IPropertyTypeCustomization.h" 6 | #include "MessageTagContainer.h" 7 | 8 | struct EVisibility; 9 | 10 | class IPropertyHandle; 11 | class FDetailWidgetRow; 12 | class IDetailChildrenBuilder; 13 | class SMessageTagPicker; 14 | 15 | /** Customization for the message tag struct */ 16 | class FMessageTagCustomization : public IPropertyTypeCustomization 17 | { 18 | public: 19 | 20 | FMessageTagCustomization(); 21 | 22 | /** Overridden to show an edit button to launch the message tag editor */ 23 | virtual void CustomizeHeader(TSharedRef StructPropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; 24 | 25 | /** Overridden to do nothing */ 26 | virtual void CustomizeChildren(TSharedRef InStructPropertyHandle, IDetailChildrenBuilder& ChildBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override {} 27 | 28 | private: 29 | 30 | /** Cached property handle */ 31 | TSharedPtr StructPropertyHandle; 32 | 33 | /** Edited Tag */ 34 | FMessageTag Tag; 35 | }; 36 | 37 | /** Customization for FGameplayTagCreationWidgetHelper showing an add tag button */ 38 | class FMessageTagCreationWidgetHelperDetails : public IPropertyTypeCustomization 39 | { 40 | public: 41 | static TSharedRef MakeInstance(); 42 | 43 | /** IPropertyTypeCustomization interface */ 44 | virtual void CustomizeHeader(TSharedRef StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; 45 | virtual void CustomizeChildren(TSharedRef StructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; 46 | 47 | TSharedPtr TagWidget; 48 | }; -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Private/MessageTagSearchFilter.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UObject/ObjectMacros.h" 7 | #include "FrontendFilterBase.h" 8 | #include "ContentBrowserFrontEndFilterExtension.h" 9 | #include "MessageTagSearchFilter.generated.h" 10 | 11 | UCLASS() 12 | class UMessageTagSearchFilter : public UContentBrowserFrontEndFilterExtension 13 | { 14 | public: 15 | GENERATED_BODY() 16 | 17 | // UContentBrowserFrontEndFilterExtension interface 18 | virtual void AddFrontEndFilterExtensions(TSharedPtr DefaultCategory, TArray< TSharedRef >& InOutFilterList) const override; 19 | // End of UContentBrowserFrontEndFilterExtension interface 20 | }; 21 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Private/MessageTagStyle.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Styling/SlateStyle.h" 6 | #include "Misc/EngineVersionComparison.h" 7 | #if UE_VERSION_NEWER_THAN(5, 0, 0) 8 | #include "Styling/StyleColors.h" 9 | #endif 10 | 11 | #if UE_VERSION_NEWER_THAN(5, 0, 0) 12 | #else 13 | #endif 14 | class FMessageTagStyle 15 | { 16 | public: 17 | static void Initialize(); 18 | static void Shutdown(); 19 | static ISlateStyle& Get() { return *StyleSet.Get(); } 20 | static FName GetStyleSetName(); 21 | 22 | static const FSlateBrush* GetBrush(FName PropertyName, const ANSICHAR* Specifier = nullptr) 23 | { 24 | return StyleSet->GetBrush(PropertyName, Specifier); 25 | } 26 | 27 | static const FLinearColor& GetColor(FName PropertyName, const ANSICHAR* Specifier = nullptr) 28 | { 29 | return StyleSet->GetColor(PropertyName, Specifier); 30 | } 31 | 32 | private: 33 | static TSharedPtr StyleSet; 34 | }; 35 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Private/MessageTagsGraphPanelPinFactory.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "EdGraphUtilities.h" 6 | #include "MessageTagContainer.h" 7 | #include "EdGraphSchema_K2.h" 8 | #include "SMessageTagGraphPin.h" 9 | #if UE_5_00_OR_LATER 10 | #include "SMessageTagContainerGraphPin.h" 11 | //#include "SMessageTagQueryGraphPin.h" 12 | #endif 13 | class FMessageTagsGraphPanelPinFactory: public FGraphPanelPinFactory 14 | { 15 | virtual TSharedPtr CreatePin(class UEdGraphPin* InPin) const override 16 | { 17 | if (InPin->PinType.PinCategory == UEdGraphSchema_K2::PC_Struct) 18 | { 19 | if (UScriptStruct* PinStructType = Cast(InPin->PinType.PinSubCategoryObject.Get())) 20 | { 21 | if (PinStructType->IsChildOf(FMessageTag::StaticStruct())) 22 | { 23 | return SNew(SMessageTagGraphPin, InPin); 24 | } 25 | else if (PinStructType->IsChildOf(FMessageTagContainer::StaticStruct())) 26 | { 27 | #if UE_5_00_OR_LATER 28 | return SNew(SMessageTagContainerGraphPin, InPin); 29 | #endif 30 | } 31 | #if 0 32 | else if (PinStructType->IsChildOf(FMessageTagQuery::StaticStruct())) 33 | { 34 | return SNew(SMessageTagQueryGraphPin, InPin); 35 | } 36 | #endif 37 | } 38 | } 39 | else if (InPin->PinType.PinCategory == UEdGraphSchema_K2::PC_String && InPin->PinType.PinSubCategory == TEXT("LiteralMessageTagContainer")) 40 | { 41 | #if UE_5_00_OR_LATER 42 | return SNew(SMessageTagContainerGraphPin, InPin); 43 | #endif 44 | } 45 | 46 | return nullptr; 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Private/MessageTagsSettingsCustomization.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "IDetailCustomization.h" 7 | #include "Misc/EngineVersionComparison.h" 8 | #if !UE_VERSION_NEWER_THAN(5, 0, 0) 9 | #include "SMessageTagWidget.h" 10 | #else 11 | class SGameplayTagWidget; 12 | #endif 13 | class IDetailLayoutBuilder; 14 | 15 | ////////////////////////////////////////////////////////////////////////// 16 | // FMessageTagsSettingsCustomization 17 | 18 | class FMessageTagsSettingsCustomization : public IDetailCustomization 19 | { 20 | public: 21 | FMessageTagsSettingsCustomization(); 22 | virtual ~FMessageTagsSettingsCustomization(); 23 | 24 | /** Makes a new instance of this detail layout class for a specific detail view requesting it */ 25 | static TSharedRef MakeInstance(); 26 | 27 | // IDetailCustomization interface 28 | virtual void CustomizeDetails(IDetailLayoutBuilder& DetailLayout) override; 29 | // End of IDetailCustomization interface 30 | 31 | #if !UE_VERSION_NEWER_THAN(5, 0, 0) 32 | private: 33 | 34 | /** Callback for when a tag changes */ 35 | void OnTagChanged(); 36 | 37 | /** Module callback for when the tag tree changes */ 38 | void OnTagTreeChanged(); 39 | 40 | TSharedPtr TagWidget; 41 | 42 | TSharedPtr RestrictedTagWidget; 43 | #endif 44 | }; 45 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Private/SAddNewMessageTagSourceWidget.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "MessageTagsManager.h" 7 | #include "Input/Reply.h" 8 | #include "Widgets/SWidget.h" 9 | #include "Widgets/SCompoundWidget.h" 10 | #include "Widgets/DeclarativeSyntaxSupport.h" 11 | #include "Widgets/Input/SEditableTextBox.h" 12 | #include "Widgets/Input/SComboBox.h" 13 | 14 | class SEditableTextBox; 15 | template class SComboBox; 16 | 17 | /** Widget allowing the user to create new message tags */ 18 | class SAddNewMessageTagSourceWidget : public SCompoundWidget 19 | { 20 | public: 21 | 22 | DECLARE_DELEGATE_OneParam( FOnMessageTagSourceAdded, const FString& /*SourceName*/); 23 | 24 | SLATE_BEGIN_ARGS(SAddNewMessageTagSourceWidget) 25 | : _NewSourceName(TEXT("")) 26 | , _Padding(FMargin(15)) 27 | {} 28 | SLATE_EVENT(FOnMessageTagSourceAdded, OnMessageTagSourceAdded ) // Callback for when a new source is added 29 | SLATE_ARGUMENT( FString, NewSourceName ) // String that will initially populate the New Source Name field 30 | SLATE_ARGUMENT(FMargin, Padding) 31 | SLATE_END_ARGS(); 32 | 33 | virtual void Tick( const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime ) override; 34 | 35 | void Construct( const FArguments& InArgs); 36 | 37 | /** Resets all input fields */ 38 | void Reset(); 39 | 40 | private: 41 | 42 | /** Sets the name of the source. Uses the default if the name is not specified */ 43 | void SetSourceName(const FText& InName = FText()); 44 | 45 | /** Creates a list of all root directories for tag sources */ 46 | void PopulateTagRoots(); 47 | 48 | /** Populates the widget's combo box with all potential places where a tag source can be stored */ 49 | TSharedRef OnGenerateTagRootsComboBox(TSharedPtr InItem); 50 | 51 | /** Gets friendly version of a root path */ 52 | FText GetFriendlyPath(TSharedPtr InItem) const; 53 | 54 | /** Creates the text displayed by the combo box when an option is selected */ 55 | FText CreateTagRootsComboBoxContent() const; 56 | 57 | /** Callback for when the Add New Tag button is pressed */ 58 | FReply OnAddNewSourceButtonPressed(); 59 | 60 | /** The name of the next message tag source to create */ 61 | TSharedPtr SourceNameTextBox; 62 | 63 | /** Callback for when a new message tag has been added to the INI files */ 64 | FOnMessageTagSourceAdded OnMessageTagSourceAdded; 65 | 66 | /** All potential INI files where a tag source can be stored */ 67 | TArray > TagRoots; 68 | 69 | /** The directory where the next tag source will be created */ 70 | TSharedPtr > > TagRootsComboBox; 71 | 72 | /** Tracks if this widget should get keyboard focus */ 73 | bool bShouldGetKeyboardFocus; 74 | 75 | FString DefaultNewName; 76 | }; 77 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Private/SMessageTagContainerGraphPin.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "SMessageTagContainerGraphPin.h" 4 | 5 | #include "Misc/EngineVersionComparison.h" 6 | #if UE_VERSION_NEWER_THAN(5, 0, 0) 7 | 8 | #include "EdGraph/EdGraphSchema.h" 9 | #include "MessageTagContainer.h" 10 | #include "SMessageTagContainerCombo.h" 11 | #include "MessageTagEditorUtilities.h" 12 | #include "ScopedTransaction.h" 13 | 14 | #define LOCTEXT_NAMESPACE "MessageTagContainerGraphPin" 15 | 16 | void SMessageTagContainerGraphPin::Construct(const FArguments& InArgs, UEdGraphPin* InGraphPinObj) 17 | { 18 | SGraphPin::Construct(SGraphPin::FArguments(), InGraphPinObj); 19 | } 20 | 21 | void SMessageTagContainerGraphPin::ParseDefaultValueData() 22 | { 23 | // Read using import text, but with serialize flag set so it doesn't always throw away invalid ones 24 | MessageTagContainer.FromExportString(GraphPinObj->GetDefaultAsString(), PPF_SerializedAsImportText); 25 | } 26 | 27 | void SMessageTagContainerGraphPin::OnTagContainerChanged(const FMessageTagContainer& NewTagContainer) 28 | { 29 | MessageTagContainer = NewTagContainer; 30 | 31 | const FString TagContainerString = UE::MessageTags::EditorUtilities::MessageTagContainerExportText(MessageTagContainer); 32 | 33 | FString CurrentDefaultValue = GraphPinObj->GetDefaultAsString(); 34 | if (CurrentDefaultValue.IsEmpty()) 35 | { 36 | CurrentDefaultValue = UE::MessageTags::EditorUtilities::MessageTagContainerExportText(FMessageTagContainer()); 37 | } 38 | 39 | if (!CurrentDefaultValue.Equals(TagContainerString)) 40 | { 41 | const FScopedTransaction Transaction(LOCTEXT("ChangeDefaultValue", "Change Pin Default Value")); 42 | GraphPinObj->Modify(); 43 | GraphPinObj->GetSchema()->TrySetDefaultValue(*GraphPinObj, TagContainerString); 44 | } 45 | } 46 | 47 | TSharedRef SMessageTagContainerGraphPin::GetDefaultValueWidget() 48 | { 49 | if (GraphPinObj == nullptr) 50 | { 51 | return SNullWidget::NullWidget; 52 | } 53 | 54 | ParseDefaultValueData(); 55 | const FString FilterString = UE::MessageTags::EditorUtilities::ExtractTagFilterStringFromGraphPin(GraphPinObj); 56 | 57 | return SNew(SMessageTagContainerCombo) 58 | .Visibility(this, &SGraphPin::GetDefaultValueVisibility) 59 | .Filter(FilterString) 60 | .TagContainer(this, &SMessageTagContainerGraphPin::GetTagContainer) 61 | .OnTagContainerChanged(this, &SMessageTagContainerGraphPin::OnTagContainerChanged); 62 | } 63 | 64 | FMessageTagContainer SMessageTagContainerGraphPin::GetTagContainer() const 65 | { 66 | return MessageTagContainer; 67 | } 68 | 69 | #undef LOCTEXT_NAMESPACE 70 | #endif 71 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Private/SMessageTagContainerGraphPin.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | #include "Misc/EngineVersionComparison.h" 5 | #if UE_VERSION_NEWER_THAN(5, 0, 0) 6 | 7 | #include "KismetPins/SGraphPinStructInstance.h" 8 | #include "MessageTagContainer.h" 9 | 10 | /** Almost the same as a tag pin, but supports multiple tags */ 11 | class SMessageTagContainerGraphPin : public SGraphPinStructInstance 12 | { 13 | public: 14 | SLATE_BEGIN_ARGS(SMessageTagContainerGraphPin) {} 15 | SLATE_END_ARGS() 16 | 17 | void Construct(const FArguments& InArgs, UEdGraphPin* InGraphPinObj); 18 | 19 | protected: 20 | //~ Begin SMessageTagGraphPin Interface 21 | virtual void ParseDefaultValueData() override; 22 | virtual TSharedRef GetDefaultValueWidget() override; 23 | //~ End SGraphPin Interface 24 | 25 | FMessageTagContainer GetTagContainer() const; 26 | void OnTagContainerChanged(const FMessageTagContainer& NewTagContainer); 27 | 28 | FMessageTagContainer MessageTagContainer; 29 | }; 30 | #endif 31 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Public/AssetTypeActions_MessageTagAssetBase.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UnrealCompatibility.h" 7 | #include "AssetTypeActions_Base.h" 8 | 9 | struct FMessageTagContainer; 10 | 11 | /** Base asset type actions for any classes with message tagging */ 12 | class MESSAGETAGSEDITOR_API FAssetTypeActions_MessageTagAssetBase : public FAssetTypeActions_Base 13 | { 14 | public: 15 | 16 | /** Constructor */ 17 | FAssetTypeActions_MessageTagAssetBase(FName InTagPropertyName); 18 | 19 | /** Overridden to specify that the message tag base has actions */ 20 | virtual bool HasActions(const TArray& InObjects) const override; 21 | 22 | /** Overridden to offer the message tagging options */ 23 | #if UE_4_24_OR_LATER 24 | virtual void GetActions(const TArray& InObjects, struct FToolMenuSection& Section) override; 25 | #else 26 | virtual void GetActions(const TArray& InObjects, class FMenuBuilder& MenuBuilder) override; 27 | #endif 28 | /** Overridden to specify misc category */ 29 | virtual uint32 GetCategories() override; 30 | 31 | private: 32 | /** 33 | * Open the message tag editor 34 | * 35 | * @param TagAssets Assets to open the editor with 36 | */ 37 | void OpenMessageTagEditor(TArray Objects, TArray Containers) const; 38 | 39 | /** Name of the property of the owned message tag container */ 40 | FName OwnedMessageTagPropertyName; 41 | }; 42 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Public/MessageTagContainerCustomizationOptions.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "HAL/Platform.h" 6 | #include "Misc/CoreMiscDefines.h" 7 | 8 | struct UE_DEPRECATED(5.3, "Options are not used anymore to customize the property customization behavior.") MESSAGETAGSEDITOR_API FMessageTagContainerCustomizationOptions 9 | { 10 | // If true, any Message Tag Widget created should not offer an 'Add Tag' option 11 | bool bForceHideAddTag = false; 12 | 13 | // If true, any created Message Tag Widget created should not offer an 'Add Tag Source' option 14 | bool bForceHideAddTagSource = false; 15 | }; 16 | 17 | #if defined(UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2) && UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2 18 | #include "CoreTypes.h" 19 | #endif 20 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Public/MessageTagCustomizationOptions.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "HAL/Platform.h" 6 | #include "Misc/CoreMiscDefines.h" 7 | 8 | struct UE_DEPRECATED(5.3, "Options are not used anymore to customize the property customization behavior.") MESSAGETAGSEDITOR_API FMessageTagCustomizationOptions 9 | { 10 | // If true, any Message Tag Widget created should not offer an 'Add Tag' option 11 | bool bForceHideAddTag = false; 12 | 13 | // If true, any created Message Tag Widget created should not offer an 'Add Tag Source' option 14 | bool bForceHideAddTagSource = false; 15 | }; 16 | 17 | #if defined(UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2) && UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2 18 | #include "CoreTypes.h" 19 | #endif 20 | -------------------------------------------------------------------------------- /Plugins/GMP/Source/GMPEditor/MessageTagsEditor/Public/SMessageTagChip.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Input/Reply.h" 6 | #include "Widgets/SWidget.h" 7 | #include "Widgets/SCompoundWidget.h" 8 | #include "Widgets/DeclarativeSyntaxSupport.h" 9 | #include "MessageTagContainer.h" 10 | 11 | class SButton; 12 | 13 | /** 14 | * Widget for displaying a single Message tag with optional clear button. 15 | */ 16 | class SMessageTagChip : public SCompoundWidget 17 | { 18 | SLATE_DECLARE_WIDGET(SMessageTagChip, SCompoundWidget) 19 | 20 | public: 21 | 22 | DECLARE_DELEGATE_RetVal(FReply, FOnClearPressed); 23 | DECLARE_DELEGATE_RetVal(FReply, FOnEditPressed); 24 | DECLARE_DELEGATE_RetVal(FReply, FOnNavigate); 25 | DECLARE_DELEGATE_RetVal_OneParam(FReply, FOnMenu, const FPointerEvent& /*MouseEvent*/); 26 | 27 | SLATE_BEGIN_ARGS(SMessageTagChip) 28 | : _EnableNavigation(false) 29 | , _ReadOnly(false) 30 | , _IsSelected(true) 31 | , _ShowClearButton(true) 32 | {} 33 | // Callback for when button body is pressed 34 | SLATE_EVENT(FOnEditPressed, OnEditPressed) 35 | 36 | // Callback for when clear tag button is pressed 37 | SLATE_EVENT(FOnClearPressed, OnClearPressed) 38 | 39 | // Callback for when button body is pressed with LMB+Ctrl 40 | SLATE_EVENT(FOnNavigate, OnNavigate) 41 | 42 | // Callback for when button body is pressed with RMB 43 | SLATE_EVENT(FOnMenu, OnMenu) 44 | 45 | // If true, allow button navigation behavior 46 | SLATE_ARGUMENT(bool, EnableNavigation) 47 | 48 | // Flag to set if the list is read only 49 | SLATE_ARGUMENT( bool, ReadOnly ) 50 | 51 | // Is true, the chip is displayed as selected. 52 | SLATE_ATTRIBUTE(bool, IsSelected) 53 | 54 | // If true, shows clear button inside the chip 55 | SLATE_ATTRIBUTE(bool, ShowClearButton) 56 | 57 | // Tooltip to display 58 | SLATE_ATTRIBUTE(FText, ToolTipText) 59 | 60 | // Text to display 61 | SLATE_ATTRIBUTE(FText, Text) 62 | SLATE_END_ARGS(); 63 | 64 | MESSAGETAGSEDITOR_API SMessageTagChip(); 65 | 66 | MESSAGETAGSEDITOR_API void Construct(const FArguments& InArgs); 67 | 68 | private: 69 | 70 | void UpdatePillStyle(); 71 | #if UE_5_00_OR_LATER 72 | TSlateAttribute IsSelectedAttribute; 73 | TSlateAttribute ShowClearButtonAttribute; 74 | TSlateAttribute ToolTipTextAttribute; 75 | TSlateAttribute TextAttribute; 76 | #else 77 | TAttribute IsSelectedAttribute; 78 | TAttribute ShowClearButtonAttribute; 79 | TAttribute ToolTipTextAttribute; 80 | TAttribute TextAttribute; 81 | #endif 82 | TSharedPtr ChipButton; 83 | TSharedPtr ClearButton; 84 | FOnClearPressed OnClearPressed; 85 | FOnEditPressed OnEditPressed; 86 | FOnNavigate OnNavigate; 87 | FOnMenu OnMenu; 88 | bool bEnableNavigation = false; 89 | bool bReadOnly = false; 90 | bool bLastHasIsSelected = false; 91 | }; 92 | -------------------------------------------------------------------------------- /pics/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/1.png -------------------------------------------------------------------------------- /pics/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/10.jpg -------------------------------------------------------------------------------- /pics/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/11.png -------------------------------------------------------------------------------- /pics/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/12.png -------------------------------------------------------------------------------- /pics/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/13.png -------------------------------------------------------------------------------- /pics/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/14.jpg -------------------------------------------------------------------------------- /pics/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/2.jpg -------------------------------------------------------------------------------- /pics/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/3.png -------------------------------------------------------------------------------- /pics/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/4.png -------------------------------------------------------------------------------- /pics/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/5.jpg -------------------------------------------------------------------------------- /pics/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/6.jpg -------------------------------------------------------------------------------- /pics/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/7.jpg -------------------------------------------------------------------------------- /pics/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/8.jpg -------------------------------------------------------------------------------- /pics/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjieest/GenericMessagePlugin/58f49249b346daf88cf3a40b4b74fafc91d85af8/pics/9.jpg --------------------------------------------------------------------------------