| @@ -0,0 +1,499 @@ | |||
| ## Ignore Visual Studio temporary files, build results, and | |||
| ## files generated by popular Visual Studio add-ons. | |||
| ## | |||
| ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore | |||
| # User-specific files | |||
| *.rsuser | |||
| *.suo | |||
| *.user | |||
| *.userosscache | |||
| *.sln.docstates | |||
| # User-specific files (MonoDevelop/Xamarin Studio) | |||
| *.userprefs | |||
| # Mono auto generated files | |||
| mono_crash.* | |||
| # Build results | |||
| [Dd]ebug/ | |||
| [Dd]ebugPublic/ | |||
| [Rr]elease/ | |||
| [Rr]eleases/ | |||
| x64/ | |||
| x86/ | |||
| [Ww][Ii][Nn]32/ | |||
| [Aa][Rr][Mm]/ | |||
| [Aa][Rr][Mm]64/ | |||
| bld/ | |||
| [Bb]in/ | |||
| [Oo]bj/ | |||
| [Ll]og/ | |||
| [Ll]ogs/ | |||
| # Visual Studio 2015/2017 cache/options directory | |||
| .vs/ | |||
| # Uncomment if you have tasks that create the project's static files in wwwroot | |||
| #wwwroot/ | |||
| # Visual Studio 2017 auto generated files | |||
| Generated\ Files/ | |||
| # MSTest test Results | |||
| [Tt]est[Rr]esult*/ | |||
| [Bb]uild[Ll]og.* | |||
| # NUnit | |||
| *.VisualState.xml | |||
| TestResult.xml | |||
| nunit-*.xml | |||
| # Build Results of an ATL Project | |||
| [Dd]ebugPS/ | |||
| [Rr]eleasePS/ | |||
| dlldata.c | |||
| # Benchmark Results | |||
| BenchmarkDotNet.Artifacts/ | |||
| # .NET Core | |||
| project.lock.json | |||
| project.fragment.lock.json | |||
| artifacts/ | |||
| # ASP.NET Scaffolding | |||
| ScaffoldingReadMe.txt | |||
| # StyleCop | |||
| StyleCopReport.xml | |||
| # Files built by Visual Studio | |||
| *_i.c | |||
| *_p.c | |||
| *_h.h | |||
| *.ilk | |||
| *.meta | |||
| *.obj | |||
| *.iobj | |||
| *.pch | |||
| *.pdb | |||
| *.ipdb | |||
| *.pgc | |||
| *.pgd | |||
| *.rsp | |||
| *.sbr | |||
| *.tlb | |||
| *.tli | |||
| *.tlh | |||
| *.tmp | |||
| *.tmp_proj | |||
| *_wpftmp.csproj | |||
| *.log | |||
| *.tlog | |||
| *.vspscc | |||
| *.vssscc | |||
| .builds | |||
| *.pidb | |||
| *.svclog | |||
| *.scc | |||
| # Chutzpah Test files | |||
| _Chutzpah* | |||
| # Visual C++ cache files | |||
| ipch/ | |||
| *.aps | |||
| *.ncb | |||
| *.opendb | |||
| *.opensdf | |||
| *.sdf | |||
| *.cachefile | |||
| *.VC.db | |||
| *.VC.VC.opendb | |||
| # Visual Studio profiler | |||
| *.psess | |||
| *.vsp | |||
| *.vspx | |||
| *.sap | |||
| # Visual Studio Trace Files | |||
| *.e2e | |||
| # TFS 2012 Local Workspace | |||
| $tf/ | |||
| # Guidance Automation Toolkit | |||
| *.gpState | |||
| # ReSharper is a .NET coding add-in | |||
| _ReSharper*/ | |||
| *.[Rr]e[Ss]harper | |||
| *.DotSettings.user | |||
| # TeamCity is a build add-in | |||
| _TeamCity* | |||
| # DotCover is a Code Coverage Tool | |||
| *.dotCover | |||
| # AxoCover is a Code Coverage Tool | |||
| .axoCover/* | |||
| !.axoCover/settings.json | |||
| # Coverlet is a free, cross platform Code Coverage Tool | |||
| coverage*.json | |||
| coverage*.xml | |||
| coverage*.info | |||
| # Visual Studio code coverage results | |||
| *.coverage | |||
| *.coveragexml | |||
| # NCrunch | |||
| _NCrunch_* | |||
| .*crunch*.local.xml | |||
| nCrunchTemp_* | |||
| # MightyMoose | |||
| *.mm.* | |||
| AutoTest.Net/ | |||
| # Web workbench (sass) | |||
| .sass-cache/ | |||
| # Installshield output folder | |||
| [Ee]xpress/ | |||
| # DocProject is a documentation generator add-in | |||
| DocProject/buildhelp/ | |||
| DocProject/Help/*.HxT | |||
| DocProject/Help/*.HxC | |||
| DocProject/Help/*.hhc | |||
| DocProject/Help/*.hhk | |||
| DocProject/Help/*.hhp | |||
| DocProject/Help/Html2 | |||
| DocProject/Help/html | |||
| # Click-Once directory | |||
| publish/ | |||
| # Publish Web Output | |||
| *.[Pp]ublish.xml | |||
| *.azurePubxml | |||
| # Note: Comment the next line if you want to checkin your web deploy settings, | |||
| # but database connection strings (with potential passwords) will be unencrypted | |||
| *.pubxml | |||
| *.publishproj | |||
| # Microsoft Azure Web App publish settings. Comment the next line if you want to | |||
| # checkin your Azure Web App publish settings, but sensitive information contained | |||
| # in these scripts will be unencrypted | |||
| PublishScripts/ | |||
| # NuGet Packages | |||
| *.nupkg | |||
| # NuGet Symbol Packages | |||
| *.snupkg | |||
| # The packages folder can be ignored because of Package Restore | |||
| **/[Pp]ackages/* | |||
| # except build/, which is used as an MSBuild target. | |||
| !**/[Pp]ackages/build/ | |||
| # Uncomment if necessary however generally it will be regenerated when needed | |||
| #!**/[Pp]ackages/repositories.config | |||
| # NuGet v3's project.json files produces more ignorable files | |||
| *.nuget.props | |||
| *.nuget.targets | |||
| # Microsoft Azure Build Output | |||
| csx/ | |||
| *.build.csdef | |||
| # Microsoft Azure Emulator | |||
| ecf/ | |||
| rcf/ | |||
| # Windows Store app package directories and files | |||
| AppPackages/ | |||
| BundleArtifacts/ | |||
| Package.StoreAssociation.xml | |||
| _pkginfo.txt | |||
| *.appx | |||
| *.appxbundle | |||
| *.appxupload | |||
| # Visual Studio cache files | |||
| # files ending in .cache can be ignored | |||
| *.[Cc]ache | |||
| # but keep track of directories ending in .cache | |||
| !?*.[Cc]ache/ | |||
| # Others | |||
| ClientBin/ | |||
| ~$* | |||
| *~ | |||
| *.dbmdl | |||
| *.dbproj.schemaview | |||
| *.jfm | |||
| *.pfx | |||
| *.publishsettings | |||
| orleans.codegen.cs | |||
| # Including strong name files can present a security risk | |||
| # (https://github.com/github/gitignore/pull/2483#issue-259490424) | |||
| #*.snk | |||
| # Since there are multiple workflows, uncomment next line to ignore bower_components | |||
| # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) | |||
| #bower_components/ | |||
| # RIA/Silverlight projects | |||
| Generated_Code/ | |||
| # Backup & report files from converting an old project file | |||
| # to a newer Visual Studio version. Backup files are not needed, | |||
| # because we have git ;-) | |||
| _UpgradeReport_Files/ | |||
| Backup*/ | |||
| UpgradeLog*.XML | |||
| UpgradeLog*.htm | |||
| ServiceFabricBackup/ | |||
| *.rptproj.bak | |||
| # SQL Server files | |||
| *.mdf | |||
| *.ldf | |||
| *.ndf | |||
| # Business Intelligence projects | |||
| *.rdl.data | |||
| *.bim.layout | |||
| *.bim_*.settings | |||
| *.rptproj.rsuser | |||
| *- [Bb]ackup.rdl | |||
| *- [Bb]ackup ([0-9]).rdl | |||
| *- [Bb]ackup ([0-9][0-9]).rdl | |||
| # Microsoft Fakes | |||
| FakesAssemblies/ | |||
| # GhostDoc plugin setting file | |||
| *.GhostDoc.xml | |||
| # Node.js Tools for Visual Studio | |||
| .ntvs_analysis.dat | |||
| node_modules/ | |||
| # Visual Studio 6 build log | |||
| *.plg | |||
| # Visual Studio 6 workspace options file | |||
| *.opt | |||
| # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) | |||
| *.vbw | |||
| # Visual Studio 6 auto-generated project file (contains which files were open etc.) | |||
| *.vbp | |||
| # Visual Studio 6 workspace and project file (working project files containing files to include in project) | |||
| *.dsw | |||
| *.dsp | |||
| # Visual Studio 6 technical files | |||
| *.ncb | |||
| *.aps | |||
| # Visual Studio LightSwitch build output | |||
| **/*.HTMLClient/GeneratedArtifacts | |||
| **/*.DesktopClient/GeneratedArtifacts | |||
| **/*.DesktopClient/ModelManifest.xml | |||
| **/*.Server/GeneratedArtifacts | |||
| **/*.Server/ModelManifest.xml | |||
| _Pvt_Extensions | |||
| # Paket dependency manager | |||
| .paket/paket.exe | |||
| paket-files/ | |||
| # FAKE - F# Make | |||
| .fake/ | |||
| # CodeRush personal settings | |||
| .cr/personal | |||
| # Python Tools for Visual Studio (PTVS) | |||
| __pycache__/ | |||
| *.pyc | |||
| # Cake - Uncomment if you are using it | |||
| # tools/** | |||
| # !tools/packages.config | |||
| # Tabs Studio | |||
| *.tss | |||
| # Telerik's JustMock configuration file | |||
| *.jmconfig | |||
| # BizTalk build output | |||
| *.btp.cs | |||
| *.btm.cs | |||
| *.odx.cs | |||
| *.xsd.cs | |||
| # OpenCover UI analysis results | |||
| OpenCover/ | |||
| # Azure Stream Analytics local run output | |||
| ASALocalRun/ | |||
| # MSBuild Binary and Structured Log | |||
| *.binlog | |||
| # NVidia Nsight GPU debugger configuration file | |||
| *.nvuser | |||
| # MFractors (Xamarin productivity tool) working folder | |||
| .mfractor/ | |||
| # Local History for Visual Studio | |||
| .localhistory/ | |||
| # Visual Studio History (VSHistory) files | |||
| .vshistory/ | |||
| # BeatPulse healthcheck temp database | |||
| healthchecksdb | |||
| # Backup folder for Package Reference Convert tool in Visual Studio 2017 | |||
| MigrationBackup/ | |||
| # Ionide (cross platform F# VS Code tools) working folder | |||
| .ionide/ | |||
| # Fody - auto-generated XML schema | |||
| FodyWeavers.xsd | |||
| # VS Code files for those working on multiple tools | |||
| .vscode/* | |||
| !.vscode/settings.json | |||
| !.vscode/tasks.json | |||
| !.vscode/launch.json | |||
| !.vscode/extensions.json | |||
| *.code-workspace | |||
| # Local History for Visual Studio Code | |||
| .history/ | |||
| # Windows Installer files from build outputs | |||
| *.cab | |||
| *.msi | |||
| *.msix | |||
| *.msm | |||
| *.msp | |||
| # JetBrains Rider | |||
| *.sln.iml | |||
| #THUAI playback file | |||
| *.thuaipb | |||
| # Prerequisites | |||
| *.d | |||
| # Compiled Object files | |||
| *.slo | |||
| *.lo | |||
| *.o | |||
| *.obj | |||
| # Precompiled Headers | |||
| *.gch | |||
| *.pch | |||
| # Compiled Dynamic libraries | |||
| *.so | |||
| *.dylib | |||
| *.dll | |||
| # Fortran module files | |||
| *.mod | |||
| *.smod | |||
| # Compiled Static libraries | |||
| *.lai | |||
| *.la | |||
| *.a | |||
| *.lib | |||
| # Executables | |||
| *.exe | |||
| *.out | |||
| *.app | |||
| # Prerequisites | |||
| *.d | |||
| # Object files | |||
| *.o | |||
| *.ko | |||
| *.obj | |||
| *.elf | |||
| # Linker output | |||
| *.ilk | |||
| *.map | |||
| *.exp | |||
| # Precompiled Headers | |||
| *.gch | |||
| *.pch | |||
| # Libraries | |||
| *.lib | |||
| *.a | |||
| *.la | |||
| *.lo | |||
| # Shared objects (inc. Windows DLLs) | |||
| *.dll | |||
| *.so | |||
| *.so.* | |||
| *.dylib | |||
| # Executables | |||
| *.exe | |||
| *.out | |||
| *.app | |||
| *.i*86 | |||
| *.x86_64 | |||
| *.hex | |||
| # Debug files | |||
| *.dSYM/ | |||
| *.su | |||
| *.idb | |||
| *.pdb | |||
| # Kernel Module Compile Results | |||
| *.mod* | |||
| *.cmd | |||
| .tmp_versions/ | |||
| modules.order | |||
| Module.symvers | |||
| Mkfile.old | |||
| dkms.conf | |||
| CMakeLists.txt.user | |||
| CMakeCache.txt | |||
| CMakeFiles | |||
| CMakeScripts | |||
| Testing | |||
| Makefile | |||
| cmake_install.cmake | |||
| install_manifest.txt | |||
| compile_commands.json | |||
| CTestTestfile.cmake | |||
| _deps | |||
| @@ -0,0 +1,154 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <ItemGroup Label="ProjectConfigurations"> | |||
| <ProjectConfiguration Include="Debug|Win32"> | |||
| <Configuration>Debug</Configuration> | |||
| <Platform>Win32</Platform> | |||
| </ProjectConfiguration> | |||
| <ProjectConfiguration Include="Release|Win32"> | |||
| <Configuration>Release</Configuration> | |||
| <Platform>Win32</Platform> | |||
| </ProjectConfiguration> | |||
| <ProjectConfiguration Include="Debug|x64"> | |||
| <Configuration>Debug</Configuration> | |||
| <Platform>x64</Platform> | |||
| </ProjectConfiguration> | |||
| <ProjectConfiguration Include="Release|x64"> | |||
| <Configuration>Release</Configuration> | |||
| <Platform>x64</Platform> | |||
| </ProjectConfiguration> | |||
| </ItemGroup> | |||
| <PropertyGroup Label="Globals"> | |||
| <VCProjectVersion>16.0</VCProjectVersion> | |||
| <Keyword>Win32Proj</Keyword> | |||
| <ProjectGuid>{b9ac3133-177d-453c-8066-ed4702d3f36a}</ProjectGuid> | |||
| <RootNamespace>API</RootNamespace> | |||
| <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> | |||
| </PropertyGroup> | |||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | |||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | |||
| <ConfigurationType>Application</ConfigurationType> | |||
| <UseDebugLibraries>true</UseDebugLibraries> | |||
| <PlatformToolset>v143</PlatformToolset> | |||
| <CharacterSet>Unicode</CharacterSet> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | |||
| <ConfigurationType>Application</ConfigurationType> | |||
| <UseDebugLibraries>false</UseDebugLibraries> | |||
| <PlatformToolset>v143</PlatformToolset> | |||
| <WholeProgramOptimization>true</WholeProgramOptimization> | |||
| <CharacterSet>Unicode</CharacterSet> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | |||
| <ConfigurationType>Application</ConfigurationType> | |||
| <UseDebugLibraries>true</UseDebugLibraries> | |||
| <PlatformToolset>v143</PlatformToolset> | |||
| <CharacterSet>Unicode</CharacterSet> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | |||
| <ConfigurationType>Application</ConfigurationType> | |||
| <UseDebugLibraries>false</UseDebugLibraries> | |||
| <PlatformToolset>v143</PlatformToolset> | |||
| <WholeProgramOptimization>true</WholeProgramOptimization> | |||
| <CharacterSet>Unicode</CharacterSet> | |||
| </PropertyGroup> | |||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | |||
| <ImportGroup Label="ExtensionSettings"> | |||
| </ImportGroup> | |||
| <ImportGroup Label="Shared"> | |||
| </ImportGroup> | |||
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | |||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |||
| </ImportGroup> | |||
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | |||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |||
| </ImportGroup> | |||
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | |||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |||
| </ImportGroup> | |||
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | |||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | |||
| </ImportGroup> | |||
| <PropertyGroup Label="UserMacros" /> | |||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | |||
| <LinkIncremental>true</LinkIncremental> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | |||
| <LinkIncremental>false</LinkIncremental> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | |||
| <LinkIncremental>true</LinkIncremental> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | |||
| <LinkIncremental>false</LinkIncremental> | |||
| </PropertyGroup> | |||
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | |||
| <ClCompile> | |||
| <WarningLevel>Level3</WarningLevel> | |||
| <SDLCheck>true</SDLCheck> | |||
| <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||
| <ConformanceMode>true</ConformanceMode> | |||
| <LanguageStandard>stdcpp17</LanguageStandard> | |||
| <LanguageStandard_C>stdc17</LanguageStandard_C> | |||
| </ClCompile> | |||
| <Link> | |||
| <SubSystem>Console</SubSystem> | |||
| <GenerateDebugInformation>true</GenerateDebugInformation> | |||
| </Link> | |||
| </ItemDefinitionGroup> | |||
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | |||
| <ClCompile> | |||
| <WarningLevel>Level3</WarningLevel> | |||
| <FunctionLevelLinking>true</FunctionLevelLinking> | |||
| <IntrinsicFunctions>true</IntrinsicFunctions> | |||
| <SDLCheck>true</SDLCheck> | |||
| <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||
| <ConformanceMode>true</ConformanceMode> | |||
| <LanguageStandard>stdcpp17</LanguageStandard> | |||
| <LanguageStandard_C>stdc17</LanguageStandard_C> | |||
| </ClCompile> | |||
| <Link> | |||
| <SubSystem>Console</SubSystem> | |||
| <EnableCOMDATFolding>true</EnableCOMDATFolding> | |||
| <OptimizeReferences>true</OptimizeReferences> | |||
| <GenerateDebugInformation>true</GenerateDebugInformation> | |||
| </Link> | |||
| </ItemDefinitionGroup> | |||
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | |||
| <ClCompile> | |||
| <WarningLevel>Level3</WarningLevel> | |||
| <SDLCheck>true</SDLCheck> | |||
| <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||
| <ConformanceMode>true</ConformanceMode> | |||
| <LanguageStandard>stdcpp17</LanguageStandard> | |||
| <LanguageStandard_C>stdc17</LanguageStandard_C> | |||
| </ClCompile> | |||
| <Link> | |||
| <SubSystem>Console</SubSystem> | |||
| <GenerateDebugInformation>true</GenerateDebugInformation> | |||
| </Link> | |||
| </ItemDefinitionGroup> | |||
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | |||
| <ClCompile> | |||
| <WarningLevel>Level3</WarningLevel> | |||
| <FunctionLevelLinking>true</FunctionLevelLinking> | |||
| <IntrinsicFunctions>true</IntrinsicFunctions> | |||
| <SDLCheck>true</SDLCheck> | |||
| <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | |||
| <ConformanceMode>true</ConformanceMode> | |||
| <LanguageStandard>stdcpp17</LanguageStandard> | |||
| <LanguageStandard_C>stdc17</LanguageStandard_C> | |||
| </ClCompile> | |||
| <Link> | |||
| <SubSystem>Console</SubSystem> | |||
| <EnableCOMDATFolding>true</EnableCOMDATFolding> | |||
| <OptimizeReferences>true</OptimizeReferences> | |||
| <GenerateDebugInformation>true</GenerateDebugInformation> | |||
| </Link> | |||
| </ItemDefinitionGroup> | |||
| <ItemGroup> | |||
| </ItemGroup> | |||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | |||
| <ImportGroup Label="ExtensionTargets"> | |||
| </ImportGroup> | |||
| </Project> | |||
| @@ -0,0 +1,17 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <ItemGroup> | |||
| <Filter Include="源文件"> | |||
| <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> | |||
| <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions> | |||
| </Filter> | |||
| <Filter Include="头文件"> | |||
| <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> | |||
| <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions> | |||
| </Filter> | |||
| <Filter Include="资源文件"> | |||
| <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> | |||
| <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> | |||
| </Filter> | |||
| </ItemGroup> | |||
| </Project> | |||
| @@ -0,0 +1,27 @@ | |||
| #pragma once | |||
| #ifndef AI_H | |||
| #define AI_H | |||
| #include "API.h" | |||
| // 暂定版本:Human和Butcher全部继承AI类, | |||
| class IAI | |||
| { | |||
| public: | |||
| IAI() | |||
| { | |||
| } | |||
| virtual void play(IAPI& api) = 0; | |||
| }; | |||
| class AI : public IAI | |||
| { | |||
| public: | |||
| AI() : | |||
| IAI() | |||
| { | |||
| } | |||
| void play(IAPI& api) override; | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,247 @@ | |||
| #pragma once | |||
| #ifndef API_H | |||
| #define API_H | |||
| #ifdef _MSC_VER | |||
| #pragma warning(disable : 4996) | |||
| #endif | |||
| #include <Message2Server.pb.h> | |||
| #include <Message2Clients.pb.h> | |||
| #include <MessageType.pb.h> | |||
| #include <Message2Server.grpc.pb.h> | |||
| #include <Message2Clients.grpc.pb.h> | |||
| #include <MessageType.grpc.pb.h> | |||
| #include <future> | |||
| #include <iostream> | |||
| #include <vector> | |||
| #include "structures.h" | |||
| const constexpr int num_of_grid_per_cell = 1000; | |||
| class ILogic | |||
| { | |||
| // API中依赖Logic的部分 | |||
| public: | |||
| // 获取服务器发来的所有消息,要注意线程安全问题 | |||
| virtual protobuf::MessageToClient GetFullMessage() = 0; | |||
| // 供IAPI使用的操作相关的部分 | |||
| virtual bool Move(protobuf::MoveMsg) = 0; | |||
| virtual bool PickProp(protobuf::PickMsg) = 0; | |||
| virtual bool UseProp(protobuf::IDMsg) = 0; | |||
| virtual bool UseSkill(protobuf::IDMsg) = 0; | |||
| virtual void SendMessage(protobuf::SendMsg) = 0; | |||
| virtual bool HaveMessage(protobuf::IDMsg) = 0; | |||
| virtual protobuf::MsgRes GetMessage(protobuf::IDMsg) = 0; | |||
| virtual bool Escape(protobuf::IDMsg) = 0; | |||
| // 说明:双向stream由三个函数共同实现,两个记录开始和结束,结果由Logic里的私有的成员变量记录,获得返回值则另调函数 | |||
| virtual bool StartFixMachine(protobuf::IDMsg) = 0; | |||
| virtual bool EndFixMachine(protobuf::IDMsg) = 0; | |||
| virtual bool GetFixStatus() = 0; | |||
| virtual bool StartSaveHuman(protobuf::IDMsg) = 0; | |||
| virtual bool EndSaveHuman(protobuf::IDMsg) = 0; | |||
| virtual bool GetSaveStatus() = 0; | |||
| virtual bool Attack(protobuf::AttackMsg) = 0; | |||
| virtual bool CarryHuman(protobuf::IDMsg) = 0; | |||
| virtual bool ReleaseHuman(protobuf::IDMsg) = 0; | |||
| virtual bool HangHuman(protobuf::IDMsg) = 0; | |||
| virtual bool WaitThread() = 0; | |||
| virtual int GetCounter() = 0; | |||
| }; | |||
| class IAPI | |||
| { | |||
| public: | |||
| // 选手可执行的操作,应当保证所有函数的返回值都应当为std::future,例如下面的移动函数: | |||
| // 指挥本角色进行移动,`timeInMilliseconds` 为移动时间,单位为毫秒;`angleInRadian` 表示移动的方向,单位是弧度,使用极坐标——竖直向下方向为 x 轴,水平向右方向为 y 轴 | |||
| virtual std::future<bool> Move(uint32_t timeInMilliseconds, double angleInRadian) = 0; | |||
| // 向特定方向移动 | |||
| virtual std::future<bool> MoveRight(uint32_t timeInMilliseconds) = 0; | |||
| virtual std::future<bool> MoveUp(uint32_t timeInMilliseconds) = 0; | |||
| virtual std::future<bool> MoveLeft(uint32_t timeInMilliseconds) = 0; | |||
| virtual std::future<bool> MoveDown(uint32_t timeInMilliseconds) = 0; | |||
| // 捡道具、使用技能 | |||
| virtual std::future<bool> PickProp() = 0; | |||
| virtual std::future<bool> UseProp() = 0; | |||
| virtual std::future<bool> UseSkill() = 0; | |||
| // 发送信息、接受信息 | |||
| virtual std::future<bool> SendMessage(int, std::string) = 0; | |||
| [[nodiscard]] virtual std::future<bool> HaveMessage() = 0; | |||
| [[nodiscard]] virtual std::future<std::pair<int, std::string>> GetMessage() = 0; | |||
| // 等待下一帧 | |||
| virtual std::future<bool> Wait() = 0; | |||
| // 获取视野内可见的人类/屠夫的信息 | |||
| [[nodiscard]] virtual std::vector<std::shared_ptr<const THUAI6::Human>> GetHuman() const = 0; | |||
| [[nodiscard]] virtual std::vector<std::shared_ptr<const THUAI6::Buthcer>> GetButcher() const = 0; | |||
| // 获取视野内可见的道具信息 | |||
| [[nodiscard]] virtual std::vector<std::shared_ptr<const THUAI6::Prop>> GetProps() const = 0; | |||
| // 获取地图信息,视野外的地图统一为Land | |||
| [[nodiscard]] virtual std::array<std::array<THUAI6::PlaceType, 50>, 50> GetFullMap() const = 0; | |||
| [[nodiscard]] virtual THUAI6::PlaceType GetPlaceType(int32_t CellX, int32_t CellY) const = 0; | |||
| // 获取所有玩家的GUID | |||
| [[nodiscard]] virtual const std::vector<int64_t> GetPlayerGUIDs() const = 0; | |||
| // 获取游戏目前所进行的帧数 | |||
| [[nodiscard]] virtual int GetFrameCount() const = 0; | |||
| /*****人类阵营的特定函数*****/ | |||
| virtual std::future<bool> StartFixMachine() = 0; | |||
| virtual std::future<bool> EndFixMachine() = 0; | |||
| virtual std::future<bool> GetFixStatus() = 0; | |||
| virtual std::future<bool> StartSaveHuman() = 0; | |||
| virtual std::future<bool> EndSaveHuman() = 0; | |||
| virtual std::future<bool> GetSaveStatus() = 0; | |||
| virtual std::future<bool> Escape() = 0; | |||
| [[nodiscard]] virtual std::shared_ptr<const THUAI6::Human> HumanGetSelfInfo() const = 0; | |||
| /*****屠夫阵营的特定函数*****/ | |||
| virtual std::future<bool> Attack(double angleInRadian) = 0; | |||
| virtual std::future<bool> CarryHuman() = 0; | |||
| virtual std::future<bool> ReleaseHuman() = 0; | |||
| virtual std::future<bool> HangHuman() = 0; | |||
| [[nodiscard]] virtual std::shared_ptr<const THUAI6::Buthcer> ButcherGetSelfInfo() const = 0; | |||
| /*****选手可能用的辅助函数*****/ | |||
| // 获取指定格子中心的坐标 | |||
| [[nodiscard]] static inline int CellToGrid(int cell) noexcept | |||
| { | |||
| return cell * num_of_grid_per_cell + num_of_grid_per_cell / 2; | |||
| } | |||
| // 获取指定坐标点所位于的格子的 X 序号 | |||
| [[nodiscard]] static inline int GridToCell(int grid) noexcept | |||
| { | |||
| return grid / num_of_grid_per_cell; | |||
| } | |||
| IAPI(ILogic& logic) : | |||
| logic(logic) | |||
| { | |||
| } | |||
| virtual ~IAPI() | |||
| { | |||
| } | |||
| protected: | |||
| ILogic& logic; | |||
| }; | |||
| // 给Logic使用的IAPI接口,为了保证面向对象的设计模式 | |||
| class IAPIForLogic : public IAPI | |||
| { | |||
| public: | |||
| IAPIForLogic(ILogic& logic) : | |||
| IAPI(logic) | |||
| { | |||
| } | |||
| virtual void StartTimer() = 0; | |||
| virtual void EndTimer() = 0; | |||
| }; | |||
| class HumanAPI : public IAPIForLogic | |||
| { | |||
| public: | |||
| HumanAPI(ILogic& logic) : | |||
| IAPIForLogic(logic) | |||
| { | |||
| } | |||
| }; | |||
| class ButcherAPI : public IAPIForLogic | |||
| { | |||
| public: | |||
| ButcherAPI(ILogic& logic) : | |||
| IAPIForLogic(logic) | |||
| { | |||
| } | |||
| }; | |||
| // class IHumanAPI : public IAPIForLogic | |||
| // { | |||
| // public: | |||
| // IHumanAPI(ILogic& logic) : | |||
| // IAPIForLogic(logic) | |||
| // { | |||
| // } | |||
| // virtual std::future<bool> StartFixMachine() = 0; | |||
| // virtual std::future<bool> EndFixMachine() = 0; | |||
| // virtual std::future<bool> GetFixStatus() = 0; | |||
| // virtual std::future<bool> StartSaveHuman() = 0; | |||
| // virtual std::future<bool> EndSaveHuman() = 0; | |||
| // virtual std::future<bool> GetSaveStatus() = 0; | |||
| // virtual std::future<bool> Escape() = 0; | |||
| // [[nodiscard]] virtual std::shared_ptr<const THUAI6::Human> GetSelfInfo() const = 0; | |||
| // }; | |||
| // class IButcherAPI : public IAPIForLogic | |||
| // { | |||
| // public: | |||
| // IButcherAPI(Logic& logic) : | |||
| // IAPIForLogic(logic) | |||
| // { | |||
| // } | |||
| // virtual std::future<bool> Attack(double angleInRadian) = 0; | |||
| // virtual std::future<bool> CarryHuman() = 0; | |||
| // virtual std::future<bool> ReleaseHuman() = 0; | |||
| // virtual std::future<bool> HangHuman() = 0; | |||
| // [[nodiscard]] virtual std::shared_ptr<const THUAI6::Buthcer> GetSelfInfo() const = 0; | |||
| // }; | |||
| // class HumanAPI : public IHumanAPI | |||
| // { | |||
| // public: | |||
| // HumanAPI(Logic& logic) : | |||
| // IHumanAPI(logic) | |||
| // { | |||
| // } | |||
| // }; | |||
| // class DebugHumanAPI : public IHumanAPI | |||
| // { | |||
| // public: | |||
| // DebugHumanAPI(Logic& logic) : | |||
| // IHumanAPI(logic) | |||
| // { | |||
| // } | |||
| // }; | |||
| // class ButhcerAPI : public IButcherAPI | |||
| // { | |||
| // public: | |||
| // ButhcerAPI(Logic& logic) : | |||
| // IButcherAPI(logic) | |||
| // { | |||
| // } | |||
| // }; | |||
| // class DebugButcherAPI : public IButcherAPI | |||
| // { | |||
| // public: | |||
| // DebugButcherAPI(Logic& logic) : | |||
| // IButcherAPI(logic) | |||
| // { | |||
| // } | |||
| // }; | |||
| #endif | |||
| @@ -0,0 +1,8 @@ | |||
| #pragma once | |||
| #ifndef CONSTANTS_H | |||
| #define CONSTANTS_H | |||
| namespace Constants | |||
| { | |||
| } | |||
| #endif | |||
| @@ -0,0 +1,112 @@ | |||
| #pragma once | |||
| #ifndef LOGIC_H | |||
| #define LOGIC_H | |||
| #ifdef _MSC_VER | |||
| #pragma warning(disable : 4996) | |||
| #endif | |||
| #include <iostream> | |||
| #include <vector> | |||
| #include <thread> | |||
| #include <mutex> | |||
| #include <condition_variable> | |||
| #include <atomic> | |||
| #include <Message2Server.pb.h> | |||
| #include <Message2Clients.pb.h> | |||
| #include <MessageType.pb.h> | |||
| #include <Message2Server.grpc.pb.h> | |||
| #include <Message2Clients.grpc.pb.h> | |||
| #include <MessageType.grpc.pb.h> | |||
| #include "API.h" | |||
| #include "AI.h" | |||
| // 封装了通信组件和对AI对象进行操作 | |||
| class Logic : public ILogic | |||
| { | |||
| private: | |||
| // gRPC客户端的stub,所有与服务端之间的通信操作都需要基于stub完成。 | |||
| std::unique_ptr<Protobuf::AvailableService::Stub> THUAI6Stub; | |||
| // ID、阵营记录 | |||
| int playerID; | |||
| THUAI6::PlayerType playerType; | |||
| // 类型记录 | |||
| THUAI6::HumanType humanType; | |||
| THUAI6::ButcherType butcherType; | |||
| // GUID信息 | |||
| std::vector<int64_t> playerGUIDs; | |||
| // THUAI5中的通信组件可以完全被我们的stub取代,故无须再写 | |||
| std::unique_ptr<IAI> pAI; | |||
| std::shared_ptr<IAPIForLogic> pAPI; | |||
| std::thread tAI; | |||
| mutable std::mutex mtxAI; | |||
| mutable std::mutex mtxState; | |||
| mutable std::mutex mtxBuffer; | |||
| std::condition_variable cvBuffer; | |||
| std::condition_variable cvAI; | |||
| // 信息队列目前可能会不用?具体待定 | |||
| // 存储状态,分别是现在的状态和缓冲区的状态。 | |||
| State state[2]; | |||
| State* currentState; | |||
| State* bufferState; | |||
| // 是否应该执行player() | |||
| std::atomic_bool AILoop = true; | |||
| // buffer是否更新完毕 | |||
| bool bufferUpdated = true; | |||
| // 是否可以启用当前状态 | |||
| bool currentStateAccessed = false; | |||
| // 是否应当启动AI | |||
| bool AIStart = false; | |||
| // 控制内容更新的变量 | |||
| std::atomic_bool freshed = false; | |||
| // 所有API中声明的函数都需要在此处重写,先暂时略过,等到之后具体实现时再考虑 | |||
| // 执行AI线程 | |||
| void PlayerWrapper(std::function<void()> player); | |||
| // THUAI5中的一系列用于处理信息的函数可能也不会再用 | |||
| // 将信息加载到buffer | |||
| void LoadBuffer(std::shared_ptr<Protobuf::MessageToClient>); | |||
| // 解锁状态更新线程 | |||
| void UnBlockBuffer(); | |||
| // 解锁AI线程 | |||
| void UnBlockAI(); | |||
| // 更新状态 | |||
| void Update() noexcept; | |||
| // 等待 | |||
| void Wait() noexcept; | |||
| public: | |||
| // 构造函数还需要传更多参数,有待补充 | |||
| Logic(std::shared_ptr<grpc::Channel> channel); | |||
| ~Logic() = default; | |||
| // Main函数同上 | |||
| void Main(); | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,27 @@ | |||
| #pragma once | |||
| #ifndef STATE_H | |||
| #define STATE_H | |||
| #include <vector> | |||
| #include "structures.h" | |||
| // 存储场上的状态 | |||
| struct State | |||
| { | |||
| uint32_t teamScore; | |||
| // 自身信息,根据playerType的不同,可以调用的值也不同。 | |||
| std::shared_ptr<THUAI6::Human> humanSelf; | |||
| std::shared_ptr<THUAI6::Butcher> butcherSelf; | |||
| std::vector<std::shared_ptr<THUAI6::Human>> humans; | |||
| std::vector<std::shared_ptr<THUAI6::Butcher>> butchers; | |||
| std::vector<std::shared_ptr<THUAI6::Prop>> props; | |||
| THUAI6::PlaceType gamemap[51][51]; | |||
| std::vector<int64_t> guids; | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,151 @@ | |||
| #pragma once | |||
| #ifndef STRUCTURES_H | |||
| #define STRUCTURES_H | |||
| #include <cstdint> | |||
| #include <array> | |||
| #include <map> | |||
| namespace THUAI6 | |||
| { | |||
| // 所有NullXXXType均为错误类型,其余为可能出现的正常类型 | |||
| // 位置标志 | |||
| enum class PlaceType : unsigned char | |||
| { | |||
| NullPlaceType = 0, | |||
| Land = 1, | |||
| Wall = 2, | |||
| Grass = 3, | |||
| Machine = 4, | |||
| Gate = 5, | |||
| HiddenGate = 6, | |||
| }; | |||
| // 形状标志 | |||
| enum class ShapeType : unsigned char | |||
| { | |||
| NullShapeType = 0, | |||
| Circle = 1, | |||
| Square = 2, | |||
| }; | |||
| // 道具类型 | |||
| enum class PropType : unsigned char | |||
| { | |||
| NullPropType = 0, | |||
| PropType1 = 1, | |||
| PropType2 = 2, | |||
| PropType3 = 3, | |||
| PropType4 = 4, | |||
| }; | |||
| // 玩家类型 | |||
| enum class PlayerType : unsigned char | |||
| { | |||
| NullPlayerType = 0, | |||
| HumanPlayer = 1, | |||
| ButcherType = 2, | |||
| }; | |||
| // 人类类型 | |||
| enum class HumanType : unsigned char | |||
| { | |||
| NullHumanType = 0, | |||
| HumanType1 = 1, | |||
| HumanType2 = 2, | |||
| HumanType3 = 3, | |||
| HumanType4 = 4, | |||
| }; | |||
| // 屠夫类型 | |||
| enum class ButcherType : unsigned char | |||
| { | |||
| NullButcherType = 0, | |||
| ButcherType1 = 1, | |||
| ButcherType2 = 2, | |||
| ButcherType3 = 3, | |||
| ButcherType4 = 4, | |||
| }; | |||
| // 人类Buff类型 | |||
| enum class HumanBuffType : unsigned char | |||
| { | |||
| NullHumanBuffType = 0, | |||
| HumanBuffType1 = 1, | |||
| HumanBuffType2 = 2, | |||
| HumanBuffType3 = 3, | |||
| HumanBuffType4 = 4, | |||
| }; | |||
| // 玩家类 | |||
| struct Player | |||
| { | |||
| int32_t x; // x坐标 | |||
| int32_t y; // y坐标 | |||
| uint32_t speed; // 移动速度 | |||
| uint32_t viewRange; // 视野范围 | |||
| uint64_t playerID; // 玩家ID | |||
| uint64_t guid; // 全局唯一ID | |||
| uint16_t radius; // 圆形物体的半径或正方形物体的内切圆半径 | |||
| double timeUntilSkillAvailable; // 技能冷却时间 | |||
| PlayerType playerType; // 玩家类型 | |||
| PropType prop; // 手上的道具类型 | |||
| PlaceType place; // 所处格子的类型 | |||
| }; | |||
| struct Human : public Player | |||
| { | |||
| bool onChair; // 是否被挂 | |||
| bool onGround; // 是否倒地 | |||
| uint32_t life; // 剩余生命(本次倒地之前还能承受的伤害) | |||
| uint32_t hangedTime; // 被挂的次数 | |||
| HumanType humanType; // 人类类型 | |||
| std::vector<HumanBuffType> buff; // buff | |||
| }; | |||
| struct Butcher : public Player | |||
| { | |||
| uint32_t damage; // 攻击伤害 | |||
| bool movable; // 是否处在攻击后摇中 | |||
| ButcherType butcherType; // 屠夫类型 | |||
| std::vector<ButcherBuffType> buff; // buff | |||
| }; | |||
| struct Prop | |||
| { | |||
| int32_t x; | |||
| int32_t y; | |||
| uint32_t size; | |||
| uint64_t guid; | |||
| PropType type; | |||
| PlaceType place; | |||
| double facingDirection; // 朝向 | |||
| bool isMoving; | |||
| }; | |||
| // 仅供DEBUG使用,名称可改动 | |||
| // 还没写完,后面待续 | |||
| inline std::map<PlaceType, std::string> placeDict{ | |||
| {PlaceType::NullPlaceType, "NullPlaceType"}, | |||
| {PlaceType::Land, "Land"}, | |||
| {PlaceType::Wall, "Wall"}, | |||
| {PlaceType::Grass, "Grass"}, | |||
| {PlaceType::Machine, "Machine"}, | |||
| {PlaceType::Gate, "Gate"}, | |||
| {PlaceType::HiddenGate, "HiddenGate"}, | |||
| }; | |||
| inline std::map<PropType, std::string> propDict{ | |||
| {PropType::NullPropType, "NullPropType"}, | |||
| }; | |||
| } // namespace THUAI6 | |||
| #endif | |||
| @@ -0,0 +1,15 @@ | |||
| #include <vector> | |||
| #include <thread> | |||
| #include "AI.h" | |||
| // 选手必须定义该变量来选择自己的阵营 | |||
| const THUAI6::PlayerType playerType = THUAI6::PlayerType::HumanPlayer; | |||
| // 选手只需要定义两者中自己选中的那个即可,定义两个也不会有影响。 | |||
| const THUAI6::ButcherType butcherType = THUAI6::ButcherType::ButcherType1; | |||
| const THUAI6::HumanType humanType = THUAI6::HumanType::HumanType1; | |||
| void AI::play(IAPI& api) | |||
| { | |||
| } | |||
| @@ -0,0 +1,7 @@ | |||
| #pragma once | |||
| #include "logic.h" | |||
| Logic::Logic(std::shared_ptr<grpc::Channel> channel) : | |||
| THUAI6Stub(Protobuf::AvailableService::NewStub(channel)) | |||
| { | |||
| } | |||
| @@ -0,0 +1,31 @@ | |||
| | |||
| Microsoft Visual Studio Solution File, Format Version 12.00 | |||
| # Visual Studio Version 17 | |||
| VisualStudioVersion = 17.0.32014.148 | |||
| MinimumVisualStudioVersion = 10.0.40219.1 | |||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "API", "API\API.vcxproj", "{B9AC3133-177D-453C-8066-ED4702D3F36A}" | |||
| EndProject | |||
| Global | |||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
| Debug|x64 = Debug|x64 | |||
| Debug|x86 = Debug|x86 | |||
| Release|x64 = Release|x64 | |||
| Release|x86 = Release|x86 | |||
| EndGlobalSection | |||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
| {B9AC3133-177D-453C-8066-ED4702D3F36A}.Debug|x64.ActiveCfg = Debug|x64 | |||
| {B9AC3133-177D-453C-8066-ED4702D3F36A}.Debug|x64.Build.0 = Debug|x64 | |||
| {B9AC3133-177D-453C-8066-ED4702D3F36A}.Debug|x86.ActiveCfg = Debug|Win32 | |||
| {B9AC3133-177D-453C-8066-ED4702D3F36A}.Debug|x86.Build.0 = Debug|Win32 | |||
| {B9AC3133-177D-453C-8066-ED4702D3F36A}.Release|x64.ActiveCfg = Release|x64 | |||
| {B9AC3133-177D-453C-8066-ED4702D3F36A}.Release|x64.Build.0 = Release|x64 | |||
| {B9AC3133-177D-453C-8066-ED4702D3F36A}.Release|x86.ActiveCfg = Release|Win32 | |||
| {B9AC3133-177D-453C-8066-ED4702D3F36A}.Release|x86.Build.0 = Release|Win32 | |||
| EndGlobalSection | |||
| GlobalSection(SolutionProperties) = preSolution | |||
| HideSolutionNode = FALSE | |||
| EndGlobalSection | |||
| GlobalSection(ExtensibilityGlobals) = postSolution | |||
| SolutionGuid = {372B1478-522C-4EEB-A527-983D310A3F50} | |||
| EndGlobalSection | |||
| EndGlobal | |||
| @@ -0,0 +1,28 @@ | |||
| # 临时CMakeLists,仅供本地调试用 | |||
| cmake_minimum_required(VERSION 3.5) | |||
| project(THUAI6_CAPI VERSION 1.0) | |||
| set(CMAKE_CXX_STANDARD 17) | |||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -pthread") | |||
| aux_source_directory(./API/src CPP_LIST) | |||
| aux_source_directory(./proto PROTO_CPP_LIST) | |||
| find_package(Protobuf CONFIG REQUIRED) | |||
| find_package(gRPC CONFIG REQUIRED) | |||
| message(STATUS "Using protobuf ${Protobuf_VERSION}") | |||
| message(STATUS "Using gRPC ${gRPC_VERSION}") | |||
| add_executable(capi ${CPP_LIST} ${PROTO_CPP_LIST}) | |||
| target_include_directories(capi PUBLIC ${PROJECT_SOURCE_DIR}/proto ${PROJECT_SOURCE_DIR}/API/include) | |||
| target_link_libraries(capi | |||
| protobuf::libprotobuf | |||
| gRPC::grpc | |||
| gRPC::grpc++_reflection | |||
| gRPC::grpc++ | |||
| ) | |||
| @@ -0,0 +1,50 @@ | |||
| # CAPI | |||
| ## 简介 | |||
| C++ 通信组件与选手接口 | |||
| ## 目标 | |||
| ### 基本目标 | |||
| - 基于 Protobuf 与 gRPC,为客户端提供 C++ 通信组件 | |||
| - 为选手提供游戏接口 | |||
| ### 重要目标 | |||
| - 理解 RPC 的工作原理,使用 gRPC 完善通信逻辑 | |||
| - 将通信逻辑与游戏逻辑分离开,便于日后复用 | |||
| - 客户端不对游戏人数、观战人数做出任何限制,这些方面全都由服务器决定 | |||
| - 改进选手接口,思考如何强制禁止选手一直占用 CPU 而导致 CPU 占用过大的问题。 | |||
| ### 提高目标 | |||
| - 提供其他语言的接口:Python、Java、Rust ...... | |||
| ## 统一约定 | |||
| - 主要使用现代 C++ 进行编程 | |||
| - 代码应当能够同时运行在 Windows 10 平台和 Linux 平台上。Windows 平台下采用 MSVC 作为编译工具,Linux 平台采用 GCC 作为编译工具 | |||
| - Windows 下的开发工具使用 Visual Studio 2019 或 Visual Studio 2022,语言标准采用 C++17 和 C17 (MSVC 编译选项 `/std:c++17; /std:c17`),并且应同时在 x64 平台的 Debug 与 Release 模式下正确编译并运行 | |||
| - Linux 下 C 语言编译工具使用 gcc,语言标准为 `-std=c17`;C++ 编译工具使用 g++,语言标准为 `-std=c++17`。优化选项为 `-O2`,生成 64 位程序 `-m64`,并编写相应的 Makefile | |||
| ## 注意事项 | |||
| - 与逻辑组共同商议通信协议 | |||
| - Visual Studio 新建的 C++ 代码文件默认字符编码是 GB2312、默认缩进方式是 TAB,应该注意手动改成 UTF-8 和 空格缩进 | |||
| - 了解 Visual Studio 的项目属性配置,例如第三方库的链接、预定义宏等 | |||
| - 使用现代 C++ 进行编程,尽量避免裸指针,多使用引用和智能指针 | |||
| - 了解 C、C++ 预处理、编译、链接的基本概念 | |||
| - 注意模块化、单元化,降低各个类、各个模块之间的耦合。特别注意避免相互依赖、环形依赖的问题 | |||
| - 遵循头文件(`.h`、`.hpp`)的编写规范 | |||
| + 杜绝头文件相互包含与环形包含 | |||
| + 头文件中最好同时写 `#pragma once` 以及保护宏,而 `cpp` 中不要写这两个东西 | |||
| + 头文件中**禁止** `using namespace std`!!!也不允许在任何自定义的名字空间中 `using namespace std`!!! | |||
| + 头文件和 `cpp` 文件各司其职,代码写在改写的位置 | |||
| + 禁止 include .cpp 或 .c 文件 | |||
| - 避免忙等待,注意线程安全,做好线程同步 | |||
| ## 开发人员 | |||
| - ......(自己加) | |||
| @@ -0,0 +1,852 @@ | |||
| // Generated by the gRPC C++ plugin. | |||
| // If you make any local change, they will be lost. | |||
| // source: Message2Clients.proto | |||
| #include "Message2Clients.pb.h" | |||
| #include "Message2Clients.grpc.pb.h" | |||
| #include <functional> | |||
| #include <grpcpp/impl/codegen/async_stream.h> | |||
| #include <grpcpp/impl/codegen/async_unary_call.h> | |||
| #include <grpcpp/impl/codegen/channel_interface.h> | |||
| #include <grpcpp/impl/codegen/client_unary_call.h> | |||
| #include <grpcpp/impl/codegen/client_callback.h> | |||
| #include <grpcpp/impl/codegen/message_allocator.h> | |||
| #include <grpcpp/impl/codegen/method_handler.h> | |||
| #include <grpcpp/impl/codegen/rpc_service_method.h> | |||
| #include <grpcpp/impl/codegen/server_callback.h> | |||
| #include <grpcpp/impl/codegen/server_callback_handlers.h> | |||
| #include <grpcpp/impl/codegen/server_context.h> | |||
| #include <grpcpp/impl/codegen/service_type.h> | |||
| #include <grpcpp/impl/codegen/sync_stream.h> | |||
| namespace protobuf | |||
| { | |||
| static const char* AvailableService_method_names[] = { | |||
| "/protobuf.AvailableService/TryConnection", | |||
| "/protobuf.AvailableService/AddPlayer", | |||
| "/protobuf.AvailableService/Move", | |||
| "/protobuf.AvailableService/PickProp", | |||
| "/protobuf.AvailableService/UseProp", | |||
| "/protobuf.AvailableService/UseSkill", | |||
| "/protobuf.AvailableService/SendMessage", | |||
| "/protobuf.AvailableService/HaveMessage", | |||
| "/protobuf.AvailableService/GetMessage", | |||
| "/protobuf.AvailableService/FixMachine", | |||
| "/protobuf.AvailableService/SaveHuman", | |||
| "/protobuf.AvailableService/Attack", | |||
| "/protobuf.AvailableService/CarryHuman", | |||
| "/protobuf.AvailableService/ReleaseHuman", | |||
| "/protobuf.AvailableService/HangHuman", | |||
| "/protobuf.AvailableService/Escape", | |||
| }; | |||
| std::unique_ptr<AvailableService::Stub> AvailableService::NewStub(const std::shared_ptr<::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) | |||
| { | |||
| (void)options; | |||
| std::unique_ptr<AvailableService::Stub> stub(new AvailableService::Stub(channel, options)); | |||
| return stub; | |||
| } | |||
| AvailableService::Stub::Stub(const std::shared_ptr<::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) : | |||
| channel_(channel), | |||
| rpcmethod_TryConnection_(AvailableService_method_names[0], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), | |||
| rpcmethod_AddPlayer_(AvailableService_method_names[1], options.suffix_for_stats(), ::grpc::internal::RpcMethod::SERVER_STREAMING, channel), | |||
| rpcmethod_Move_(AvailableService_method_names[2], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), | |||
| rpcmethod_PickProp_(AvailableService_method_names[3], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), | |||
| rpcmethod_UseProp_(AvailableService_method_names[4], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), | |||
| rpcmethod_UseSkill_(AvailableService_method_names[5], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), | |||
| rpcmethod_SendMessage_(AvailableService_method_names[6], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), | |||
| rpcmethod_HaveMessage_(AvailableService_method_names[7], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), | |||
| rpcmethod_GetMessage_(AvailableService_method_names[8], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), | |||
| rpcmethod_FixMachine_(AvailableService_method_names[9], options.suffix_for_stats(), ::grpc::internal::RpcMethod::BIDI_STREAMING, channel), | |||
| rpcmethod_SaveHuman_(AvailableService_method_names[10], options.suffix_for_stats(), ::grpc::internal::RpcMethod::BIDI_STREAMING, channel), | |||
| rpcmethod_Attack_(AvailableService_method_names[11], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), | |||
| rpcmethod_CarryHuman_(AvailableService_method_names[12], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), | |||
| rpcmethod_ReleaseHuman_(AvailableService_method_names[13], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), | |||
| rpcmethod_HangHuman_(AvailableService_method_names[14], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), | |||
| rpcmethod_Escape_(AvailableService_method_names[15], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel) | |||
| { | |||
| } | |||
| ::grpc::Status AvailableService::Stub::TryConnection(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_TryConnection_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::TryConnection(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_TryConnection_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::TryConnection(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_TryConnection_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncTryConnectionRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_TryConnection_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncTryConnectionRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncTryConnectionRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| ::grpc::ClientReader<::protobuf::MessageToClient>* AvailableService::Stub::AddPlayerRaw(::grpc::ClientContext* context, const ::protobuf::PlayerMsg& request) | |||
| { | |||
| return ::grpc::internal::ClientReaderFactory<::protobuf::MessageToClient>::Create(channel_.get(), rpcmethod_AddPlayer_, context, request); | |||
| } | |||
| void AvailableService::Stub::async::AddPlayer(::grpc::ClientContext* context, const ::protobuf::PlayerMsg* request, ::grpc::ClientReadReactor<::protobuf::MessageToClient>* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackReaderFactory<::protobuf::MessageToClient>::Create(stub_->channel_.get(), stub_->rpcmethod_AddPlayer_, context, request, reactor); | |||
| } | |||
| ::grpc::ClientAsyncReader<::protobuf::MessageToClient>* AvailableService::Stub::AsyncAddPlayerRaw(::grpc::ClientContext* context, const ::protobuf::PlayerMsg& request, ::grpc::CompletionQueue* cq, void* tag) | |||
| { | |||
| return ::grpc::internal::ClientAsyncReaderFactory<::protobuf::MessageToClient>::Create(channel_.get(), cq, rpcmethod_AddPlayer_, context, request, true, tag); | |||
| } | |||
| ::grpc::ClientAsyncReader<::protobuf::MessageToClient>* AvailableService::Stub::PrepareAsyncAddPlayerRaw(::grpc::ClientContext* context, const ::protobuf::PlayerMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncReaderFactory<::protobuf::MessageToClient>::Create(channel_.get(), cq, rpcmethod_AddPlayer_, context, request, false, nullptr); | |||
| } | |||
| ::grpc::Status AvailableService::Stub::Move(::grpc::ClientContext* context, const ::protobuf::MoveMsg& request, ::protobuf::MoveRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::MoveMsg, ::protobuf::MoveRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Move_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::Move(::grpc::ClientContext* context, const ::protobuf::MoveMsg* request, ::protobuf::MoveRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::MoveMsg, ::protobuf::MoveRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Move_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::Move(::grpc::ClientContext* context, const ::protobuf::MoveMsg* request, ::protobuf::MoveRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Move_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::MoveRes>* AvailableService::Stub::PrepareAsyncMoveRaw(::grpc::ClientContext* context, const ::protobuf::MoveMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::MoveRes, ::protobuf::MoveMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Move_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::MoveRes>* AvailableService::Stub::AsyncMoveRaw(::grpc::ClientContext* context, const ::protobuf::MoveMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncMoveRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| ::grpc::Status AvailableService::Stub::PickProp(::grpc::ClientContext* context, const ::protobuf::PickMsg& request, ::protobuf::BoolRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::PickMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_PickProp_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::PickProp(::grpc::ClientContext* context, const ::protobuf::PickMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::PickMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PickProp_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::PickProp(::grpc::ClientContext* context, const ::protobuf::PickMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PickProp_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncPickPropRaw(::grpc::ClientContext* context, const ::protobuf::PickMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::PickMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_PickProp_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncPickPropRaw(::grpc::ClientContext* context, const ::protobuf::PickMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncPickPropRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| ::grpc::Status AvailableService::Stub::UseProp(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_UseProp_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::UseProp(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseProp_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::UseProp(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseProp_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncUsePropRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_UseProp_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncUsePropRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncUsePropRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| ::grpc::Status AvailableService::Stub::UseSkill(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_UseSkill_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::UseSkill(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseSkill_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::UseSkill(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_UseSkill_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncUseSkillRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_UseSkill_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncUseSkillRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncUseSkillRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| ::grpc::Status AvailableService::Stub::SendMessage(::grpc::ClientContext* context, const ::protobuf::SendMsg& request, ::protobuf::BoolRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::SendMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SendMessage_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::SendMessage(::grpc::ClientContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::SendMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SendMessage_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::SendMessage(::grpc::ClientContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SendMessage_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncSendMessageRaw(::grpc::ClientContext* context, const ::protobuf::SendMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::SendMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SendMessage_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncSendMessageRaw(::grpc::ClientContext* context, const ::protobuf::SendMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncSendMessageRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| ::grpc::Status AvailableService::Stub::HaveMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_HaveMessage_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::HaveMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HaveMessage_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::HaveMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HaveMessage_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncHaveMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_HaveMessage_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncHaveMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncHaveMessageRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| ::grpc::Status AvailableService::Stub::GetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::MsgRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::MsgRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetMessage_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::GetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::MsgRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::MsgRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetMessage_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::GetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::MsgRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetMessage_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::MsgRes>* AvailableService::Stub::PrepareAsyncGetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::MsgRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetMessage_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::MsgRes>* AvailableService::Stub::AsyncGetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncGetMessageRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| ::grpc::ClientReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AvailableService::Stub::FixMachineRaw(::grpc::ClientContext* context) | |||
| { | |||
| return ::grpc::internal::ClientReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(channel_.get(), rpcmethod_FixMachine_, context); | |||
| } | |||
| void AvailableService::Stub::async::FixMachine(::grpc::ClientContext* context, ::grpc::ClientBidiReactor<::protobuf::IDMsg, ::protobuf::BoolRes>* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(stub_->channel_.get(), stub_->rpcmethod_FixMachine_, context, reactor); | |||
| } | |||
| ::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AvailableService::Stub::AsyncFixMachineRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) | |||
| { | |||
| return ::grpc::internal::ClientAsyncReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(channel_.get(), cq, rpcmethod_FixMachine_, context, true, tag); | |||
| } | |||
| ::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncFixMachineRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(channel_.get(), cq, rpcmethod_FixMachine_, context, false, nullptr); | |||
| } | |||
| ::grpc::ClientReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AvailableService::Stub::SaveHumanRaw(::grpc::ClientContext* context) | |||
| { | |||
| return ::grpc::internal::ClientReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(channel_.get(), rpcmethod_SaveHuman_, context); | |||
| } | |||
| void AvailableService::Stub::async::SaveHuman(::grpc::ClientContext* context, ::grpc::ClientBidiReactor<::protobuf::IDMsg, ::protobuf::BoolRes>* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(stub_->channel_.get(), stub_->rpcmethod_SaveHuman_, context, reactor); | |||
| } | |||
| ::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AvailableService::Stub::AsyncSaveHumanRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) | |||
| { | |||
| return ::grpc::internal::ClientAsyncReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(channel_.get(), cq, rpcmethod_SaveHuman_, context, true, tag); | |||
| } | |||
| ::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncSaveHumanRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(channel_.get(), cq, rpcmethod_SaveHuman_, context, false, nullptr); | |||
| } | |||
| ::grpc::Status AvailableService::Stub::Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::protobuf::BoolRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::AttackMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Attack_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::AttackMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Attack_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Attack_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncAttackRaw(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::AttackMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Attack_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncAttackRaw(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncAttackRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| ::grpc::Status AvailableService::Stub::CarryHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_CarryHuman_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::CarryHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CarryHuman_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::CarryHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_CarryHuman_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncCarryHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_CarryHuman_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncCarryHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncCarryHumanRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| ::grpc::Status AvailableService::Stub::ReleaseHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_ReleaseHuman_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::ReleaseHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ReleaseHuman_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::ReleaseHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_ReleaseHuman_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncReleaseHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_ReleaseHuman_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncReleaseHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncReleaseHumanRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| ::grpc::Status AvailableService::Stub::HangHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_HangHuman_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::HangHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HangHuman_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::HangHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_HangHuman_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncHangHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_HangHuman_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncHangHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncHangHumanRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| ::grpc::Status AvailableService::Stub::Escape(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) | |||
| { | |||
| return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Escape_, context, request, response); | |||
| } | |||
| void AvailableService::Stub::async::Escape(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function<void(::grpc::Status)> f) | |||
| { | |||
| ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Escape_, context, request, response, std::move(f)); | |||
| } | |||
| void AvailableService::Stub::async::Escape(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) | |||
| { | |||
| ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Escape_, context, request, response, reactor); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncEscapeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Escape_, context, request); | |||
| } | |||
| ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncEscapeRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) | |||
| { | |||
| auto* result = | |||
| this->PrepareAsyncEscapeRaw(context, request, cq); | |||
| result->StartCall(); | |||
| return result; | |||
| } | |||
| AvailableService::Service::Service() | |||
| { | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[0], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::IDMsg* req, | |||
| ::protobuf::BoolRes* resp) | |||
| { | |||
| return service->TryConnection(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[1], | |||
| ::grpc::internal::RpcMethod::SERVER_STREAMING, | |||
| new ::grpc::internal::ServerStreamingHandler<AvailableService::Service, ::protobuf::PlayerMsg, ::protobuf::MessageToClient>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::PlayerMsg* req, | |||
| ::grpc::ServerWriter<::protobuf::MessageToClient>* writer) | |||
| { | |||
| return service->AddPlayer(ctx, req, writer); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[2], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::MoveMsg, ::protobuf::MoveRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::MoveMsg* req, | |||
| ::protobuf::MoveRes* resp) | |||
| { | |||
| return service->Move(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[3], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::PickMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::PickMsg* req, | |||
| ::protobuf::BoolRes* resp) | |||
| { | |||
| return service->PickProp(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[4], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::IDMsg* req, | |||
| ::protobuf::BoolRes* resp) | |||
| { | |||
| return service->UseProp(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[5], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::IDMsg* req, | |||
| ::protobuf::BoolRes* resp) | |||
| { | |||
| return service->UseSkill(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[6], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::SendMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::SendMsg* req, | |||
| ::protobuf::BoolRes* resp) | |||
| { | |||
| return service->SendMessage(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[7], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::IDMsg* req, | |||
| ::protobuf::BoolRes* resp) | |||
| { | |||
| return service->HaveMessage(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[8], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::MsgRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::IDMsg* req, | |||
| ::protobuf::MsgRes* resp) | |||
| { | |||
| return service->GetMessage(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[9], | |||
| ::grpc::internal::RpcMethod::BIDI_STREAMING, | |||
| new ::grpc::internal::BidiStreamingHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* stream) | |||
| { | |||
| return service->FixMachine(ctx, stream); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[10], | |||
| ::grpc::internal::RpcMethod::BIDI_STREAMING, | |||
| new ::grpc::internal::BidiStreamingHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* stream) | |||
| { | |||
| return service->SaveHuman(ctx, stream); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[11], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::AttackMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::AttackMsg* req, | |||
| ::protobuf::BoolRes* resp) | |||
| { | |||
| return service->Attack(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[12], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::IDMsg* req, | |||
| ::protobuf::BoolRes* resp) | |||
| { | |||
| return service->CarryHuman(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[13], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::IDMsg* req, | |||
| ::protobuf::BoolRes* resp) | |||
| { | |||
| return service->ReleaseHuman(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[14], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::IDMsg* req, | |||
| ::protobuf::BoolRes* resp) | |||
| { | |||
| return service->HangHuman(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| AddMethod(new ::grpc::internal::RpcServiceMethod( | |||
| AvailableService_method_names[15], | |||
| ::grpc::internal::RpcMethod::NORMAL_RPC, | |||
| new ::grpc::internal::RpcMethodHandler<AvailableService::Service, ::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( | |||
| [](AvailableService::Service* service, | |||
| ::grpc::ServerContext* ctx, | |||
| const ::protobuf::IDMsg* req, | |||
| ::protobuf::BoolRes* resp) | |||
| { | |||
| return service->Escape(ctx, req, resp); | |||
| }, | |||
| this | |||
| ) | |||
| )); | |||
| } | |||
| AvailableService::Service::~Service() | |||
| { | |||
| } | |||
| ::grpc::Status AvailableService::Service::TryConnection(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::AddPlayer(::grpc::ServerContext* context, const ::protobuf::PlayerMsg* request, ::grpc::ServerWriter<::protobuf::MessageToClient>* writer) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)writer; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::Move(::grpc::ServerContext* context, const ::protobuf::MoveMsg* request, ::protobuf::MoveRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::PickProp(::grpc::ServerContext* context, const ::protobuf::PickMsg* request, ::protobuf::BoolRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::UseProp(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::UseSkill(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::SendMessage(::grpc::ServerContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::HaveMessage(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::GetMessage(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::MsgRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::FixMachine(::grpc::ServerContext* context, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* stream) | |||
| { | |||
| (void)context; | |||
| (void)stream; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::SaveHuman(::grpc::ServerContext* context, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* stream) | |||
| { | |||
| (void)context; | |||
| (void)stream; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::Attack(::grpc::ServerContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::CarryHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::ReleaseHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::HangHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| ::grpc::Status AvailableService::Service::Escape(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) | |||
| { | |||
| (void)context; | |||
| (void)request; | |||
| (void)response; | |||
| return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); | |||
| } | |||
| } // namespace protobuf | |||
| @@ -0,0 +1,25 @@ | |||
| // Generated by the gRPC C++ plugin. | |||
| // If you make any local change, they will be lost. | |||
| // source: Message2Server.proto | |||
| #include "Message2Server.pb.h" | |||
| #include "Message2Server.grpc.pb.h" | |||
| #include <functional> | |||
| #include <grpcpp/impl/codegen/async_stream.h> | |||
| #include <grpcpp/impl/codegen/async_unary_call.h> | |||
| #include <grpcpp/impl/codegen/channel_interface.h> | |||
| #include <grpcpp/impl/codegen/client_unary_call.h> | |||
| #include <grpcpp/impl/codegen/client_callback.h> | |||
| #include <grpcpp/impl/codegen/message_allocator.h> | |||
| #include <grpcpp/impl/codegen/method_handler.h> | |||
| #include <grpcpp/impl/codegen/rpc_service_method.h> | |||
| #include <grpcpp/impl/codegen/server_callback.h> | |||
| #include <grpcpp/impl/codegen/server_callback_handlers.h> | |||
| #include <grpcpp/impl/codegen/server_context.h> | |||
| #include <grpcpp/impl/codegen/service_type.h> | |||
| #include <grpcpp/impl/codegen/sync_stream.h> | |||
| namespace protobuf | |||
| { | |||
| } // namespace protobuf | |||
| @@ -0,0 +1,35 @@ | |||
| // Generated by the gRPC C++ plugin. | |||
| // If you make any local change, they will be lost. | |||
| // source: Message2Server.proto | |||
| // Original file comments: | |||
| // Message2Server | |||
| #ifndef GRPC_Message2Server_2eproto__INCLUDED | |||
| #define GRPC_Message2Server_2eproto__INCLUDED | |||
| #include "Message2Server.pb.h" | |||
| #include <functional> | |||
| #include <grpcpp/impl/codegen/async_generic_service.h> | |||
| #include <grpcpp/impl/codegen/async_stream.h> | |||
| #include <grpcpp/impl/codegen/async_unary_call.h> | |||
| #include <grpcpp/impl/codegen/client_callback.h> | |||
| #include <grpcpp/impl/codegen/client_context.h> | |||
| #include <grpcpp/impl/codegen/completion_queue.h> | |||
| #include <grpcpp/impl/codegen/message_allocator.h> | |||
| #include <grpcpp/impl/codegen/method_handler.h> | |||
| #include <grpcpp/impl/codegen/proto_utils.h> | |||
| #include <grpcpp/impl/codegen/rpc_method.h> | |||
| #include <grpcpp/impl/codegen/server_callback.h> | |||
| #include <grpcpp/impl/codegen/server_callback_handlers.h> | |||
| #include <grpcpp/impl/codegen/server_context.h> | |||
| #include <grpcpp/impl/codegen/service_type.h> | |||
| #include <grpcpp/impl/codegen/status.h> | |||
| #include <grpcpp/impl/codegen/stub_options.h> | |||
| #include <grpcpp/impl/codegen/sync_stream.h> | |||
| namespace protobuf | |||
| { | |||
| } // namespace protobuf | |||
| #endif // GRPC_Message2Server_2eproto__INCLUDED | |||
| @@ -0,0 +1,25 @@ | |||
| // Generated by the gRPC C++ plugin. | |||
| // If you make any local change, they will be lost. | |||
| // source: MessageType.proto | |||
| #include "MessageType.pb.h" | |||
| #include "MessageType.grpc.pb.h" | |||
| #include <functional> | |||
| #include <grpcpp/impl/codegen/async_stream.h> | |||
| #include <grpcpp/impl/codegen/async_unary_call.h> | |||
| #include <grpcpp/impl/codegen/channel_interface.h> | |||
| #include <grpcpp/impl/codegen/client_unary_call.h> | |||
| #include <grpcpp/impl/codegen/client_callback.h> | |||
| #include <grpcpp/impl/codegen/message_allocator.h> | |||
| #include <grpcpp/impl/codegen/method_handler.h> | |||
| #include <grpcpp/impl/codegen/rpc_service_method.h> | |||
| #include <grpcpp/impl/codegen/server_callback.h> | |||
| #include <grpcpp/impl/codegen/server_callback_handlers.h> | |||
| #include <grpcpp/impl/codegen/server_context.h> | |||
| #include <grpcpp/impl/codegen/service_type.h> | |||
| #include <grpcpp/impl/codegen/sync_stream.h> | |||
| namespace protobuf | |||
| { | |||
| } // namespace protobuf | |||
| @@ -0,0 +1,35 @@ | |||
| // Generated by the gRPC C++ plugin. | |||
| // If you make any local change, they will be lost. | |||
| // source: MessageType.proto | |||
| // Original file comments: | |||
| // MessageType | |||
| #ifndef GRPC_MessageType_2eproto__INCLUDED | |||
| #define GRPC_MessageType_2eproto__INCLUDED | |||
| #include "MessageType.pb.h" | |||
| #include <functional> | |||
| #include <grpcpp/impl/codegen/async_generic_service.h> | |||
| #include <grpcpp/impl/codegen/async_stream.h> | |||
| #include <grpcpp/impl/codegen/async_unary_call.h> | |||
| #include <grpcpp/impl/codegen/client_callback.h> | |||
| #include <grpcpp/impl/codegen/client_context.h> | |||
| #include <grpcpp/impl/codegen/completion_queue.h> | |||
| #include <grpcpp/impl/codegen/message_allocator.h> | |||
| #include <grpcpp/impl/codegen/method_handler.h> | |||
| #include <grpcpp/impl/codegen/proto_utils.h> | |||
| #include <grpcpp/impl/codegen/rpc_method.h> | |||
| #include <grpcpp/impl/codegen/server_callback.h> | |||
| #include <grpcpp/impl/codegen/server_callback_handlers.h> | |||
| #include <grpcpp/impl/codegen/server_context.h> | |||
| #include <grpcpp/impl/codegen/service_type.h> | |||
| #include <grpcpp/impl/codegen/status.h> | |||
| #include <grpcpp/impl/codegen/stub_options.h> | |||
| #include <grpcpp/impl/codegen/sync_stream.h> | |||
| namespace protobuf | |||
| { | |||
| } // namespace protobuf | |||
| #endif // GRPC_MessageType_2eproto__INCLUDED | |||
| @@ -0,0 +1,240 @@ | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: MessageType.proto | |||
| #include "MessageType.pb.h" | |||
| #include <algorithm> | |||
| #include <google/protobuf/io/coded_stream.h> | |||
| #include <google/protobuf/extension_set.h> | |||
| #include <google/protobuf/wire_format_lite.h> | |||
| #include <google/protobuf/descriptor.h> | |||
| #include <google/protobuf/generated_message_reflection.h> | |||
| #include <google/protobuf/reflection_ops.h> | |||
| #include <google/protobuf/wire_format.h> | |||
| // @@protoc_insertion_point(includes) | |||
| #include <google/protobuf/port_def.inc> | |||
| PROTOBUF_PRAGMA_INIT_SEG | |||
| namespace protobuf | |||
| { | |||
| } // namespace protobuf | |||
| static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_MessageType_2eproto[8]; | |||
| static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_MessageType_2eproto = nullptr; | |||
| const uint32_t TableStruct_MessageType_2eproto::offsets[1] = {}; | |||
| static constexpr ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema* schemas = nullptr; | |||
| static constexpr ::PROTOBUF_NAMESPACE_ID::Message* const* file_default_instances = nullptr; | |||
| const char descriptor_table_protodef_MessageType_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = | |||
| "\n\021MessageType.proto\022\010protobuf*g\n\tPlaceTy" | |||
| "pe\022\023\n\017NULL_PLACE_TYPE\020\000\022\010\n\004LAND\020\001\022\010\n\004WAL" | |||
| "L\020\002\022\t\n\005GRASS\020\003\022\013\n\007MACHINE\020\004\022\010\n\004GATE\020\005\022\017\n" | |||
| "\013HIDDEN_GATE\020\006*8\n\tShapeType\022\023\n\017NULL_SHAP" | |||
| "E_TYPE\020\000\022\n\n\006CIRCLE\020\001\022\n\n\006SQUARE\020\002*N\n\010Prop" | |||
| "Type\022\022\n\016NULL_PROP_TYPE\020\000\022\n\n\006PTYPE1\020\001\022\n\n\006" | |||
| "PTYPE2\020\002\022\n\n\006PTYPE3\020\003\022\n\n\006PTYPE4\020\004*d\n\rHuma" | |||
| "nBuffType\022\023\n\017NULL_HBUFF_TYPE\020\000\022\016\n\nHBUFFT" | |||
| "YPE1\020\001\022\016\n\nHBUFFTYPE2\020\002\022\016\n\nHBUFFTYPE3\020\003\022\016" | |||
| "\n\nHBUFFTYPE4\020\004*f\n\017ButcherBuffType\022\023\n\017NUL" | |||
| "L_BBUFF_TYPE\020\000\022\016\n\nBBUFFTYPE1\020\001\022\016\n\nBBUFFT" | |||
| "YPE2\020\002\022\016\n\nBBUFFTYPE3\020\003\022\016\n\nBBUFFTYPE4\020\004*H" | |||
| "\n\nPlayerType\022\024\n\020NULL_PLAYER_TYPE\020\000\022\020\n\014HU" | |||
| "MAN_PLAYER\020\001\022\022\n\016BUTCHER_PLAYER\020\002*`\n\tHuma" | |||
| "nType\022\023\n\017NULL_HUMAN_TYPE\020\000\022\016\n\nHUMANTYPE1" | |||
| "\020\001\022\016\n\nHUMANTYPE2\020\002\022\016\n\nHUMANTYPE3\020\003\022\016\n\nHU" | |||
| "MANTYPE4\020\004*l\n\013ButcherType\022\025\n\021NULL_BUTCHE" | |||
| "R_TYPE\020\000\022\020\n\014BUTCHERTYPE1\020\001\022\020\n\014BUTCHERTYP" | |||
| "E2\020\002\022\020\n\014BUTCHERTYPE3\020\003\022\020\n\014BUTCHERTYPE4\020\004" | |||
| "b\006proto3"; | |||
| static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_MessageType_2eproto_once; | |||
| const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_MessageType_2eproto = { | |||
| false, | |||
| false, | |||
| 768, | |||
| descriptor_table_protodef_MessageType_2eproto, | |||
| "MessageType.proto", | |||
| &descriptor_table_MessageType_2eproto_once, | |||
| nullptr, | |||
| 0, | |||
| 0, | |||
| schemas, | |||
| file_default_instances, | |||
| TableStruct_MessageType_2eproto::offsets, | |||
| nullptr, | |||
| file_level_enum_descriptors_MessageType_2eproto, | |||
| file_level_service_descriptors_MessageType_2eproto, | |||
| }; | |||
| PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_MessageType_2eproto_getter() | |||
| { | |||
| return &descriptor_table_MessageType_2eproto; | |||
| } | |||
| // Force running AddDescriptors() at dynamic initialization time. | |||
| PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_MessageType_2eproto(&descriptor_table_MessageType_2eproto); | |||
| namespace protobuf | |||
| { | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlaceType_descriptor() | |||
| { | |||
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); | |||
| return file_level_enum_descriptors_MessageType_2eproto[0]; | |||
| } | |||
| bool PlaceType_IsValid(int value) | |||
| { | |||
| switch (value) | |||
| { | |||
| case 0: | |||
| case 1: | |||
| case 2: | |||
| case 3: | |||
| case 4: | |||
| case 5: | |||
| case 6: | |||
| return true; | |||
| default: | |||
| return false; | |||
| } | |||
| } | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ShapeType_descriptor() | |||
| { | |||
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); | |||
| return file_level_enum_descriptors_MessageType_2eproto[1]; | |||
| } | |||
| bool ShapeType_IsValid(int value) | |||
| { | |||
| switch (value) | |||
| { | |||
| case 0: | |||
| case 1: | |||
| case 2: | |||
| return true; | |||
| default: | |||
| return false; | |||
| } | |||
| } | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PropType_descriptor() | |||
| { | |||
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); | |||
| return file_level_enum_descriptors_MessageType_2eproto[2]; | |||
| } | |||
| bool PropType_IsValid(int value) | |||
| { | |||
| switch (value) | |||
| { | |||
| case 0: | |||
| case 1: | |||
| case 2: | |||
| case 3: | |||
| case 4: | |||
| return true; | |||
| default: | |||
| return false; | |||
| } | |||
| } | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HumanBuffType_descriptor() | |||
| { | |||
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); | |||
| return file_level_enum_descriptors_MessageType_2eproto[3]; | |||
| } | |||
| bool HumanBuffType_IsValid(int value) | |||
| { | |||
| switch (value) | |||
| { | |||
| case 0: | |||
| case 1: | |||
| case 2: | |||
| case 3: | |||
| case 4: | |||
| return true; | |||
| default: | |||
| return false; | |||
| } | |||
| } | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ButcherBuffType_descriptor() | |||
| { | |||
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); | |||
| return file_level_enum_descriptors_MessageType_2eproto[4]; | |||
| } | |||
| bool ButcherBuffType_IsValid(int value) | |||
| { | |||
| switch (value) | |||
| { | |||
| case 0: | |||
| case 1: | |||
| case 2: | |||
| case 3: | |||
| case 4: | |||
| return true; | |||
| default: | |||
| return false; | |||
| } | |||
| } | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlayerType_descriptor() | |||
| { | |||
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); | |||
| return file_level_enum_descriptors_MessageType_2eproto[5]; | |||
| } | |||
| bool PlayerType_IsValid(int value) | |||
| { | |||
| switch (value) | |||
| { | |||
| case 0: | |||
| case 1: | |||
| case 2: | |||
| return true; | |||
| default: | |||
| return false; | |||
| } | |||
| } | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HumanType_descriptor() | |||
| { | |||
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); | |||
| return file_level_enum_descriptors_MessageType_2eproto[6]; | |||
| } | |||
| bool HumanType_IsValid(int value) | |||
| { | |||
| switch (value) | |||
| { | |||
| case 0: | |||
| case 1: | |||
| case 2: | |||
| case 3: | |||
| case 4: | |||
| return true; | |||
| default: | |||
| return false; | |||
| } | |||
| } | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ButcherType_descriptor() | |||
| { | |||
| ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); | |||
| return file_level_enum_descriptors_MessageType_2eproto[7]; | |||
| } | |||
| bool ButcherType_IsValid(int value) | |||
| { | |||
| switch (value) | |||
| { | |||
| case 0: | |||
| case 1: | |||
| case 2: | |||
| case 3: | |||
| case 4: | |||
| return true; | |||
| default: | |||
| return false; | |||
| } | |||
| } | |||
| // @@protoc_insertion_point(namespace_scope) | |||
| } // namespace protobuf | |||
| PROTOBUF_NAMESPACE_OPEN | |||
| PROTOBUF_NAMESPACE_CLOSE | |||
| // @@protoc_insertion_point(global_scope) | |||
| #include <google/protobuf/port_undef.inc> | |||
| @@ -0,0 +1,411 @@ | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: MessageType.proto | |||
| #ifndef GOOGLE_PROTOBUF_INCLUDED_MessageType_2eproto | |||
| #define GOOGLE_PROTOBUF_INCLUDED_MessageType_2eproto | |||
| #include <limits> | |||
| #include <string> | |||
| #include <google/protobuf/port_def.inc> | |||
| #if PROTOBUF_VERSION < 3019000 | |||
| #error This file was generated by a newer version of protoc which is | |||
| #error incompatible with your Protocol Buffer headers. Please update | |||
| #error your headers. | |||
| #endif | |||
| #if 3019004 < PROTOBUF_MIN_PROTOC_VERSION | |||
| #error This file was generated by an older version of protoc which is | |||
| #error incompatible with your Protocol Buffer headers. Please | |||
| #error regenerate this file with a newer version of protoc. | |||
| #endif | |||
| #include <google/protobuf/port_undef.inc> | |||
| #include <google/protobuf/io/coded_stream.h> | |||
| #include <google/protobuf/arena.h> | |||
| #include <google/protobuf/arenastring.h> | |||
| #include <google/protobuf/generated_message_table_driven.h> | |||
| #include <google/protobuf/generated_message_util.h> | |||
| #include <google/protobuf/metadata_lite.h> | |||
| #include <google/protobuf/generated_message_reflection.h> | |||
| #include <google/protobuf/repeated_field.h> // IWYU pragma: export | |||
| #include <google/protobuf/extension_set.h> // IWYU pragma: export | |||
| #include <google/protobuf/generated_enum_reflection.h> | |||
| // @@protoc_insertion_point(includes) | |||
| #include <google/protobuf/port_def.inc> | |||
| #define PROTOBUF_INTERNAL_EXPORT_MessageType_2eproto | |||
| PROTOBUF_NAMESPACE_OPEN | |||
| namespace internal | |||
| { | |||
| class AnyMetadata; | |||
| } // namespace internal | |||
| PROTOBUF_NAMESPACE_CLOSE | |||
| // Internal implementation detail -- do not use these members. | |||
| struct TableStruct_MessageType_2eproto | |||
| { | |||
| static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); | |||
| static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); | |||
| static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] PROTOBUF_SECTION_VARIABLE(protodesc_cold); | |||
| static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; | |||
| static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; | |||
| static const uint32_t offsets[]; | |||
| }; | |||
| extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_MessageType_2eproto; | |||
| PROTOBUF_NAMESPACE_OPEN | |||
| PROTOBUF_NAMESPACE_CLOSE | |||
| namespace protobuf | |||
| { | |||
| enum PlaceType : int | |||
| { | |||
| NULL_PLACE_TYPE = 0, | |||
| LAND = 1, | |||
| WALL = 2, | |||
| GRASS = 3, | |||
| MACHINE = 4, | |||
| GATE = 5, | |||
| HIDDEN_GATE = 6, | |||
| PlaceType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), | |||
| PlaceType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() | |||
| }; | |||
| bool PlaceType_IsValid(int value); | |||
| constexpr PlaceType PlaceType_MIN = NULL_PLACE_TYPE; | |||
| constexpr PlaceType PlaceType_MAX = HIDDEN_GATE; | |||
| constexpr int PlaceType_ARRAYSIZE = PlaceType_MAX + 1; | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlaceType_descriptor(); | |||
| template<typename T> | |||
| inline const std::string& PlaceType_Name(T enum_t_value) | |||
| { | |||
| static_assert(::std::is_same<T, PlaceType>::value || ::std::is_integral<T>::value, "Incorrect type passed to function PlaceType_Name."); | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( | |||
| PlaceType_descriptor(), enum_t_value | |||
| ); | |||
| } | |||
| inline bool PlaceType_Parse( | |||
| ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PlaceType* value | |||
| ) | |||
| { | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<PlaceType>( | |||
| PlaceType_descriptor(), name, value | |||
| ); | |||
| } | |||
| enum ShapeType : int | |||
| { | |||
| NULL_SHAPE_TYPE = 0, | |||
| CIRCLE = 1, | |||
| SQUARE = 2, | |||
| ShapeType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), | |||
| ShapeType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() | |||
| }; | |||
| bool ShapeType_IsValid(int value); | |||
| constexpr ShapeType ShapeType_MIN = NULL_SHAPE_TYPE; | |||
| constexpr ShapeType ShapeType_MAX = SQUARE; | |||
| constexpr int ShapeType_ARRAYSIZE = ShapeType_MAX + 1; | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ShapeType_descriptor(); | |||
| template<typename T> | |||
| inline const std::string& ShapeType_Name(T enum_t_value) | |||
| { | |||
| static_assert(::std::is_same<T, ShapeType>::value || ::std::is_integral<T>::value, "Incorrect type passed to function ShapeType_Name."); | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( | |||
| ShapeType_descriptor(), enum_t_value | |||
| ); | |||
| } | |||
| inline bool ShapeType_Parse( | |||
| ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ShapeType* value | |||
| ) | |||
| { | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<ShapeType>( | |||
| ShapeType_descriptor(), name, value | |||
| ); | |||
| } | |||
| enum PropType : int | |||
| { | |||
| NULL_PROP_TYPE = 0, | |||
| PTYPE1 = 1, | |||
| PTYPE2 = 2, | |||
| PTYPE3 = 3, | |||
| PTYPE4 = 4, | |||
| PropType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), | |||
| PropType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() | |||
| }; | |||
| bool PropType_IsValid(int value); | |||
| constexpr PropType PropType_MIN = NULL_PROP_TYPE; | |||
| constexpr PropType PropType_MAX = PTYPE4; | |||
| constexpr int PropType_ARRAYSIZE = PropType_MAX + 1; | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PropType_descriptor(); | |||
| template<typename T> | |||
| inline const std::string& PropType_Name(T enum_t_value) | |||
| { | |||
| static_assert(::std::is_same<T, PropType>::value || ::std::is_integral<T>::value, "Incorrect type passed to function PropType_Name."); | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( | |||
| PropType_descriptor(), enum_t_value | |||
| ); | |||
| } | |||
| inline bool PropType_Parse( | |||
| ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PropType* value | |||
| ) | |||
| { | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<PropType>( | |||
| PropType_descriptor(), name, value | |||
| ); | |||
| } | |||
| enum HumanBuffType : int | |||
| { | |||
| NULL_HBUFF_TYPE = 0, | |||
| HBUFFTYPE1 = 1, | |||
| HBUFFTYPE2 = 2, | |||
| HBUFFTYPE3 = 3, | |||
| HBUFFTYPE4 = 4, | |||
| HumanBuffType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), | |||
| HumanBuffType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() | |||
| }; | |||
| bool HumanBuffType_IsValid(int value); | |||
| constexpr HumanBuffType HumanBuffType_MIN = NULL_HBUFF_TYPE; | |||
| constexpr HumanBuffType HumanBuffType_MAX = HBUFFTYPE4; | |||
| constexpr int HumanBuffType_ARRAYSIZE = HumanBuffType_MAX + 1; | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HumanBuffType_descriptor(); | |||
| template<typename T> | |||
| inline const std::string& HumanBuffType_Name(T enum_t_value) | |||
| { | |||
| static_assert(::std::is_same<T, HumanBuffType>::value || ::std::is_integral<T>::value, "Incorrect type passed to function HumanBuffType_Name."); | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( | |||
| HumanBuffType_descriptor(), enum_t_value | |||
| ); | |||
| } | |||
| inline bool HumanBuffType_Parse( | |||
| ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, HumanBuffType* value | |||
| ) | |||
| { | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<HumanBuffType>( | |||
| HumanBuffType_descriptor(), name, value | |||
| ); | |||
| } | |||
| enum ButcherBuffType : int | |||
| { | |||
| NULL_BBUFF_TYPE = 0, | |||
| BBUFFTYPE1 = 1, | |||
| BBUFFTYPE2 = 2, | |||
| BBUFFTYPE3 = 3, | |||
| BBUFFTYPE4 = 4, | |||
| ButcherBuffType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), | |||
| ButcherBuffType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() | |||
| }; | |||
| bool ButcherBuffType_IsValid(int value); | |||
| constexpr ButcherBuffType ButcherBuffType_MIN = NULL_BBUFF_TYPE; | |||
| constexpr ButcherBuffType ButcherBuffType_MAX = BBUFFTYPE4; | |||
| constexpr int ButcherBuffType_ARRAYSIZE = ButcherBuffType_MAX + 1; | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ButcherBuffType_descriptor(); | |||
| template<typename T> | |||
| inline const std::string& ButcherBuffType_Name(T enum_t_value) | |||
| { | |||
| static_assert(::std::is_same<T, ButcherBuffType>::value || ::std::is_integral<T>::value, "Incorrect type passed to function ButcherBuffType_Name."); | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( | |||
| ButcherBuffType_descriptor(), enum_t_value | |||
| ); | |||
| } | |||
| inline bool ButcherBuffType_Parse( | |||
| ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ButcherBuffType* value | |||
| ) | |||
| { | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<ButcherBuffType>( | |||
| ButcherBuffType_descriptor(), name, value | |||
| ); | |||
| } | |||
| enum PlayerType : int | |||
| { | |||
| NULL_PLAYER_TYPE = 0, | |||
| HUMAN_PLAYER = 1, | |||
| BUTCHER_PLAYER = 2, | |||
| PlayerType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), | |||
| PlayerType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() | |||
| }; | |||
| bool PlayerType_IsValid(int value); | |||
| constexpr PlayerType PlayerType_MIN = NULL_PLAYER_TYPE; | |||
| constexpr PlayerType PlayerType_MAX = BUTCHER_PLAYER; | |||
| constexpr int PlayerType_ARRAYSIZE = PlayerType_MAX + 1; | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlayerType_descriptor(); | |||
| template<typename T> | |||
| inline const std::string& PlayerType_Name(T enum_t_value) | |||
| { | |||
| static_assert(::std::is_same<T, PlayerType>::value || ::std::is_integral<T>::value, "Incorrect type passed to function PlayerType_Name."); | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( | |||
| PlayerType_descriptor(), enum_t_value | |||
| ); | |||
| } | |||
| inline bool PlayerType_Parse( | |||
| ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PlayerType* value | |||
| ) | |||
| { | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<PlayerType>( | |||
| PlayerType_descriptor(), name, value | |||
| ); | |||
| } | |||
| enum HumanType : int | |||
| { | |||
| NULL_HUMAN_TYPE = 0, | |||
| HUMANTYPE1 = 1, | |||
| HUMANTYPE2 = 2, | |||
| HUMANTYPE3 = 3, | |||
| HUMANTYPE4 = 4, | |||
| HumanType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), | |||
| HumanType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() | |||
| }; | |||
| bool HumanType_IsValid(int value); | |||
| constexpr HumanType HumanType_MIN = NULL_HUMAN_TYPE; | |||
| constexpr HumanType HumanType_MAX = HUMANTYPE4; | |||
| constexpr int HumanType_ARRAYSIZE = HumanType_MAX + 1; | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HumanType_descriptor(); | |||
| template<typename T> | |||
| inline const std::string& HumanType_Name(T enum_t_value) | |||
| { | |||
| static_assert(::std::is_same<T, HumanType>::value || ::std::is_integral<T>::value, "Incorrect type passed to function HumanType_Name."); | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( | |||
| HumanType_descriptor(), enum_t_value | |||
| ); | |||
| } | |||
| inline bool HumanType_Parse( | |||
| ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, HumanType* value | |||
| ) | |||
| { | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<HumanType>( | |||
| HumanType_descriptor(), name, value | |||
| ); | |||
| } | |||
| enum ButcherType : int | |||
| { | |||
| NULL_BUTCHER_TYPE = 0, | |||
| BUTCHERTYPE1 = 1, | |||
| BUTCHERTYPE2 = 2, | |||
| BUTCHERTYPE3 = 3, | |||
| BUTCHERTYPE4 = 4, | |||
| ButcherType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), | |||
| ButcherType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() | |||
| }; | |||
| bool ButcherType_IsValid(int value); | |||
| constexpr ButcherType ButcherType_MIN = NULL_BUTCHER_TYPE; | |||
| constexpr ButcherType ButcherType_MAX = BUTCHERTYPE4; | |||
| constexpr int ButcherType_ARRAYSIZE = ButcherType_MAX + 1; | |||
| const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ButcherType_descriptor(); | |||
| template<typename T> | |||
| inline const std::string& ButcherType_Name(T enum_t_value) | |||
| { | |||
| static_assert(::std::is_same<T, ButcherType>::value || ::std::is_integral<T>::value, "Incorrect type passed to function ButcherType_Name."); | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( | |||
| ButcherType_descriptor(), enum_t_value | |||
| ); | |||
| } | |||
| inline bool ButcherType_Parse( | |||
| ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ButcherType* value | |||
| ) | |||
| { | |||
| return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<ButcherType>( | |||
| ButcherType_descriptor(), name, value | |||
| ); | |||
| } | |||
| // =================================================================== | |||
| // =================================================================== | |||
| // =================================================================== | |||
| #ifdef __GNUC__ | |||
| #pragma GCC diagnostic push | |||
| #pragma GCC diagnostic ignored "-Wstrict-aliasing" | |||
| #endif // __GNUC__ | |||
| #ifdef __GNUC__ | |||
| #pragma GCC diagnostic pop | |||
| #endif // __GNUC__ | |||
| // @@protoc_insertion_point(namespace_scope) | |||
| } // namespace protobuf | |||
| PROTOBUF_NAMESPACE_OPEN | |||
| template<> | |||
| struct is_proto_enum<::protobuf::PlaceType> : ::std::true_type | |||
| { | |||
| }; | |||
| template<> | |||
| inline const EnumDescriptor* GetEnumDescriptor<::protobuf::PlaceType>() | |||
| { | |||
| return ::protobuf::PlaceType_descriptor(); | |||
| } | |||
| template<> | |||
| struct is_proto_enum<::protobuf::ShapeType> : ::std::true_type | |||
| { | |||
| }; | |||
| template<> | |||
| inline const EnumDescriptor* GetEnumDescriptor<::protobuf::ShapeType>() | |||
| { | |||
| return ::protobuf::ShapeType_descriptor(); | |||
| } | |||
| template<> | |||
| struct is_proto_enum<::protobuf::PropType> : ::std::true_type | |||
| { | |||
| }; | |||
| template<> | |||
| inline const EnumDescriptor* GetEnumDescriptor<::protobuf::PropType>() | |||
| { | |||
| return ::protobuf::PropType_descriptor(); | |||
| } | |||
| template<> | |||
| struct is_proto_enum<::protobuf::HumanBuffType> : ::std::true_type | |||
| { | |||
| }; | |||
| template<> | |||
| inline const EnumDescriptor* GetEnumDescriptor<::protobuf::HumanBuffType>() | |||
| { | |||
| return ::protobuf::HumanBuffType_descriptor(); | |||
| } | |||
| template<> | |||
| struct is_proto_enum<::protobuf::ButcherBuffType> : ::std::true_type | |||
| { | |||
| }; | |||
| template<> | |||
| inline const EnumDescriptor* GetEnumDescriptor<::protobuf::ButcherBuffType>() | |||
| { | |||
| return ::protobuf::ButcherBuffType_descriptor(); | |||
| } | |||
| template<> | |||
| struct is_proto_enum<::protobuf::PlayerType> : ::std::true_type | |||
| { | |||
| }; | |||
| template<> | |||
| inline const EnumDescriptor* GetEnumDescriptor<::protobuf::PlayerType>() | |||
| { | |||
| return ::protobuf::PlayerType_descriptor(); | |||
| } | |||
| template<> | |||
| struct is_proto_enum<::protobuf::HumanType> : ::std::true_type | |||
| { | |||
| }; | |||
| template<> | |||
| inline const EnumDescriptor* GetEnumDescriptor<::protobuf::HumanType>() | |||
| { | |||
| return ::protobuf::HumanType_descriptor(); | |||
| } | |||
| template<> | |||
| struct is_proto_enum<::protobuf::ButcherType> : ::std::true_type | |||
| { | |||
| }; | |||
| template<> | |||
| inline const EnumDescriptor* GetEnumDescriptor<::protobuf::ButcherType>() | |||
| { | |||
| return ::protobuf::ButcherType_descriptor(); | |||
| } | |||
| PROTOBUF_NAMESPACE_CLOSE | |||
| // @@protoc_insertion_point(global_scope) | |||
| #include <google/protobuf/port_undef.inc> | |||
| #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_MessageType_2eproto | |||
| @@ -0,0 +1,363 @@ | |||
| ## Ignore Visual Studio temporary files, build results, and | |||
| ## files generated by popular Visual Studio add-ons. | |||
| ## | |||
| ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore | |||
| # User-specific files | |||
| *.rsuser | |||
| *.suo | |||
| *.user | |||
| *.userosscache | |||
| *.sln.docstates | |||
| # User-specific files (MonoDevelop/Xamarin Studio) | |||
| *.userprefs | |||
| # Mono auto generated files | |||
| mono_crash.* | |||
| # Build results | |||
| [Dd]ebug/ | |||
| [Dd]ebugPublic/ | |||
| [Rr]elease/ | |||
| [Rr]eleases/ | |||
| x64/ | |||
| x86/ | |||
| [Ww][Ii][Nn]32/ | |||
| [Aa][Rr][Mm]/ | |||
| [Aa][Rr][Mm]64/ | |||
| bld/ | |||
| [Bb]in/ | |||
| [Oo]bj/ | |||
| [Oo]ut/ | |||
| [Ll]og/ | |||
| [Ll]ogs/ | |||
| # Visual Studio 2015/2017 cache/options directory | |||
| .vs/ | |||
| # Uncomment if you have tasks that create the project's static files in wwwroot | |||
| #wwwroot/ | |||
| # Visual Studio 2017 auto generated files | |||
| Generated\ Files/ | |||
| # MSTest test Results | |||
| [Tt]est[Rr]esult*/ | |||
| [Bb]uild[Ll]og.* | |||
| # NUnit | |||
| *.VisualState.xml | |||
| TestResult.xml | |||
| nunit-*.xml | |||
| # Build Results of an ATL Project | |||
| [Dd]ebugPS/ | |||
| [Rr]eleasePS/ | |||
| dlldata.c | |||
| # Benchmark Results | |||
| BenchmarkDotNet.Artifacts/ | |||
| # .NET Core | |||
| project.lock.json | |||
| project.fragment.lock.json | |||
| artifacts/ | |||
| # ASP.NET Scaffolding | |||
| ScaffoldingReadMe.txt | |||
| # StyleCop | |||
| StyleCopReport.xml | |||
| # Files built by Visual Studio | |||
| *_i.c | |||
| *_p.c | |||
| *_h.h | |||
| *.ilk | |||
| *.meta | |||
| *.obj | |||
| *.iobj | |||
| *.pch | |||
| *.pdb | |||
| *.ipdb | |||
| *.pgc | |||
| *.pgd | |||
| *.rsp | |||
| *.sbr | |||
| *.tlb | |||
| *.tli | |||
| *.tlh | |||
| *.tmp | |||
| *.tmp_proj | |||
| *_wpftmp.csproj | |||
| *.log | |||
| *.vspscc | |||
| *.vssscc | |||
| .builds | |||
| *.pidb | |||
| *.svclog | |||
| *.scc | |||
| # Chutzpah Test files | |||
| _Chutzpah* | |||
| # Visual C++ cache files | |||
| ipch/ | |||
| *.aps | |||
| *.ncb | |||
| *.opendb | |||
| *.opensdf | |||
| *.sdf | |||
| *.cachefile | |||
| *.VC.db | |||
| *.VC.VC.opendb | |||
| # Visual Studio profiler | |||
| *.psess | |||
| *.vsp | |||
| *.vspx | |||
| *.sap | |||
| # Visual Studio Trace Files | |||
| *.e2e | |||
| # TFS 2012 Local Workspace | |||
| $tf/ | |||
| # Guidance Automation Toolkit | |||
| *.gpState | |||
| # ReSharper is a .NET coding add-in | |||
| _ReSharper*/ | |||
| *.[Rr]e[Ss]harper | |||
| *.DotSettings.user | |||
| # TeamCity is a build add-in | |||
| _TeamCity* | |||
| # DotCover is a Code Coverage Tool | |||
| *.dotCover | |||
| # AxoCover is a Code Coverage Tool | |||
| .axoCover/* | |||
| !.axoCover/settings.json | |||
| # Coverlet is a free, cross platform Code Coverage Tool | |||
| coverage*.json | |||
| coverage*.xml | |||
| coverage*.info | |||
| # Visual Studio code coverage results | |||
| *.coverage | |||
| *.coveragexml | |||
| # NCrunch | |||
| _NCrunch_* | |||
| .*crunch*.local.xml | |||
| nCrunchTemp_* | |||
| # MightyMoose | |||
| *.mm.* | |||
| AutoTest.Net/ | |||
| # Web workbench (sass) | |||
| .sass-cache/ | |||
| # Installshield output folder | |||
| [Ee]xpress/ | |||
| # DocProject is a documentation generator add-in | |||
| DocProject/buildhelp/ | |||
| DocProject/Help/*.HxT | |||
| DocProject/Help/*.HxC | |||
| DocProject/Help/*.hhc | |||
| DocProject/Help/*.hhk | |||
| DocProject/Help/*.hhp | |||
| DocProject/Help/Html2 | |||
| DocProject/Help/html | |||
| # Click-Once directory | |||
| publish/ | |||
| # Publish Web Output | |||
| *.[Pp]ublish.xml | |||
| *.azurePubxml | |||
| # Note: Comment the next line if you want to checkin your web deploy settings, | |||
| # but database connection strings (with potential passwords) will be unencrypted | |||
| *.pubxml | |||
| *.publishproj | |||
| # Microsoft Azure Web App publish settings. Comment the next line if you want to | |||
| # checkin your Azure Web App publish settings, but sensitive information contained | |||
| # in these scripts will be unencrypted | |||
| PublishScripts/ | |||
| # NuGet Packages | |||
| *.nupkg | |||
| # NuGet Symbol Packages | |||
| *.snupkg | |||
| # The packages folder can be ignored because of Package Restore | |||
| **/[Pp]ackages/* | |||
| # except build/, which is used as an MSBuild target. | |||
| !**/[Pp]ackages/build/ | |||
| # Uncomment if necessary however generally it will be regenerated when needed | |||
| #!**/[Pp]ackages/repositories.config | |||
| # NuGet v3's project.json files produces more ignorable files | |||
| *.nuget.props | |||
| *.nuget.targets | |||
| # Microsoft Azure Build Output | |||
| csx/ | |||
| *.build.csdef | |||
| # Microsoft Azure Emulator | |||
| ecf/ | |||
| rcf/ | |||
| # Windows Store app package directories and files | |||
| AppPackages/ | |||
| BundleArtifacts/ | |||
| Package.StoreAssociation.xml | |||
| _pkginfo.txt | |||
| *.appx | |||
| *.appxbundle | |||
| *.appxupload | |||
| # Visual Studio cache files | |||
| # files ending in .cache can be ignored | |||
| *.[Cc]ache | |||
| # but keep track of directories ending in .cache | |||
| !?*.[Cc]ache/ | |||
| # Others | |||
| ClientBin/ | |||
| ~$* | |||
| *~ | |||
| *.dbmdl | |||
| *.dbproj.schemaview | |||
| *.jfm | |||
| *.pfx | |||
| *.publishsettings | |||
| orleans.codegen.cs | |||
| # Including strong name files can present a security risk | |||
| # (https://github.com/github/gitignore/pull/2483#issue-259490424) | |||
| #*.snk | |||
| # Since there are multiple workflows, uncomment next line to ignore bower_components | |||
| # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) | |||
| #bower_components/ | |||
| # RIA/Silverlight projects | |||
| Generated_Code/ | |||
| # Backup & report files from converting an old project file | |||
| # to a newer Visual Studio version. Backup files are not needed, | |||
| # because we have git ;-) | |||
| _UpgradeReport_Files/ | |||
| Backup*/ | |||
| UpgradeLog*.XML | |||
| UpgradeLog*.htm | |||
| ServiceFabricBackup/ | |||
| *.rptproj.bak | |||
| # SQL Server files | |||
| *.mdf | |||
| *.ldf | |||
| *.ndf | |||
| # Business Intelligence projects | |||
| *.rdl.data | |||
| *.bim.layout | |||
| *.bim_*.settings | |||
| *.rptproj.rsuser | |||
| *- [Bb]ackup.rdl | |||
| *- [Bb]ackup ([0-9]).rdl | |||
| *- [Bb]ackup ([0-9][0-9]).rdl | |||
| # Microsoft Fakes | |||
| FakesAssemblies/ | |||
| # GhostDoc plugin setting file | |||
| *.GhostDoc.xml | |||
| # Node.js Tools for Visual Studio | |||
| .ntvs_analysis.dat | |||
| node_modules/ | |||
| # Visual Studio 6 build log | |||
| *.plg | |||
| # Visual Studio 6 workspace options file | |||
| *.opt | |||
| # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) | |||
| *.vbw | |||
| # Visual Studio LightSwitch build output | |||
| **/*.HTMLClient/GeneratedArtifacts | |||
| **/*.DesktopClient/GeneratedArtifacts | |||
| **/*.DesktopClient/ModelManifest.xml | |||
| **/*.Server/GeneratedArtifacts | |||
| **/*.Server/ModelManifest.xml | |||
| _Pvt_Extensions | |||
| # Paket dependency manager | |||
| .paket/paket.exe | |||
| paket-files/ | |||
| # FAKE - F# Make | |||
| .fake/ | |||
| # CodeRush personal settings | |||
| .cr/personal | |||
| # Python Tools for Visual Studio (PTVS) | |||
| __pycache__/ | |||
| *.pyc | |||
| # Cake - Uncomment if you are using it | |||
| # tools/** | |||
| # !tools/packages.config | |||
| # Tabs Studio | |||
| *.tss | |||
| # Telerik's JustMock configuration file | |||
| *.jmconfig | |||
| # BizTalk build output | |||
| *.btp.cs | |||
| *.btm.cs | |||
| *.odx.cs | |||
| *.xsd.cs | |||
| # OpenCover UI analysis results | |||
| OpenCover/ | |||
| # Azure Stream Analytics local run output | |||
| ASALocalRun/ | |||
| # MSBuild Binary and Structured Log | |||
| *.binlog | |||
| # NVidia Nsight GPU debugger configuration file | |||
| *.nvuser | |||
| # MFractors (Xamarin productivity tool) working folder | |||
| .mfractor/ | |||
| # Local History for Visual Studio | |||
| .localhistory/ | |||
| # BeatPulse healthcheck temp database | |||
| healthchecksdb | |||
| # Backup folder for Package Reference Convert tool in Visual Studio 2017 | |||
| MigrationBackup/ | |||
| # Ionide (cross platform F# VS Code tools) working folder | |||
| .ionide/ | |||
| # Fody - auto-generated XML schema | |||
| FodyWeavers.xsd | |||
| @@ -0,0 +1,4 @@ | |||
| # Dockerfile | |||
| 用于存放Docker配置文件Dockerfile | |||
| @@ -0,0 +1,10 @@ | |||
| # Dependency | |||
| ## 简介 | |||
| 该目录用于存放程序所需的所有依赖文件,例如程序编译必须的 .lib 与 .a、程序运行所需的 .dll 与 .so、Docker 配置文件 Dockerfile、protobuf 源代码文件 .proto、shell 脚本 .sh,等等。 | |||
| ## 统一约定 | |||
| - 将对应后缀名的文件放入同名的子文件夹时,需要在子文件夹内再建立一个子文件夹,并在新建的文件夹内新建 README 介绍每个文件的用途。 | |||
| @@ -0,0 +1,4 @@ | |||
| # dll | |||
| 动态链接库 .dll 与 .so | |||
| @@ -0,0 +1,4 @@ | |||
| # lib | |||
| 静态链接库 .lib 与 .a | |||
| @@ -0,0 +1,283 @@ | |||
| --- | |||
| BasedOnStyle: Microsoft | |||
| Language: CSharp | |||
| AccessModifierOffset: -4 | |||
| AlignAfterOpenBracket: BlockIndent | |||
| AlignArrayOfStructures: None | |||
| AlignConsecutiveMacros: None | |||
| AlignConsecutiveAssignments: None | |||
| AlignConsecutiveBitFields: None | |||
| AlignConsecutiveDeclarations: None | |||
| AlignEscapedNewlines: Right | |||
| AlignOperands: Align | |||
| AlignTrailingComments: true | |||
| AllowAllArgumentsOnNextLine: true | |||
| AllowAllParametersOfDeclarationOnNextLine: true | |||
| AllowShortEnumsOnASingleLine: false | |||
| AllowShortBlocksOnASingleLine: Never | |||
| AllowShortCaseLabelsOnASingleLine: false | |||
| AllowShortFunctionsOnASingleLine: None | |||
| AllowShortLambdasOnASingleLine: All | |||
| AllowShortIfStatementsOnASingleLine: Never | |||
| AllowShortLoopsOnASingleLine: false | |||
| AlwaysBreakAfterDefinitionReturnType: None | |||
| AlwaysBreakAfterReturnType: None | |||
| AlwaysBreakBeforeMultilineStrings: false | |||
| AlwaysBreakTemplateDeclarations: MultiLine | |||
| AttributeMacros: | |||
| - __capability | |||
| BinPackArguments: false | |||
| BinPackParameters: false | |||
| BraceWrapping: | |||
| AfterCaseLabel: true | |||
| AfterClass: true | |||
| AfterControlStatement: Always | |||
| AfterEnum: true | |||
| AfterFunction: true | |||
| AfterNamespace: true | |||
| AfterObjCDeclaration: true | |||
| AfterStruct: true | |||
| AfterUnion: true | |||
| AfterExternBlock: true | |||
| BeforeCatch: true | |||
| BeforeElse: true | |||
| BeforeLambdaBody: true | |||
| BeforeWhile: false | |||
| IndentBraces: false | |||
| SplitEmptyFunction: true | |||
| SplitEmptyRecord: true | |||
| SplitEmptyNamespace: true | |||
| BreakBeforeBinaryOperators: None | |||
| BreakBeforeConceptDeclarations: true | |||
| BreakBeforeBraces: Custom | |||
| BreakInheritanceList: AfterColon | |||
| BreakBeforeTernaryOperators: false | |||
| BreakConstructorInitializersBeforeComma: false | |||
| BreakConstructorInitializers: AfterColon | |||
| BreakAfterJavaFieldAnnotations: false | |||
| BreakStringLiterals: false | |||
| ColumnLimit: 0 | |||
| CommentPragmas: '^ THU pragma:' | |||
| CompactNamespaces: false | |||
| ConstructorInitializerIndentWidth: 4 | |||
| ContinuationIndentWidth: 4 | |||
| Cpp11BracedListStyle: true | |||
| DeriveLineEnding: true | |||
| DerivePointerAlignment: false | |||
| DisableFormat: false | |||
| EmptyLineAfterAccessModifier: Never | |||
| EmptyLineBeforeAccessModifier: Always | |||
| ExperimentalAutoDetectBinPacking: false | |||
| PackConstructorInitializers: CurrentLine | |||
| FixNamespaceComments: true | |||
| ForEachMacros: | |||
| - foreach | |||
| - Q_FOREACH | |||
| - BOOST_FOREACH | |||
| IfMacros: | |||
| - KJ_IF_MAYBE | |||
| IncludeBlocks: Merge | |||
| IncludeCategories: | |||
| - Regex: '^"(llvm|llvm-c|clang|clang-c)/' | |||
| Priority: 2 | |||
| SortPriority: 0 | |||
| CaseSensitive: false | |||
| - Regex: '^(<|"(gtest|gmock|isl|json)/)' | |||
| Priority: 3 | |||
| SortPriority: 0 | |||
| CaseSensitive: false | |||
| - Regex: '.*' | |||
| Priority: 1 | |||
| SortPriority: 0 | |||
| CaseSensitive: false | |||
| IndentAccessModifiers: false | |||
| IndentCaseLabels: true | |||
| IndentCaseBlocks: true | |||
| IndentExternBlock: AfterExternBlock | |||
| IndentGotoLabels: true | |||
| IndentPPDirectives: None | |||
| IndentRequires: false | |||
| IndentWidth: 4 | |||
| IndentWrappedFunctionNames: true | |||
| InsertTrailingCommas: None | |||
| LambdaBodyIndentation: Signature | |||
| MaxEmptyLinesToKeep: 1 | |||
| NamespaceIndentation: All | |||
| PointerAlignment: Left | |||
| QualifierAlignment: Leave | |||
| ReferenceAlignment: Pointer | |||
| ReflowComments: true | |||
| SeparateDefinitionBlocks: Leave | |||
| SortIncludes: Never | |||
| SpaceAfterTemplateKeyword: false | |||
| SpaceBeforeAssignmentOperators: true | |||
| SpaceBeforeCaseColon: false | |||
| SpaceBeforeCtorInitializerColon: true | |||
| SpaceBeforeInheritanceColon: true | |||
| SpaceBeforeParens: ControlStatements | |||
| SpaceBeforeParensOptions: | |||
| AfterControlStatements: true | |||
| AfterForeachMacros: true | |||
| AfterFunctionDefinitionName: false | |||
| AfterFunctionDeclarationName: false | |||
| AfterIfMacros: true | |||
| AfterOverloadedOperator: false | |||
| BeforeNonEmptyParentheses: false | |||
| SpaceBeforeRangeBasedForLoopColon: true | |||
| SpacesInSquareBrackets: false | |||
| SpaceInEmptyBlock: true | |||
| SpaceInEmptyParentheses: false | |||
| SpacesBeforeTrailingComments: 2 | |||
| SpacesInAngles: Never | |||
| SpacesInCStyleCastParentheses: false | |||
| SpacesInConditionalStatement: false | |||
| SpacesInContainerLiterals: false | |||
| SpacesInLineCommentPrefix: | |||
| Minimum: 1 | |||
| SpacesInParentheses: false | |||
| SpaceBeforeSquareBrackets: false | |||
| Standard: Latest | |||
| TabWidth: 4 | |||
| UseTab: Never | |||
| --- | |||
| BasedOnStyle: Google | |||
| Language: Cpp | |||
| AccessModifierOffset: -4 | |||
| AlignAfterOpenBracket: BlockIndent | |||
| AlignArrayOfStructures: None | |||
| AlignConsecutiveMacros: None | |||
| AlignConsecutiveAssignments: None | |||
| AlignConsecutiveBitFields: None | |||
| AlignConsecutiveDeclarations: None | |||
| AlignEscapedNewlines: Right | |||
| AlignOperands: Align | |||
| AlignTrailingComments: true | |||
| AllowAllArgumentsOnNextLine: true | |||
| AllowAllParametersOfDeclarationOnNextLine: true | |||
| AllowShortEnumsOnASingleLine: false | |||
| AllowShortBlocksOnASingleLine: Never | |||
| AllowShortCaseLabelsOnASingleLine: false | |||
| AllowShortFunctionsOnASingleLine: None | |||
| AllowShortLambdasOnASingleLine: All | |||
| AllowShortIfStatementsOnASingleLine: Never | |||
| AllowShortLoopsOnASingleLine: false | |||
| AlwaysBreakAfterDefinitionReturnType: None | |||
| AlwaysBreakAfterReturnType: None | |||
| AlwaysBreakBeforeMultilineStrings: false | |||
| AlwaysBreakTemplateDeclarations: MultiLine | |||
| AttributeMacros: | |||
| - __capability | |||
| BinPackArguments: false | |||
| BinPackParameters: false | |||
| BraceWrapping: | |||
| AfterCaseLabel: true | |||
| AfterClass: true | |||
| AfterControlStatement: Always | |||
| AfterEnum: true | |||
| AfterFunction: true | |||
| AfterNamespace: true | |||
| AfterObjCDeclaration: true | |||
| AfterStruct: true | |||
| AfterUnion: true | |||
| AfterExternBlock: true | |||
| BeforeCatch: true | |||
| BeforeElse: true | |||
| BeforeLambdaBody: true | |||
| BeforeWhile: false | |||
| IndentBraces: false | |||
| SplitEmptyFunction: true | |||
| SplitEmptyRecord: true | |||
| SplitEmptyNamespace: true | |||
| BreakBeforeBinaryOperators: None | |||
| BreakBeforeConceptDeclarations: true | |||
| BreakBeforeBraces: Custom | |||
| BreakInheritanceList: AfterColon | |||
| BreakBeforeTernaryOperators: false | |||
| BreakConstructorInitializersBeforeComma: false | |||
| BreakConstructorInitializers: AfterColon | |||
| BreakAfterJavaFieldAnnotations: false | |||
| BreakStringLiterals: false | |||
| ColumnLimit: 0 | |||
| CommentPragmas: '^ THU pragma:' | |||
| CompactNamespaces: false | |||
| ConstructorInitializerIndentWidth: 4 | |||
| ContinuationIndentWidth: 4 | |||
| Cpp11BracedListStyle: true | |||
| DeriveLineEnding: true | |||
| DerivePointerAlignment: false | |||
| DisableFormat: false | |||
| EmptyLineAfterAccessModifier: Never | |||
| EmptyLineBeforeAccessModifier: Always | |||
| ExperimentalAutoDetectBinPacking: false | |||
| PackConstructorInitializers: CurrentLine | |||
| FixNamespaceComments: true | |||
| ForEachMacros: | |||
| - foreach | |||
| - Q_FOREACH | |||
| - BOOST_FOREACH | |||
| IfMacros: | |||
| - KJ_IF_MAYBE | |||
| IncludeBlocks: Merge | |||
| IncludeCategories: | |||
| - Regex: '^"(llvm|llvm-c|clang|clang-c)/' | |||
| Priority: 2 | |||
| SortPriority: 0 | |||
| CaseSensitive: false | |||
| - Regex: '^(<|"(gtest|gmock|isl|json)/)' | |||
| Priority: 3 | |||
| SortPriority: 0 | |||
| CaseSensitive: false | |||
| - Regex: '.*' | |||
| Priority: 1 | |||
| SortPriority: 0 | |||
| CaseSensitive: false | |||
| IndentAccessModifiers: false | |||
| IndentCaseLabels: true | |||
| IndentCaseBlocks: true | |||
| IndentExternBlock: AfterExternBlock | |||
| IndentGotoLabels: true | |||
| IndentPPDirectives: None | |||
| IndentRequires: false | |||
| IndentWidth: 4 | |||
| IndentWrappedFunctionNames: true | |||
| InsertTrailingCommas: None | |||
| LambdaBodyIndentation: Signature | |||
| MaxEmptyLinesToKeep: 1 | |||
| NamespaceIndentation: All | |||
| PointerAlignment: Left | |||
| QualifierAlignment: Leave | |||
| ReferenceAlignment: Pointer | |||
| ReflowComments: true | |||
| SeparateDefinitionBlocks: Leave | |||
| SortIncludes: Never | |||
| SpaceAfterTemplateKeyword: false | |||
| SpaceBeforeAssignmentOperators: true | |||
| SpaceBeforeCaseColon: false | |||
| SpaceBeforeCtorInitializerColon: true | |||
| SpaceBeforeInheritanceColon: true | |||
| SpaceBeforeParens: ControlStatements | |||
| SpaceBeforeParensOptions: | |||
| AfterControlStatements: true | |||
| AfterForeachMacros: true | |||
| AfterFunctionDefinitionName: false | |||
| AfterFunctionDeclarationName: false | |||
| AfterIfMacros: true | |||
| AfterOverloadedOperator: false | |||
| BeforeNonEmptyParentheses: false | |||
| SpaceBeforeRangeBasedForLoopColon: true | |||
| SpacesInSquareBrackets: false | |||
| SpaceInEmptyBlock: true | |||
| SpaceInEmptyParentheses: false | |||
| SpacesBeforeTrailingComments: 2 | |||
| SpacesInAngles: Never | |||
| SpacesInCStyleCastParentheses: false | |||
| SpacesInConditionalStatement: false | |||
| SpacesInContainerLiterals: false | |||
| SpacesInLineCommentPrefix: | |||
| Minimum: 1 | |||
| SpacesInParentheses: false | |||
| SpaceBeforeSquareBrackets: false | |||
| Standard: c++17 | |||
| TabWidth: 4 | |||
| UseTab: Never | |||
| @@ -0,0 +1,125 @@ | |||
| // Message2Client | |||
| syntax = "proto3"; | |||
| package protobuf; | |||
| import "MessageType.proto"; | |||
| import "Message2Server.proto"; | |||
| message MessageOfHuman | |||
| { | |||
| int32 x = 1; | |||
| int32 y = 2; | |||
| int32 speed = 3; | |||
| int32 life = 4; // 本次未倒地前的血量,也即还可以受的伤害 | |||
| int32 hanged_time = 5; // 被挂上的次数 | |||
| double time_until_skill_available = 6; | |||
| PlaceType place = 7; | |||
| PropType prop = 8; | |||
| HumanType human_type = 9; | |||
| int64 guid = 10; | |||
| bool on_chair = 11; // 是否被挂 | |||
| double chair_time = 12; // 被挂的时间 | |||
| bool on_ground = 13; // 是否倒地 | |||
| double ground_time = 14; // 倒地时间 | |||
| int64 player_id = 15; | |||
| int32 view_range = 16; // 视野距离 | |||
| repeated HumanBuffType buff = 17; | |||
| } | |||
| message MessageOfButcher | |||
| { | |||
| int32 x = 1; | |||
| int32 y = 2; | |||
| int32 speed = 3; | |||
| int32 damage = 4; | |||
| double time_until_skill_available = 5; | |||
| PlaceType place = 6; | |||
| PropType prop = 7; | |||
| ButcherType butcher_type = 8; | |||
| int64 guid = 9; | |||
| bool movable = 10; // 是否进入了攻击后摇 | |||
| int64 playerID = 11; | |||
| int32 view_range = 12; // 视野距离 | |||
| repeated ButcherBuffType buff = 13; | |||
| } | |||
| message MessageOfProp // 可拾取道具的信息 | |||
| { | |||
| PropType type = 1; | |||
| int32 x = 2; | |||
| int32 y = 3; | |||
| double facing_direction = 4; | |||
| int64 guid = 5; | |||
| PlaceType place = 6; | |||
| int32 size = 7; | |||
| bool is_moving = 8; | |||
| } | |||
| message MessageOfPickedProp //for Unity,直接继承自THUAI5 | |||
| { | |||
| PropType type = 1; | |||
| int32 x = 2; | |||
| int32 y = 3; | |||
| double facing_direction = 4; | |||
| int64 mapping_id = 5; | |||
| } | |||
| message MessageOfMap | |||
| { | |||
| message Row | |||
| { | |||
| repeated PlaceType col = 1; | |||
| } | |||
| repeated Row row = 2; | |||
| } | |||
| message MessageToClient | |||
| { | |||
| repeated MessageOfHuman human_message = 1; | |||
| repeated MessageOfButcher butcher_message = 2; // 是否真正repeated待定 | |||
| repeated MessageOfProp prop_message = 3; | |||
| MessageOfMap map_massage = 4; | |||
| } | |||
| message MoveRes // 如果打算设计撞墙保留平行速度分量,且需要返回值则可用这个(大概没啥用) | |||
| { | |||
| int64 actual_speed = 1; | |||
| double actual_angle = 2; | |||
| } | |||
| message BoolRes // 用于只需要判断执行操作是否成功的行为,如捡起道具、使用道具 | |||
| { | |||
| bool act_success = 1; | |||
| } | |||
| message MsgRes // 用于获取队友发来的消息 | |||
| { | |||
| bool have_message = 1; // 是否有待接收的消息 | |||
| int64 from_player_id = 2; | |||
| string message_received = 3; | |||
| } | |||
| service AvailableService | |||
| { | |||
| rpc TryConnection(IDMsg) returns(BoolRes); | |||
| // 游戏开局调用一次的服务 | |||
| rpc AddPlayer(PlayerMsg) returns(stream MessageToClient); // 连接上后等待游戏开始,server会定时通过该服务向所有client发送消息。 | |||
| // 游戏过程中玩家执行操作的服务 | |||
| rpc Move(MoveMsg) returns (MoveRes); | |||
| rpc PickProp(PickMsg) returns (BoolRes); | |||
| rpc UseProp(IDMsg) returns (BoolRes); | |||
| rpc UseSkill(IDMsg) returns (BoolRes); | |||
| rpc SendMessage(SendMsg) returns (BoolRes); | |||
| rpc HaveMessage(IDMsg) returns (BoolRes); | |||
| rpc GetMessage(IDMsg) returns (MsgRes); | |||
| rpc FixMachine(stream IDMsg) returns (stream BoolRes); // 若正常修复且未被打断则返回修复成功,位置错误/被打断则返回修复失败,下同 | |||
| rpc SaveHuman(stream IDMsg) returns (stream BoolRes); | |||
| rpc Attack (AttackMsg) returns (BoolRes); | |||
| rpc CarryHuman (IDMsg) returns (BoolRes); | |||
| rpc ReleaseHuman (IDMsg) returns (BoolRes); | |||
| rpc HangHuman (IDMsg) returns (BoolRes); | |||
| rpc Escape (IDMsg) returns (BoolRes); | |||
| } | |||
| @@ -0,0 +1,62 @@ | |||
| // Message2Server | |||
| syntax = "proto3"; | |||
| package protobuf; | |||
| import "MessageType.proto"; | |||
| message PlayerMsg | |||
| { | |||
| int64 player_id = 1; | |||
| PlayerType player_type = 2; | |||
| oneof job_type | |||
| { | |||
| HumanType human_type = 3; | |||
| ButcherType butcher_type = 4; | |||
| } | |||
| } | |||
| message MoveMsg | |||
| { | |||
| int64 player_id = 1; | |||
| double angle = 2; | |||
| int64 time_in_milliseconds = 3; | |||
| } | |||
| message PickMsg | |||
| { | |||
| int64 player_id = 1; | |||
| PropType prop_type = 2; | |||
| } | |||
| message SendMsg | |||
| { | |||
| int64 player_id = 1; | |||
| int64 to_player_id = 2; | |||
| string message = 3; | |||
| } | |||
| message AttackMsg | |||
| { | |||
| int64 player_id = 1; | |||
| double angle = 2; | |||
| } | |||
| message IDMsg | |||
| { | |||
| int64 player_id = 1; | |||
| } | |||
| // 基本继承于THUAI5,为了使发送的信息尽可能不被浪费,暂定不发这类大包。 | |||
| // message MessageToServer | |||
| // { | |||
| // MessageType messageType = 1; | |||
| // int64 playerID = 2; // 消息发送者的playerID | |||
| // PlayerType playerType = 3; | |||
| // HumanType humanType= 4; | |||
| // ButcherType butcherType = 5; | |||
| // double angle = 6; // messageType为Move, Attack时的角度 | |||
| // PropType propType = 7; // messageType为PickProp时要捡起的道具类型,防止多个道具堆叠时出现问题 | |||
| // int64 timeInMilliseconds = 8;//时间参数 | |||
| // int64 ToPlayerID = 9; // messageType为Send时要发送的对象的ID | |||
| // string message = 10; // messageType为Send时发送的消息内容 | |||
| // } | |||
| @@ -0,0 +1,110 @@ | |||
| // MessageType | |||
| syntax = "proto3"; | |||
| package protobuf; | |||
| enum PlaceType // 地图中的所有物件类型 | |||
| { | |||
| NULL_PLACE_TYPE = 0; | |||
| // 地图情况,其中Gate是总体的大门,HiddenGate是地窖 | |||
| LAND = 1; | |||
| WALL = 2; | |||
| GRASS = 3; | |||
| MACHINE = 4; | |||
| GATE = 5; | |||
| HIDDEN_GATE = 6; | |||
| // 待补充有特殊效果的地形 | |||
| } | |||
| enum ShapeType // 形状类型 | |||
| { | |||
| NULL_SHAPE_TYPE = 0; | |||
| CIRCLE = 1; // 人类、屠夫、可拾取道具等为圆形 | |||
| SQUARE = 2; // 地形均为方形 | |||
| } | |||
| enum PropType // 地图中的可拾取道具类型 | |||
| { | |||
| NULL_PROP_TYPE = 0; | |||
| PTYPE1 = 1; | |||
| PTYPE2 = 2; | |||
| PTYPE3 = 3; | |||
| PTYPE4 = 4; | |||
| } | |||
| enum HumanBuffType // 人类可用的增益效果类型 | |||
| { | |||
| NULL_HBUFF_TYPE = 0; | |||
| HBUFFTYPE1 = 1; | |||
| HBUFFTYPE2 = 2; | |||
| HBUFFTYPE3 = 3; | |||
| HBUFFTYPE4 = 4; | |||
| } | |||
| enum ButcherBuffType // 屠夫可用的增益效果类型 | |||
| { | |||
| NULL_BBUFF_TYPE = 0; | |||
| BBUFFTYPE1 = 1; | |||
| BBUFFTYPE2 = 2; | |||
| BBUFFTYPE3 = 3; | |||
| BBUFFTYPE4 = 4; | |||
| } | |||
| // 特别说明:由于Human阵营和Butcher阵营有显著的隔离,且暂定职业、主动技能和被动效果相互绑定,故不按照THUAI5的方式区分ActiveSkillType和PassiveSkillType,而是选择了按照阵营来给不同阵营赋予不同的职业(及技能)。 | |||
| enum PlayerType | |||
| { | |||
| NULL_PLAYER_TYPE = 0; | |||
| HUMAN_PLAYER = 1; | |||
| BUTCHER_PLAYER = 2; | |||
| } | |||
| enum HumanType | |||
| { | |||
| NULL_HUMAN_TYPE = 0; | |||
| HUMANTYPE1 = 1; | |||
| HUMANTYPE2 = 2; | |||
| HUMANTYPE3 = 3; | |||
| HUMANTYPE4 = 4; | |||
| } | |||
| enum ButcherType | |||
| { | |||
| NULL_BUTCHER_TYPE = 0; | |||
| BUTCHERTYPE1 = 1; | |||
| BUTCHERTYPE2 = 2; | |||
| BUTCHERTYPE3 = 3; | |||
| BUTCHERTYPE4 = 4; | |||
| } | |||
| // 取消了大包之后,MessageType的枚举是否有必要保留还有待商榷 | |||
| // enum MessageType | |||
| // { | |||
| // // 公共信息类型 | |||
| // Move = 0; | |||
| // PickProp = 1; | |||
| // UseProp = 2; | |||
| // UseSkill = 3; | |||
| // Map = 4; | |||
| // Send = 5; | |||
| // // 人类限定信息类型 | |||
| // FixMachine = 6; | |||
| // SaveHuman = 7; | |||
| // // 屠夫限定信息类型 | |||
| // Attack = 8; | |||
| // CarryHuman = 9; | |||
| // ReleaseHuman = 10; | |||
| // HangHuman = 11; | |||
| // // 游戏相关信息类型 | |||
| // AddPlayer = 12; | |||
| // InvalidPlayer = 13; | |||
| // ValidPlayer = 14; | |||
| // StartGame = 15; | |||
| // Gaming = 16; | |||
| // EndGame = 17; | |||
| // } | |||
| @@ -0,0 +1,3 @@ | |||
| # Proto | |||
| 该目录用于存放需要用到的`.proto`文件 | |||
| @@ -0,0 +1,10 @@ | |||
| protoc Message2Clients.proto --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` | |||
| protoc Message2Clients.proto --cpp_out=. | |||
| protoc MessageType.proto --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` | |||
| protoc MessageType.proto --cpp_out=. | |||
| protoc Message2Server.proto --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` | |||
| protoc Message2Server.proto --cpp_out=. | |||
| chmod -R 755 ./ | |||
| ./format.sh | |||
| mv -f ./*.h ../../CAPI/proto | |||
| mv -f ./*.cc ../../CAPI/proto | |||
| @@ -0,0 +1,75 @@ | |||
| clang-format --version | |||
| if [ $? -eq 0 ] | |||
| then | |||
| for i in {1..10} | |||
| do | |||
| find . -iname "*.cs" \ | |||
| -or -iname "*.c" \ | |||
| -or -iname "*.h" \ | |||
| -or -iname "*.C" \ | |||
| -or -iname "*.H" \ | |||
| -or -iname "*.cpp" \ | |||
| -or -iname "*.hpp" \ | |||
| -or -iname "*.cc" \ | |||
| -or -iname "*.hh" \ | |||
| -or -iname "*.c++" \ | |||
| -or -iname "*.h++" \ | |||
| -or -iname "*.cxx" \ | |||
| -or -iname "*.hxx" \ | |||
| -or -iname "*.i" \ | |||
| -or -iname "*.ixx" \ | |||
| -or -iname "*.ipp" \ | |||
| -or -iname "*.i++" \ | |||
| | xargs clang-format -i | |||
| done | |||
| fi | |||
| clang-format-15 --version | |||
| if [ $? -eq 0 ] | |||
| then | |||
| for i in {1..10} | |||
| do | |||
| find . -iname "*.cs" \ | |||
| -or -iname "*.c" \ | |||
| -or -iname "*.h" \ | |||
| -or -iname "*.C" \ | |||
| -or -iname "*.H" \ | |||
| -or -iname "*.cpp" \ | |||
| -or -iname "*.hpp" \ | |||
| -or -iname "*.cc" \ | |||
| -or -iname "*.hh" \ | |||
| -or -iname "*.c++" \ | |||
| -or -iname "*.h++" \ | |||
| -or -iname "*.cxx" \ | |||
| -or -iname "*.hxx" \ | |||
| -or -iname "*.i" \ | |||
| -or -iname "*.ixx" \ | |||
| -or -iname "*.ipp" \ | |||
| -or -iname "*.i++" \ | |||
| | xargs clang-format-15 -i | |||
| done | |||
| fi | |||
| clang-format-14 --version | |||
| if [ $? -eq 0 ] | |||
| then | |||
| for i in {1..10} | |||
| do | |||
| find . -iname "*.cs" \ | |||
| -or -iname "*.c" \ | |||
| -or -iname "*.h" \ | |||
| -or -iname "*.C" \ | |||
| -or -iname "*.H" \ | |||
| -or -iname "*.cpp" \ | |||
| -or -iname "*.hpp" \ | |||
| -or -iname "*.cc" \ | |||
| -or -iname "*.hh" \ | |||
| -or -iname "*.c++" \ | |||
| -or -iname "*.h++" \ | |||
| -or -iname "*.cxx" \ | |||
| -or -iname "*.hxx" \ | |||
| -or -iname "*.i" \ | |||
| -or -iname "*.ixx" \ | |||
| -or -iname "*.ipp" \ | |||
| -or -iname "*.i++" \ | |||
| | xargs clang-format-14 -i | |||
| done | |||
| fi | |||
| @@ -0,0 +1,4 @@ | |||
| # Shell | |||
| 本目录用于存放程序所需的shell脚本 | |||
| @@ -0,0 +1,21 @@ | |||
| for i in {1..10} | |||
| do | |||
| find . -iname "*.cs" \ | |||
| -or -iname "*.c" \ | |||
| -or -iname "*.h" \ | |||
| -or -iname "*.C" \ | |||
| -or -iname "*.H" \ | |||
| -or -iname "*.cpp" \ | |||
| -or -iname "*.hpp" \ | |||
| -or -iname "*.cc" \ | |||
| -or -iname "*.hh" \ | |||
| -or -iname "*.c++" \ | |||
| -or -iname "*.h++" \ | |||
| -or -iname "*.cxx" \ | |||
| -or -iname "*.hxx" \ | |||
| -or -iname "*.i" \ | |||
| -or -iname "*.ixx" \ | |||
| -or -iname "*.ipp" \ | |||
| -or -iname "*.i++" \ | |||
| | xargs clang-format -i | |||
| done | |||
| @@ -0,0 +1,3 @@ | |||
| # Resource | |||
| 本目录用于存放主目录 README 的所有资源,**目录名称及目录内文件禁止更改**。 | |||