diff --git a/mprpc/.vscode/configurationCache.log b/mprpc/.vscode/configurationCache.log new file mode 100644 index 0000000..bab9054 --- /dev/null +++ b/mprpc/.vscode/configurationCache.log @@ -0,0 +1 @@ +{"buildTargets":[],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}} \ No newline at end of file diff --git a/mprpc/.vscode/dryrun.log b/mprpc/.vscode/dryrun.log new file mode 100644 index 0000000..921a7da --- /dev/null +++ b/mprpc/.vscode/dryrun.log @@ -0,0 +1,6 @@ +make --dry-run --always-make --keep-going --print-directory +make: Entering directory '/home/ubuntu/mprpc' +make: Leaving directory '/home/ubuntu/mprpc' + +make: *** No targets specified and no makefile found. Stop. + diff --git a/mprpc/.vscode/settings.json b/mprpc/.vscode/settings.json new file mode 100644 index 0000000..f7fe474 --- /dev/null +++ b/mprpc/.vscode/settings.json @@ -0,0 +1,58 @@ +{ + "makefile.extensionOutputFolder": "./.vscode", + "files.associations": { + "iostream": "cpp", + "string": "cpp", + "array": "cpp", + "atomic": "cpp", + "bit": "cpp", + "*.tcc": "cpp", + "cctype": "cpp", + "chrono": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "condition_variable": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "map": "cpp", + "set": "cpp", + "unordered_map": "cpp", + "unordered_set": "cpp", + "vector": "cpp", + "exception": "cpp", + "fstream": "cpp", + "functional": "cpp", + "initializer_list": "cpp", + "iosfwd": "cpp", + "istream": "cpp", + "limits": "cpp", + "memory": "cpp", + "mutex": "cpp", + "new": "cpp", + "optional": "cpp", + "ostream": "cpp", + "ratio": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "thread": "cpp", + "type_traits": "cpp", + "tuple": "cpp", + "typeinfo": "cpp", + "utility": "cpp", + "bitset": "cpp", + "complex": "cpp", + "list": "cpp", + "typeindex": "cpp", + "variant": "cpp" + } +} \ No newline at end of file diff --git a/mprpc/.vscode/targets.log b/mprpc/.vscode/targets.log new file mode 100644 index 0000000..1c8ec2f --- /dev/null +++ b/mprpc/.vscode/targets.log @@ -0,0 +1,232 @@ +make all --print-data-base --no-builtin-variables --no-builtin-rules --question +make: *** No rule to make target 'all'. Stop. + +# GNU Make 4.2.1 +# Built for x86_64-pc-linux-gnu +# Copyright (C) 1988-2016 Free Software Foundation, Inc. +# License GPLv3+: GNU GPL version 3 or later +# This is free software: you are free to change and redistribute it. +# There is NO WARRANTY, to the extent permitted by law. + +# Make data base, printed on Sun Jul 24 23:37:30 2022 + +# Variables + +# automatic + first log message! +21:40:10 => /home/ubuntu/mprpc/example/callee/friendservice.cc:main:51 diff --git a/mprpc/bin/2022-7-11-log.txt b/mprpc/bin/2022-7-11-log.txt new file mode 100644 index 0000000..1b92ed7 --- /dev/null +++ b/mprpc/bin/2022-7-11-log.txt @@ -0,0 +1,2 @@ +22:6:1 => [info]service_name: FriendServiceRpc +22:6:1 => [info]method_name: GetFriendsList diff --git a/mprpc/bin/2022-7-12-log.txt b/mprpc/bin/2022-7-12-log.txt new file mode 100644 index 0000000..743e9ca --- /dev/null +++ b/mprpc/bin/2022-7-12-log.txt @@ -0,0 +1,46 @@ +14:50:52 => [info]service_name: FriendServiceRpc +14:50:52 => [info]method_name: GetFriendsList +14:59:21 => [info]service_name: FriendServiceRpc +14:59:21 => [info]method_name: GetFriendsList +15:2:33 => [info]service_name: FriendServiceRpc +15:2:33 => [info]method_name: GetFriendsList +15:4:10 => [info]service_name: FriendServiceRpc +15:4:10 => [info]method_name: GetFriendsList +15:17:21 => [info]service_name: FriendServiceRpc +15:17:21 => [info]method_name: GetFriendsList +15:28:2 => [info]ddddd +15:28:2 => [info]ddddd +15:28:2 => [info]service_name: FriendServiceRpc +15:28:2 => [info]method_name: GetFriendsList +15:31:18 => [info]ddddd +15:31:18 => [info]ddddd +15:31:18 => [info]service_name: FriendServiceRpc +15:31:18 => [info]method_name: GetFriendsList +15:35:2 => [info]ddddd +15:35:2 => [info]ddddd +15:35:2 => [info]service_name: FriendServiceRpc +15:35:2 => [info]method_name: GetFriendsList +16:2:42 => [info]ddddd +16:2:42 => [info]ddddd +16:2:42 => [info]service_name: FriendServiceRpc +16:2:42 => [info]method_name: GetFriendsList +16:11:0 => [info]ddddd +16:11:0 => [info]ddddd +16:11:0 => [info]service_name: FriendServiceRpc +16:11:0 => [info]method_name: GetFriendsList +16:13:33 => [info]ddddd +16:13:33 => [info]ddddd +16:13:33 => [info]service_name: FriendServiceRpc +16:13:33 => [info]method_name: GetFriendsList +16:18:44 => [info]ddddd +16:18:44 => [info]ddddd +16:18:44 => [info]service_name: FriendServiceRpc +16:18:44 => [info]method_name: GetFriendsList +16:20:3 => [info]ddddd +16:20:3 => [info]ddddd +16:20:3 => [info]service_name: FriendServiceRpc +16:20:3 => [info]method_name: GetFriendsList +16:23:5 => [info]ddddd +16:23:5 => [info]ddddd +16:23:5 => [info]service_name: FriendServiceRpc +16:23:5 => [info]method_name: GetFriendsList diff --git a/mprpc/bin/consumer b/mprpc/bin/consumer new file mode 100755 index 0000000..ed0c7f9 Binary files /dev/null and b/mprpc/bin/consumer differ diff --git a/mprpc/bin/provider b/mprpc/bin/provider new file mode 100755 index 0000000..e0a2ef2 Binary files /dev/null and b/mprpc/bin/provider differ diff --git a/mprpc/bin/test.conf b/mprpc/bin/test.conf new file mode 100644 index 0000000..dd5b1f7 --- /dev/null +++ b/mprpc/bin/test.conf @@ -0,0 +1,8 @@ +# rpc节点的ip地址 +rpcserverip=127.0.0.1 +# rpc节点的port端口号 +rpcserverport=8000 +# zk的ip地址 +zookeeperip=127.0.0.1 +# zk的port端口号 +zookeeperport=2181 diff --git a/mprpc/build/.cmake/api/v1/query/client-vscode/query.json b/mprpc/build/.cmake/api/v1/query/client-vscode/query.json new file mode 100644 index 0000000..82bb964 --- /dev/null +++ b/mprpc/build/.cmake/api/v1/query/client-vscode/query.json @@ -0,0 +1 @@ +{"requests":[{"kind":"cache","version":2},{"kind":"codemodel","version":2},{"kind":"toolchains","version":1},{"kind":"cmakeFiles","version":1}]} \ No newline at end of file diff --git a/mprpc/build/.cmake/api/v1/reply/cache-v2-51b1aa517f98a992a992.json b/mprpc/build/.cmake/api/v1/reply/cache-v2-51b1aa517f98a992a992.json new file mode 100644 index 0000000..d625f27 --- /dev/null +++ b/mprpc/build/.cmake/api/v1/reply/cache-v2-51b1aa517f98a992a992.json @@ -0,0 +1,1167 @@ +{ + "entries" : + [ + { + "name" : "CMAKE_ADDR2LINE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/addr2line" + }, + { + "name" : "CMAKE_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/ar" + }, + { + "name" : "CMAKE_BUILD_TYPE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "STRING", + "value" : "Debug" + }, + { + "name" : "CMAKE_CACHEFILE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "This is the directory where this CMakeCache.txt was created" + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/mprpc/build" + }, + { + "name" : "CMAKE_CACHE_MAJOR_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Major version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "3" + }, + { + "name" : "CMAKE_CACHE_MINOR_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Minor version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "16" + }, + { + "name" : "CMAKE_CACHE_PATCH_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Patch version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "3" + }, + { + "name" : "CMAKE_COLOR_MAKEFILE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Enable/Disable color output during build." + } + ], + "type" : "BOOL", + "value" : "ON" + }, + { + "name" : "CMAKE_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to CMake executable." + } + ], + "type" : "INTERNAL", + "value" : "/usr/bin/cmake" + }, + { + "name" : "CMAKE_CPACK_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to cpack program executable." + } + ], + "type" : "INTERNAL", + "value" : "/usr/bin/cpack" + }, + { + "name" : "CMAKE_CTEST_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to ctest program executable." + } + ], + "type" : "INTERNAL", + "value" : "/usr/bin/ctest" + }, + { + "name" : "CMAKE_CXX_COMPILER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/g++" + }, + { + "name" : "CMAKE_CXX_COMPILER_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/gcc-ar-9" + }, + { + "name" : "CMAKE_CXX_COMPILER_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/gcc-ranlib-9" + }, + { + "name" : "CMAKE_CXX_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_CXX_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "-g" + }, + { + "name" : "CMAKE_CXX_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "-Os -DNDEBUG" + }, + { + "name" : "CMAKE_CXX_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "-O3 -DNDEBUG" + }, + { + "name" : "CMAKE_CXX_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "-O2 -g -DNDEBUG" + }, + { + "name" : "CMAKE_C_COMPILER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/gcc" + }, + { + "name" : "CMAKE_C_COMPILER_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/gcc-ar-9" + }, + { + "name" : "CMAKE_C_COMPILER_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/gcc-ranlib-9" + }, + { + "name" : "CMAKE_C_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "-g" + }, + { + "name" : "CMAKE_C_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "-Os -DNDEBUG" + }, + { + "name" : "CMAKE_C_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "-O3 -DNDEBUG" + }, + { + "name" : "CMAKE_C_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "-O2 -g -DNDEBUG" + }, + { + "name" : "CMAKE_DLLTOOL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "CMAKE_DLLTOOL-NOTFOUND" + }, + { + "name" : "CMAKE_EXECUTABLE_FORMAT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Executable file format" + } + ], + "type" : "INTERNAL", + "value" : "ELF" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXPORT_COMPILE_COMMANDS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "No help, variable specified on the command line." + } + ], + "type" : "BOOL", + "value" : "TRUE" + }, + { + "name" : "CMAKE_EXTRA_GENERATOR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of external makefile project generator." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator." + } + ], + "type" : "INTERNAL", + "value" : "Unix Makefiles" + }, + { + "name" : "CMAKE_GENERATOR_INSTANCE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Generator instance identifier." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR_PLATFORM", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator platform." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR_TOOLSET", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator toolset." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_HOME_DIRECTORY", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Source directory with the top level CMakeLists.txt file for this project" + } + ], + "type" : "INTERNAL", + "value" : "/home/ubuntu/mprpc" + }, + { + "name" : "CMAKE_INSTALL_PREFIX", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Install path prefix, prepended onto install directories." + } + ], + "type" : "PATH", + "value" : "/usr/local" + }, + { + "name" : "CMAKE_INSTALL_SO_NO_EXE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Install .so files without execute permission." + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_LINKER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/ld" + }, + { + "name" : "CMAKE_MAKE_PROGRAM", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/make" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_NM", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/nm" + }, + { + "name" : "CMAKE_NUMBER_OF_MAKEFILES", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "number of local generators" + } + ], + "type" : "INTERNAL", + "value" : "5" + }, + { + "name" : "CMAKE_OBJCOPY", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/objcopy" + }, + { + "name" : "CMAKE_OBJDUMP", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/objdump" + }, + { + "name" : "CMAKE_PLATFORM_INFO_INITIALIZED", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Platform information initialized" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_PROJECT_DESCRIPTION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "" + }, + { + "name" : "CMAKE_PROJECT_HOMEPAGE_URL", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "" + }, + { + "name" : "CMAKE_PROJECT_NAME", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "mprpc" + }, + { + "name" : "CMAKE_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/ranlib" + }, + { + "name" : "CMAKE_READELF", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/readelf" + }, + { + "name" : "CMAKE_ROOT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to CMake installation." + } + ], + "type" : "INTERNAL", + "value" : "/usr/share/cmake-3.16" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SKIP_INSTALL_RPATH", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If set, runtime paths are not added when installing shared libraries, but are added when building." + } + ], + "type" : "BOOL", + "value" : "NO" + }, + { + "name" : "CMAKE_SKIP_RPATH", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If set, runtime paths are not added when using shared libraries." + } + ], + "type" : "BOOL", + "value" : "NO" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STRIP", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "/usr/bin/strip" + }, + { + "name" : "CMAKE_UNAME", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "uname command" + } + ], + "type" : "INTERNAL", + "value" : "/usr/bin/uname" + }, + { + "name" : "CMAKE_VERBOSE_MAKEFILE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo." + } + ], + "type" : "BOOL", + "value" : "FALSE" + }, + { + "name" : "mprpc_BINARY_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "/home/ubuntu/mprpc/build" + }, + { + "name" : "mprpc_LIB_DEPENDS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Dependencies for the target" + } + ], + "type" : "STATIC", + "value" : "general;muduo_net;general;muduo_base;general;pthread;general;zookeeper_mt;" + }, + { + "name" : "mprpc_SOURCE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "/home/ubuntu/mprpc" + } + ], + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } +} diff --git a/mprpc/build/.cmake/api/v1/reply/cmakeFiles-v1-afc9087a8f7e01a82bfd.json b/mprpc/build/.cmake/api/v1/reply/cmakeFiles-v1-afc9087a8f7e01a82bfd.json new file mode 100644 index 0000000..1a86159 --- /dev/null +++ b/mprpc/build/.cmake/api/v1/reply/cmakeFiles-v1-afc9087a8f7e01a82bfd.json @@ -0,0 +1,158 @@ +{ + "inputs" : + [ + { + "path" : "CMakeLists.txt" + }, + { + "isGenerated" : true, + "path" : "build/CMakeFiles/3.16.3/CMakeSystem.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/CMakeSystemSpecificInitialize.cmake" + }, + { + "isGenerated" : true, + "path" : "build/CMakeFiles/3.16.3/CMakeCCompiler.cmake" + }, + { + "isGenerated" : true, + "path" : "build/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/CMakeSystemSpecificInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/CMakeGenericSystem.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/CMakeInitializeConfigs.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/Platform/Linux.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/Platform/UnixPaths.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/CMakeCInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/CMakeLanguageInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/Compiler/GNU-C.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/Compiler/GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/Internal/CMakeCheckCompilerFlag.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/Platform/Linux-GNU-C.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/Platform/Linux-GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/CMakeCommonLanguageInclude.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/CMakeCXXInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/CMakeLanguageInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/Compiler/GNU-CXX.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/Compiler/GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/Platform/Linux-GNU-CXX.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/Platform/Linux-GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "/usr/share/cmake-3.16/Modules/CMakeCommonLanguageInclude.cmake" + }, + { + "path" : "src/CMakeLists.txt" + }, + { + "path" : "example/CMakeLists.txt" + }, + { + "path" : "example/callee/CMakeLists.txt" + }, + { + "path" : "example/caller/CMakeLists.txt" + } + ], + "kind" : "cmakeFiles", + "paths" : + { + "build" : "/home/ubuntu/mprpc/build", + "source" : "/home/ubuntu/mprpc" + }, + "version" : + { + "major" : 1, + "minor" : 0 + } +} diff --git a/mprpc/build/.cmake/api/v1/reply/codemodel-v2-2e4ebaff87de057c0010.json b/mprpc/build/.cmake/api/v1/reply/codemodel-v2-2e4ebaff87de057c0010.json new file mode 100644 index 0000000..8d4f7d5 --- /dev/null +++ b/mprpc/build/.cmake/api/v1/reply/codemodel-v2-2e4ebaff87de057c0010.json @@ -0,0 +1,137 @@ +{ + "configurations" : + [ + { + "directories" : + [ + { + "build" : ".", + "childIndexes" : + [ + 1, + 2 + ], + "minimumCMakeVersion" : + { + "string" : "3.0" + }, + "projectIndex" : 0, + "source" : "." + }, + { + "build" : "src", + "minimumCMakeVersion" : + { + "string" : "3.0" + }, + "parentIndex" : 0, + "projectIndex" : 0, + "source" : "src", + "targetIndexes" : + [ + 1 + ] + }, + { + "build" : "example", + "childIndexes" : + [ + 3, + 4 + ], + "minimumCMakeVersion" : + { + "string" : "3.0" + }, + "parentIndex" : 0, + "projectIndex" : 0, + "source" : "example" + }, + { + "build" : "example/callee", + "minimumCMakeVersion" : + { + "string" : "3.0" + }, + "parentIndex" : 2, + "projectIndex" : 0, + "source" : "example/callee", + "targetIndexes" : + [ + 2 + ] + }, + { + "build" : "example/caller", + "minimumCMakeVersion" : + { + "string" : "3.0" + }, + "parentIndex" : 2, + "projectIndex" : 0, + "source" : "example/caller", + "targetIndexes" : + [ + 0 + ] + } + ], + "name" : "Debug", + "projects" : + [ + { + "directoryIndexes" : + [ + 0, + 1, + 2, + 3, + 4 + ], + "name" : "mprpc", + "targetIndexes" : + [ + 0, + 1, + 2 + ] + } + ], + "targets" : + [ + { + "directoryIndex" : 4, + "id" : "consumer::@c2a3416f73e845390d82", + "jsonFile" : "target-consumer-Debug-f779e5b0a306dec7bffc.json", + "name" : "consumer", + "projectIndex" : 0 + }, + { + "directoryIndex" : 1, + "id" : "mprpc::@145eef247bfb46b6828c", + "jsonFile" : "target-mprpc-Debug-46721e4d3e30da68e6c5.json", + "name" : "mprpc", + "projectIndex" : 0 + }, + { + "directoryIndex" : 3, + "id" : "provider::@493cd8b262c97a98b12b", + "jsonFile" : "target-provider-Debug-cef3128ecc3c413f0b00.json", + "name" : "provider", + "projectIndex" : 0 + } + ] + } + ], + "kind" : "codemodel", + "paths" : + { + "build" : "/home/ubuntu/mprpc/build", + "source" : "/home/ubuntu/mprpc" + }, + "version" : + { + "major" : 2, + "minor" : 0 + } +} diff --git a/mprpc/build/.cmake/api/v1/reply/index-2022-10-15T07-07-29-0311.json b/mprpc/build/.cmake/api/v1/reply/index-2022-10-15T07-07-29-0311.json new file mode 100644 index 0000000..8ad4f66 --- /dev/null +++ b/mprpc/build/.cmake/api/v1/reply/index-2022-10-15T07-07-29-0311.json @@ -0,0 +1,116 @@ +{ + "cmake" : + { + "generator" : + { + "name" : "Unix Makefiles" + }, + "paths" : + { + "cmake" : "/usr/bin/cmake", + "cpack" : "/usr/bin/cpack", + "ctest" : "/usr/bin/ctest", + "root" : "/usr/share/cmake-3.16" + }, + "version" : + { + "isDirty" : false, + "major" : 3, + "minor" : 16, + "patch" : 3, + "string" : "3.16.3", + "suffix" : "" + } + }, + "objects" : + [ + { + "jsonFile" : "codemodel-v2-2e4ebaff87de057c0010.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + { + "jsonFile" : "cache-v2-51b1aa517f98a992a992.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + { + "jsonFile" : "cmakeFiles-v1-afc9087a8f7e01a82bfd.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + } + ], + "reply" : + { + "client-vscode" : + { + "query.json" : + { + "requests" : + [ + { + "kind" : "cache", + "version" : 2 + }, + { + "kind" : "codemodel", + "version" : 2 + }, + { + "kind" : "toolchains", + "version" : 1 + }, + { + "kind" : "cmakeFiles", + "version" : 1 + } + ], + "responses" : + [ + { + "jsonFile" : "cache-v2-51b1aa517f98a992a992.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + { + "jsonFile" : "codemodel-v2-2e4ebaff87de057c0010.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + { + "error" : "unknown request kind 'toolchains'" + }, + { + "jsonFile" : "cmakeFiles-v1-afc9087a8f7e01a82bfd.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + } + ] + } + } + } +} diff --git a/mprpc/build/.cmake/api/v1/reply/target-consumer-Debug-f779e5b0a306dec7bffc.json b/mprpc/build/.cmake/api/v1/reply/target-consumer-Debug-f779e5b0a306dec7bffc.json new file mode 100644 index 0000000..333b7e6 --- /dev/null +++ b/mprpc/build/.cmake/api/v1/reply/target-consumer-Debug-f779e5b0a306dec7bffc.json @@ -0,0 +1,182 @@ +{ + "artifacts" : + [ + { + "path" : "/home/ubuntu/mprpc/bin/consumer" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "link_directories", + "target_link_libraries", + "include_directories" + ], + "files" : + [ + "example/caller/CMakeLists.txt", + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 3, + "parent" : 0 + }, + { + "file" : 1 + }, + { + "command" : 1, + "file" : 1, + "line" : 18, + "parent" : 2 + }, + { + "command" : 2, + "file" : 0, + "line" : 4, + "parent" : 0 + }, + { + "command" : 3, + "file" : 1, + "line" : 15, + "parent" : 2 + }, + { + "command" : 3, + "file" : 1, + "line" : 16, + "parent" : 2 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g " + } + ], + "includes" : + [ + { + "backtrace" : 5, + "path" : "/home/ubuntu/mprpc/src/include" + }, + { + "backtrace" : 6, + "path" : "/home/ubuntu/mprpc/example" + } + ], + "language" : "CXX", + "sourceIndexes" : + [ + 0, + 1 + ] + } + ], + "dependencies" : + [ + { + "backtrace" : 4, + "id" : "mprpc::@145eef247bfb46b6828c" + } + ], + "id" : "consumer::@c2a3416f73e845390d82", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-g", + "role" : "flags" + }, + { + "fragment" : "-rdynamic", + "role" : "flags" + }, + { + "backtrace" : 3, + "fragment" : "-L/home/ubuntu/mprpc/lib", + "role" : "libraryPath" + }, + { + "fragment" : "-Wl,-rpath,/home/ubuntu/mprpc/lib", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "../../../lib/libmprpc.a", + "role" : "libraries" + }, + { + "fragment" : "-lprotobuf", + "role" : "libraries" + }, + { + "fragment" : "-lmuduo_net", + "role" : "libraries" + }, + { + "fragment" : "-lmuduo_base", + "role" : "libraries" + }, + { + "fragment" : "-lpthread", + "role" : "libraries" + }, + { + "fragment" : "-lzookeeper_mt", + "role" : "libraries" + } + ], + "language" : "CXX" + }, + "name" : "consumer", + "nameOnDisk" : "consumer", + "paths" : + { + "build" : "example/caller", + "source" : "example/caller" + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0, + 1 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "example/caller/callfriendservice.cc", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "example/friend.pb.cc", + "sourceGroupIndex" : 0 + } + ], + "type" : "EXECUTABLE" +} diff --git a/mprpc/build/.cmake/api/v1/reply/target-mprpc-Debug-46721e4d3e30da68e6c5.json b/mprpc/build/.cmake/api/v1/reply/target-mprpc-Debug-46721e4d3e30da68e6c5.json new file mode 100644 index 0000000..660d626 --- /dev/null +++ b/mprpc/build/.cmake/api/v1/reply/target-mprpc-Debug-46721e4d3e30da68e6c5.json @@ -0,0 +1,161 @@ +{ + "archive" : {}, + "artifacts" : + [ + { + "path" : "/home/ubuntu/mprpc/lib/libmprpc.a" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_library", + "include_directories" + ], + "files" : + [ + "src/CMakeLists.txt", + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 11, + "parent" : 0 + }, + { + "file" : 1 + }, + { + "command" : 1, + "file" : 1, + "line" : 15, + "parent" : 2 + }, + { + "command" : 1, + "file" : 1, + "line" : 16, + "parent" : 2 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g " + } + ], + "includes" : + [ + { + "backtrace" : 3, + "path" : "/home/ubuntu/mprpc/src/include" + }, + { + "backtrace" : 4, + "path" : "/home/ubuntu/mprpc/example" + } + ], + "language" : "CXX", + "sourceIndexes" : + [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + } + ], + "id" : "mprpc::@145eef247bfb46b6828c", + "name" : "mprpc", + "nameOnDisk" : "libmprpc.a", + "paths" : + { + "build" : "src", + "source" : "src" + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "src/mprpcapplication.cc", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "src/mprpcconfig.cc", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "src/rpcheader.pb.cc", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "src/rpcprovider.cc", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "src/mprpcchannel.cc", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "src/mprpccontroller.cc", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "src/logger.cc", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "src/zookeeperutil.cc", + "sourceGroupIndex" : 0 + } + ], + "type" : "STATIC_LIBRARY" +} diff --git a/mprpc/build/.cmake/api/v1/reply/target-provider-Debug-cef3128ecc3c413f0b00.json b/mprpc/build/.cmake/api/v1/reply/target-provider-Debug-cef3128ecc3c413f0b00.json new file mode 100644 index 0000000..d255115 --- /dev/null +++ b/mprpc/build/.cmake/api/v1/reply/target-provider-Debug-cef3128ecc3c413f0b00.json @@ -0,0 +1,182 @@ +{ + "artifacts" : + [ + { + "path" : "/home/ubuntu/mprpc/bin/provider" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "link_directories", + "target_link_libraries", + "include_directories" + ], + "files" : + [ + "example/callee/CMakeLists.txt", + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 3, + "parent" : 0 + }, + { + "file" : 1 + }, + { + "command" : 1, + "file" : 1, + "line" : 18, + "parent" : 2 + }, + { + "command" : 2, + "file" : 0, + "line" : 4, + "parent" : 0 + }, + { + "command" : 3, + "file" : 1, + "line" : 15, + "parent" : 2 + }, + { + "command" : 3, + "file" : 1, + "line" : 16, + "parent" : 2 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g " + } + ], + "includes" : + [ + { + "backtrace" : 5, + "path" : "/home/ubuntu/mprpc/src/include" + }, + { + "backtrace" : 6, + "path" : "/home/ubuntu/mprpc/example" + } + ], + "language" : "CXX", + "sourceIndexes" : + [ + 0, + 1 + ] + } + ], + "dependencies" : + [ + { + "backtrace" : 4, + "id" : "mprpc::@145eef247bfb46b6828c" + } + ], + "id" : "provider::@493cd8b262c97a98b12b", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-g", + "role" : "flags" + }, + { + "fragment" : "-rdynamic", + "role" : "flags" + }, + { + "backtrace" : 3, + "fragment" : "-L/home/ubuntu/mprpc/lib", + "role" : "libraryPath" + }, + { + "fragment" : "-Wl,-rpath,/home/ubuntu/mprpc/lib", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "../../../lib/libmprpc.a", + "role" : "libraries" + }, + { + "fragment" : "-lprotobuf", + "role" : "libraries" + }, + { + "fragment" : "-lmuduo_net", + "role" : "libraries" + }, + { + "fragment" : "-lmuduo_base", + "role" : "libraries" + }, + { + "fragment" : "-lpthread", + "role" : "libraries" + }, + { + "fragment" : "-lzookeeper_mt", + "role" : "libraries" + } + ], + "language" : "CXX" + }, + "name" : "provider", + "nameOnDisk" : "provider", + "paths" : + { + "build" : "example/callee", + "source" : "example/callee" + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0, + 1 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "example/callee/friendservice.cc", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "example/friend.pb.cc", + "sourceGroupIndex" : 0 + } + ], + "type" : "EXECUTABLE" +} diff --git a/mprpc/build/CMakeCache.txt b/mprpc/build/CMakeCache.txt new file mode 100644 index 0000000..eb6bd5c --- /dev/null +++ b/mprpc/build/CMakeCache.txt @@ -0,0 +1,368 @@ +# This is the CMakeCache file. +# For build in directory: /home/ubuntu/mprpc/build +# It was generated by CMake: /usr/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//No help, variable specified on the command line. +CMAKE_BUILD_TYPE:STRING=Debug + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//No help, variable specified on the command line. +CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9 + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//No help, variable specified on the command line. +CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9 + +//Flags used by the C compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the C compiler during DEBUG builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the C compiler during RELEASE builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//No help, variable specified on the command line. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=mprpc + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Path to a program. +CMAKE_READELF:FILEPATH=/usr/bin/readelf + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Value Computed by CMake +mprpc_BINARY_DIR:STATIC=/home/ubuntu/mprpc/build + +//Dependencies for the target +mprpc_LIB_DEPENDS:STATIC=general;muduo_net;general;muduo_base;general;pthread;general;zookeeper_mt; + +//Value Computed by CMake +mprpc_SOURCE_DIR:STATIC=/home/ubuntu/mprpc + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/home/ubuntu/mprpc/build +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=16 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=3 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR +CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB +CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/home/ubuntu/mprpc +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=5 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.16 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/usr/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 + diff --git a/mprpc/build/CMakeFiles/3.16.3/CMakeCCompiler.cmake b/mprpc/build/CMakeFiles/3.16.3/CMakeCCompiler.cmake new file mode 100644 index 0000000..3fcf17e --- /dev/null +++ b/mprpc/build/CMakeFiles/3.16.3/CMakeCCompiler.cmake @@ -0,0 +1,76 @@ +set(CMAKE_C_COMPILER "/usr/bin/gcc") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "GNU") +set(CMAKE_C_COMPILER_VERSION "9.4.0") +set(CMAKE_C_COMPILER_VERSION_INTERNAL "") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") +set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert") +set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") + +set(CMAKE_C_PLATFORM_ID "Linux") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_COMPILER_FRONTEND_VARIANT "") +set(CMAKE_C_SIMULATE_VERSION "") + + + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-9") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-9") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCC 1) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS TRUE) +set(CMAKE_C_ABI_COMPILED TRUE) +set(CMAKE_COMPILER_IS_MINGW ) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "8") +set(CMAKE_C_COMPILER_ABI "ELF") +set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include") +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/mprpc/build/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake b/mprpc/build/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake new file mode 100644 index 0000000..4f49e95 --- /dev/null +++ b/mprpc/build/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake @@ -0,0 +1,88 @@ +set(CMAKE_CXX_COMPILER "/usr/bin/g++") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "GNU") +set(CMAKE_CXX_COMPILER_VERSION "9.4.0") +set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") +set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20") +set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") +set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") +set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") +set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20") + +set(CMAKE_CXX_PLATFORM_ID "Linux") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "") +set(CMAKE_CXX_SIMULATE_VERSION "") + + + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-9") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-9") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCXX 1) +set(CMAKE_CXX_COMPILER_LOADED 1) +set(CMAKE_CXX_COMPILER_WORKS TRUE) +set(CMAKE_CXX_ABI_COMPILED TRUE) +set(CMAKE_COMPILER_IS_MINGW ) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_CXX_COMPILER_ID_RUN 1) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP) +set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) + +foreach (lang C OBJC OBJCXX) + if (CMAKE_${lang}_COMPILER_ID_RUN) + foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) + list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) + endforeach() + endif() +endforeach() + +set(CMAKE_CXX_LINKER_PREFERENCE 30) +set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) + +# Save compiler ABI information. +set(CMAKE_CXX_SIZEOF_DATA_PTR "8") +set(CMAKE_CXX_COMPILER_ABI "ELF") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +if(CMAKE_CXX_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CXX_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +endif() + +if(CMAKE_CXX_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +endif() + +set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/9;/usr/include/x86_64-linux-gnu/c++/9;/usr/include/c++/9/backward;/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include") +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/mprpc/build/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_C.bin b/mprpc/build/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_C.bin new file mode 100755 index 0000000..35de146 Binary files /dev/null and b/mprpc/build/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_C.bin differ diff --git a/mprpc/build/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_CXX.bin b/mprpc/build/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_CXX.bin new file mode 100755 index 0000000..9cba7ec Binary files /dev/null and b/mprpc/build/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_CXX.bin differ diff --git a/mprpc/build/CMakeFiles/3.16.3/CMakeSystem.cmake b/mprpc/build/CMakeFiles/3.16.3/CMakeSystem.cmake new file mode 100644 index 0000000..12b611f --- /dev/null +++ b/mprpc/build/CMakeFiles/3.16.3/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Linux-5.4.0-96-generic") +set(CMAKE_HOST_SYSTEM_NAME "Linux") +set(CMAKE_HOST_SYSTEM_VERSION "5.4.0-96-generic") +set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") + + + +set(CMAKE_SYSTEM "Linux-5.4.0-96-generic") +set(CMAKE_SYSTEM_NAME "Linux") +set(CMAKE_SYSTEM_VERSION "5.4.0-96-generic") +set(CMAKE_SYSTEM_PROCESSOR "x86_64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/mprpc/build/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.c b/mprpc/build/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 0000000..d884b50 --- /dev/null +++ b/mprpc/build/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,671 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#if defined(__CLASSIC_C__) +/* cv-qualifiers did not exist in K&R C */ +# define const +# define volatile +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) +# define COMPILER_ID "Fujitsu" + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__BCC__) +# define COMPILER_ID "Bruce" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + +#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) +# define COMPILER_ID "SDCC" +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) +# else + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number components. */ +#ifdef COMPILER_VERSION_MAJOR +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + + +#if !defined(__STDC__) +# if (defined(_MSC_VER) && !defined(__clang__)) \ + || (defined(__ibmxl__) || defined(__IBMC__)) +# define C_DIALECT "90" +# else +# define C_DIALECT +# endif +#elif __STDC_VERSION__ >= 201000L +# define C_DIALECT "11" +#elif __STDC_VERSION__ >= 199901L +# define C_DIALECT "99" +#else +# define C_DIALECT "90" +#endif +const char* info_language_dialect_default = + "INFO" ":" "dialect_default[" C_DIALECT "]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else +int main(int argc, char* argv[]) +# endif +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/mprpc/build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp b/mprpc/build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 0000000..69cfdba --- /dev/null +++ b/mprpc/build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,660 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + /* __COMO_VERSION__ = VRR */ +# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) +# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) +# define COMPILER_ID "Fujitsu" + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) || defined(__GNUG__) +# define COMPILER_ID "GNU" +# if defined(__GNUC__) +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# else +# define COMPILER_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number components. */ +#ifdef COMPILER_VERSION_MAJOR +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + + +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L +# if defined(__INTEL_CXX11_MODE__) +# if defined(__cpp_aggregate_nsdmi) +# define CXX_STD 201402L +# else +# define CXX_STD 201103L +# endif +# else +# define CXX_STD 199711L +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# define CXX_STD _MSVC_LANG +#else +# define CXX_STD __cplusplus +#endif + +const char* info_language_dialect_default = "INFO" ":" "dialect_default[" +#if CXX_STD > 201703L + "20" +#elif CXX_STD >= 201703L + "17" +#elif CXX_STD >= 201402L + "14" +#elif CXX_STD >= 201103L + "11" +#else + "98" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} diff --git a/mprpc/build/CMakeFiles/CMakeDirectoryInformation.cmake b/mprpc/build/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..a0ec875 --- /dev/null +++ b/mprpc/build/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/mprpc") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/mprpc/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/mprpc/build/CMakeFiles/CMakeOutput.log b/mprpc/build/CMakeFiles/CMakeOutput.log new file mode 100644 index 0000000..54049db --- /dev/null +++ b/mprpc/build/CMakeFiles/CMakeOutput.log @@ -0,0 +1,463 @@ +The system is: Linux - 5.4.0-96-generic - x86_64 +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: /usr/bin/gcc +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out" + +The C compiler identification is GNU, found in "/home/ubuntu/mprpc/build/CMakeFiles/3.16.3/CompilerIdC/a.out" + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. +Compiler: /usr/bin/g++ +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out" + +The CXX compiler identification is GNU, found in "/home/ubuntu/mprpc/build/CMakeFiles/3.16.3/CompilerIdCXX/a.out" + +Determining if the C compiler works passed with the following output: +Change Dir: /home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make cmTC_c1c1a/fast && /usr/bin/make -f CMakeFiles/cmTC_c1c1a.dir/build.make CMakeFiles/cmTC_c1c1a.dir/build +make[1]: Entering directory '/home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_c1c1a.dir/testCCompiler.c.o +/usr/bin/gcc -o CMakeFiles/cmTC_c1c1a.dir/testCCompiler.c.o -c /home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp/testCCompiler.c +Linking C executable cmTC_c1c1a +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c1c1a.dir/link.txt --verbose=1 +/usr/bin/gcc -rdynamic CMakeFiles/cmTC_c1c1a.dir/testCCompiler.c.o -o cmTC_c1c1a +make[1]: Leaving directory '/home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp' + + + +Detecting C compiler ABI info compiled with the following output: +Change Dir: /home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make cmTC_837c8/fast && /usr/bin/make -f CMakeFiles/cmTC_837c8.dir/build.make CMakeFiles/cmTC_837c8.dir/build +make[1]: Entering directory '/home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o +/usr/bin/gcc -v -o CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c +Using built-in specs. +COLLECT_GCC=/usr/bin/gcc +OFFLOAD_TARGET_NAMES=nvptx-none:hsa +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/9/cc1 -quiet -v -imultiarch x86_64-linux-gnu /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccZzvwBW.s +GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu) + compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" +ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed" +ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/lib/gcc/x86_64-linux-gnu/9/include + /usr/local/include + /usr/include/x86_64-linux-gnu + /usr/include +End of search list. +GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu) + compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +Compiler executable checksum: c0c95c0b4209efec1c1892d5ff24030b +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' + as -v --64 -o CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o /tmp/ccZzvwBW.s +GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34 +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' +Linking C executable cmTC_837c8 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_837c8.dir/link.txt --verbose=1 +/usr/bin/gcc -v -rdynamic CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o -o cmTC_837c8 +Using built-in specs. +COLLECT_GCC=/usr/bin/gcc +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper +OFFLOAD_TARGET_NAMES=nvptx-none:hsa +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_837c8' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccYokk4p.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_837c8 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o +COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_837c8' '-mtune=generic' '-march=x86-64' +make[1]: Leaving directory '/home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp' + + + +Parsed C implicit include dir info from above output: rv=done + found start of include info + found start of implicit include info + add: [/usr/lib/gcc/x86_64-linux-gnu/9/include] + add: [/usr/local/include] + add: [/usr/include/x86_64-linux-gnu] + add: [/usr/include] + end of search list found + collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/9/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/9/include] + collapse include dir [/usr/local/include] ==> [/usr/local/include] + collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu] + collapse include dir [/usr/include] ==> [/usr/include] + implicit include dirs: [/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include] + + +Parsed C implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command(s):/usr/bin/make cmTC_837c8/fast && /usr/bin/make -f CMakeFiles/cmTC_837c8.dir/build.make CMakeFiles/cmTC_837c8.dir/build] + ignore line: [make[1]: Entering directory '/home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp'] + ignore line: [Building C object CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o] + ignore line: [/usr/bin/gcc -v -o CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/gcc] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) ] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'] + ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/cc1 -quiet -v -imultiarch x86_64-linux-gnu /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccZzvwBW.s] + ignore line: [GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)] + ignore line: [ compiled by GNU C version 9.4.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/include] + ignore line: [ /usr/local/include] + ignore line: [ /usr/include/x86_64-linux-gnu] + ignore line: [ /usr/include] + ignore line: [End of search list.] + ignore line: [GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)] + ignore line: [ compiled by GNU C version 9.4.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [Compiler executable checksum: c0c95c0b4209efec1c1892d5ff24030b] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'] + ignore line: [ as -v --64 -o CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o /tmp/ccZzvwBW.s] + ignore line: [GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'] + ignore line: [Linking C executable cmTC_837c8] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_837c8.dir/link.txt --verbose=1] + ignore line: [/usr/bin/gcc -v -rdynamic CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o -o cmTC_837c8 ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/gcc] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_837c8' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccYokk4p.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_837c8 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/9/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccYokk4p.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-export-dynamic] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-pie] ==> ignore + arg [-znow] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_837c8] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o] ==> ignore + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] + arg [CMakeFiles/cmTC_837c8.dir/CMakeCCompilerABI.c.o] ==> ignore + arg [-lgcc] ==> lib [gcc] + arg [--push-state] ==> ignore + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--pop-state] ==> ignore + arg [-lc] ==> lib [c] + arg [-lgcc] ==> lib [gcc] + arg [--push-state] ==> ignore + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--pop-state] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> ignore + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9] ==> [/usr/lib/gcc/x86_64-linux-gnu/9] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> [/usr/lib] + implicit libs: [gcc;gcc_s;c;gcc;gcc_s] + implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + implicit fwks: [] + + +Determining if the CXX compiler works passed with the following output: +Change Dir: /home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make cmTC_d3e4e/fast && /usr/bin/make -f CMakeFiles/cmTC_d3e4e.dir/build.make CMakeFiles/cmTC_d3e4e.dir/build +make[1]: Entering directory '/home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_d3e4e.dir/testCXXCompiler.cxx.o +/usr/bin/g++ -o CMakeFiles/cmTC_d3e4e.dir/testCXXCompiler.cxx.o -c /home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +Linking CXX executable cmTC_d3e4e +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d3e4e.dir/link.txt --verbose=1 +/usr/bin/g++ -rdynamic CMakeFiles/cmTC_d3e4e.dir/testCXXCompiler.cxx.o -o cmTC_d3e4e +make[1]: Leaving directory '/home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp' + + + +Detecting CXX compiler ABI info compiled with the following output: +Change Dir: /home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make cmTC_e90b6/fast && /usr/bin/make -f CMakeFiles/cmTC_e90b6.dir/build.make CMakeFiles/cmTC_e90b6.dir/build +make[1]: Entering directory '/home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o +/usr/bin/g++ -v -o CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp +Using built-in specs. +COLLECT_GCC=/usr/bin/g++ +OFFLOAD_TARGET_NAMES=nvptx-none:hsa +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/9/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccFk0eCV.s +GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu) + compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/9" +ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" +ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed" +ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/include/c++/9 + /usr/include/x86_64-linux-gnu/c++/9 + /usr/include/c++/9/backward + /usr/lib/gcc/x86_64-linux-gnu/9/include + /usr/local/include + /usr/include/x86_64-linux-gnu + /usr/include +End of search list. +GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu) + compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +Compiler executable checksum: 65fe925b83d3956b533de4aaba7dace0 +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + as -v --64 -o CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccFk0eCV.s +GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34 +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' +Linking CXX executable cmTC_e90b6 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e90b6.dir/link.txt --verbose=1 +/usr/bin/g++ -v -rdynamic CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_e90b6 +Using built-in specs. +COLLECT_GCC=/usr/bin/g++ +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper +OFFLOAD_TARGET_NAMES=nvptx-none:hsa +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_e90b6' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccIkUgZk.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_e90b6 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o +COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_e90b6' '-shared-libgcc' '-mtune=generic' '-march=x86-64' +make[1]: Leaving directory '/home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp' + + + +Parsed CXX implicit include dir info from above output: rv=done + found start of include info + found start of implicit include info + add: [/usr/include/c++/9] + add: [/usr/include/x86_64-linux-gnu/c++/9] + add: [/usr/include/c++/9/backward] + add: [/usr/lib/gcc/x86_64-linux-gnu/9/include] + add: [/usr/local/include] + add: [/usr/include/x86_64-linux-gnu] + add: [/usr/include] + end of search list found + collapse include dir [/usr/include/c++/9] ==> [/usr/include/c++/9] + collapse include dir [/usr/include/x86_64-linux-gnu/c++/9] ==> [/usr/include/x86_64-linux-gnu/c++/9] + collapse include dir [/usr/include/c++/9/backward] ==> [/usr/include/c++/9/backward] + collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/9/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/9/include] + collapse include dir [/usr/local/include] ==> [/usr/local/include] + collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu] + collapse include dir [/usr/include] ==> [/usr/include] + implicit include dirs: [/usr/include/c++/9;/usr/include/x86_64-linux-gnu/c++/9;/usr/include/c++/9/backward;/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include] + + +Parsed CXX implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command(s):/usr/bin/make cmTC_e90b6/fast && /usr/bin/make -f CMakeFiles/cmTC_e90b6.dir/build.make CMakeFiles/cmTC_e90b6.dir/build] + ignore line: [make[1]: Entering directory '/home/ubuntu/mprpc/build/CMakeFiles/CMakeTmp'] + ignore line: [Building CXX object CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o] + ignore line: [/usr/bin/g++ -v -o CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/g++] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) ] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccFk0eCV.s] + ignore line: [GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)] + ignore line: [ compiled by GNU C version 9.4.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/9"] + ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /usr/include/c++/9] + ignore line: [ /usr/include/x86_64-linux-gnu/c++/9] + ignore line: [ /usr/include/c++/9/backward] + ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/include] + ignore line: [ /usr/local/include] + ignore line: [ /usr/include/x86_64-linux-gnu] + ignore line: [ /usr/include] + ignore line: [End of search list.] + ignore line: [GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)] + ignore line: [ compiled by GNU C version 9.4.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [Compiler executable checksum: 65fe925b83d3956b533de4aaba7dace0] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + ignore line: [ as -v --64 -o CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccFk0eCV.s] + ignore line: [GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + ignore line: [Linking CXX executable cmTC_e90b6] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e90b6.dir/link.txt --verbose=1] + ignore line: [/usr/bin/g++ -v -rdynamic CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_e90b6 ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/g++] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_e90b6' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccIkUgZk.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_e90b6 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/9/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccIkUgZk.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-export-dynamic] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-pie] ==> ignore + arg [-znow] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_e90b6] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o] ==> ignore + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] + arg [CMakeFiles/cmTC_e90b6.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore + arg [-lstdc++] ==> lib [stdc++] + arg [-lm] ==> lib [m] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lc] ==> lib [c] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> ignore + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9] ==> [/usr/lib/gcc/x86_64-linux-gnu/9] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> [/usr/lib] + implicit libs: [stdc++;m;gcc_s;gcc;c;gcc_s;gcc] + implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + implicit fwks: [] + + diff --git a/mprpc/build/CMakeFiles/Makefile.cmake b/mprpc/build/CMakeFiles/Makefile.cmake new file mode 100644 index 0000000..5c9bf1a --- /dev/null +++ b/mprpc/build/CMakeFiles/Makefile.cmake @@ -0,0 +1,59 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# The generator used is: +set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") + +# The top level Makefile was generated from the following files: +set(CMAKE_MAKEFILE_DEPENDS + "CMakeCache.txt" + "../CMakeLists.txt" + "CMakeFiles/3.16.3/CMakeCCompiler.cmake" + "CMakeFiles/3.16.3/CMakeCXXCompiler.cmake" + "CMakeFiles/3.16.3/CMakeSystem.cmake" + "../example/CMakeLists.txt" + "../example/callee/CMakeLists.txt" + "../example/caller/CMakeLists.txt" + "../src/CMakeLists.txt" + "/usr/share/cmake-3.16/Modules/CMakeCInformation.cmake" + "/usr/share/cmake-3.16/Modules/CMakeCXXInformation.cmake" + "/usr/share/cmake-3.16/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake" + "/usr/share/cmake-3.16/Modules/CMakeCommonLanguageInclude.cmake" + "/usr/share/cmake-3.16/Modules/CMakeGenericSystem.cmake" + "/usr/share/cmake-3.16/Modules/CMakeInitializeConfigs.cmake" + "/usr/share/cmake-3.16/Modules/CMakeLanguageInformation.cmake" + "/usr/share/cmake-3.16/Modules/CMakeSystemSpecificInformation.cmake" + "/usr/share/cmake-3.16/Modules/CMakeSystemSpecificInitialize.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/GNU-C.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/GNU-CXX.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/GNU.cmake" + "/usr/share/cmake-3.16/Modules/Internal/CMakeCheckCompilerFlag.cmake" + "/usr/share/cmake-3.16/Modules/Platform/Linux-GNU-C.cmake" + "/usr/share/cmake-3.16/Modules/Platform/Linux-GNU-CXX.cmake" + "/usr/share/cmake-3.16/Modules/Platform/Linux-GNU.cmake" + "/usr/share/cmake-3.16/Modules/Platform/Linux.cmake" + "/usr/share/cmake-3.16/Modules/Platform/UnixPaths.cmake" + ) + +# The corresponding makefile is: +set(CMAKE_MAKEFILE_OUTPUTS + "Makefile" + "CMakeFiles/cmake.check_cache" + ) + +# Byproducts of CMake generate step: +set(CMAKE_MAKEFILE_PRODUCTS + "CMakeFiles/CMakeDirectoryInformation.cmake" + "src/CMakeFiles/CMakeDirectoryInformation.cmake" + "example/CMakeFiles/CMakeDirectoryInformation.cmake" + "example/callee/CMakeFiles/CMakeDirectoryInformation.cmake" + "example/caller/CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +set(CMAKE_DEPEND_INFO_FILES + "src/CMakeFiles/mprpc.dir/DependInfo.cmake" + "example/callee/CMakeFiles/provider.dir/DependInfo.cmake" + "example/caller/CMakeFiles/consumer.dir/DependInfo.cmake" + ) diff --git a/mprpc/build/CMakeFiles/Makefile2 b/mprpc/build/CMakeFiles/Makefile2 new file mode 100644 index 0000000..6ed0cdd --- /dev/null +++ b/mprpc/build/CMakeFiles/Makefile2 @@ -0,0 +1,238 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/ubuntu/mprpc + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/ubuntu/mprpc/build + +#============================================================================= +# Directory level rules for the build root directory + +# The main recursive "all" target. +all: src/all +all: example/all + +.PHONY : all + +# The main recursive "preinstall" target. +preinstall: src/preinstall +preinstall: example/preinstall + +.PHONY : preinstall + +# The main recursive "clean" target. +clean: src/clean +clean: example/clean + +.PHONY : clean + +#============================================================================= +# Directory level rules for directory example + +# Recursive "all" directory target. +example/all: example/callee/all +example/all: example/caller/all + +.PHONY : example/all + +# Recursive "preinstall" directory target. +example/preinstall: example/callee/preinstall +example/preinstall: example/caller/preinstall + +.PHONY : example/preinstall + +# Recursive "clean" directory target. +example/clean: example/callee/clean +example/clean: example/caller/clean + +.PHONY : example/clean + +#============================================================================= +# Directory level rules for directory example/callee + +# Recursive "all" directory target. +example/callee/all: example/callee/CMakeFiles/provider.dir/all + +.PHONY : example/callee/all + +# Recursive "preinstall" directory target. +example/callee/preinstall: + +.PHONY : example/callee/preinstall + +# Recursive "clean" directory target. +example/callee/clean: example/callee/CMakeFiles/provider.dir/clean + +.PHONY : example/callee/clean + +#============================================================================= +# Directory level rules for directory example/caller + +# Recursive "all" directory target. +example/caller/all: example/caller/CMakeFiles/consumer.dir/all + +.PHONY : example/caller/all + +# Recursive "preinstall" directory target. +example/caller/preinstall: + +.PHONY : example/caller/preinstall + +# Recursive "clean" directory target. +example/caller/clean: example/caller/CMakeFiles/consumer.dir/clean + +.PHONY : example/caller/clean + +#============================================================================= +# Directory level rules for directory src + +# Recursive "all" directory target. +src/all: src/CMakeFiles/mprpc.dir/all + +.PHONY : src/all + +# Recursive "preinstall" directory target. +src/preinstall: + +.PHONY : src/preinstall + +# Recursive "clean" directory target. +src/clean: src/CMakeFiles/mprpc.dir/clean + +.PHONY : src/clean + +#============================================================================= +# Target rules for target src/CMakeFiles/mprpc.dir + +# All Build rule for target. +src/CMakeFiles/mprpc.dir/all: + $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/depend + $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=4,5,6,7,8,9,10,11,12 "Built target mprpc" +.PHONY : src/CMakeFiles/mprpc.dir/all + +# Build rule for subdir invocation for target. +src/CMakeFiles/mprpc.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles 9 + $(MAKE) -f CMakeFiles/Makefile2 src/CMakeFiles/mprpc.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles 0 +.PHONY : src/CMakeFiles/mprpc.dir/rule + +# Convenience name for target. +mprpc: src/CMakeFiles/mprpc.dir/rule + +.PHONY : mprpc + +# clean rule for target. +src/CMakeFiles/mprpc.dir/clean: + $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/clean +.PHONY : src/CMakeFiles/mprpc.dir/clean + +#============================================================================= +# Target rules for target example/callee/CMakeFiles/provider.dir + +# All Build rule for target. +example/callee/CMakeFiles/provider.dir/all: src/CMakeFiles/mprpc.dir/all + $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/depend + $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=13,14,15 "Built target provider" +.PHONY : example/callee/CMakeFiles/provider.dir/all + +# Build rule for subdir invocation for target. +example/callee/CMakeFiles/provider.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles 12 + $(MAKE) -f CMakeFiles/Makefile2 example/callee/CMakeFiles/provider.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles 0 +.PHONY : example/callee/CMakeFiles/provider.dir/rule + +# Convenience name for target. +provider: example/callee/CMakeFiles/provider.dir/rule + +.PHONY : provider + +# clean rule for target. +example/callee/CMakeFiles/provider.dir/clean: + $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/clean +.PHONY : example/callee/CMakeFiles/provider.dir/clean + +#============================================================================= +# Target rules for target example/caller/CMakeFiles/consumer.dir + +# All Build rule for target. +example/caller/CMakeFiles/consumer.dir/all: src/CMakeFiles/mprpc.dir/all + $(MAKE) -f example/caller/CMakeFiles/consumer.dir/build.make example/caller/CMakeFiles/consumer.dir/depend + $(MAKE) -f example/caller/CMakeFiles/consumer.dir/build.make example/caller/CMakeFiles/consumer.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=1,2,3 "Built target consumer" +.PHONY : example/caller/CMakeFiles/consumer.dir/all + +# Build rule for subdir invocation for target. +example/caller/CMakeFiles/consumer.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles 12 + $(MAKE) -f CMakeFiles/Makefile2 example/caller/CMakeFiles/consumer.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles 0 +.PHONY : example/caller/CMakeFiles/consumer.dir/rule + +# Convenience name for target. +consumer: example/caller/CMakeFiles/consumer.dir/rule + +.PHONY : consumer + +# clean rule for target. +example/caller/CMakeFiles/consumer.dir/clean: + $(MAKE) -f example/caller/CMakeFiles/consumer.dir/build.make example/caller/CMakeFiles/consumer.dir/clean +.PHONY : example/caller/CMakeFiles/consumer.dir/clean + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/mprpc/build/CMakeFiles/TargetDirectories.txt b/mprpc/build/CMakeFiles/TargetDirectories.txt new file mode 100644 index 0000000..e4cfd88 --- /dev/null +++ b/mprpc/build/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,13 @@ +/home/ubuntu/mprpc/build/CMakeFiles/rebuild_cache.dir +/home/ubuntu/mprpc/build/CMakeFiles/edit_cache.dir +/home/ubuntu/mprpc/build/src/CMakeFiles/rebuild_cache.dir +/home/ubuntu/mprpc/build/src/CMakeFiles/edit_cache.dir +/home/ubuntu/mprpc/build/src/CMakeFiles/mprpc.dir +/home/ubuntu/mprpc/build/example/CMakeFiles/rebuild_cache.dir +/home/ubuntu/mprpc/build/example/CMakeFiles/edit_cache.dir +/home/ubuntu/mprpc/build/example/callee/CMakeFiles/rebuild_cache.dir +/home/ubuntu/mprpc/build/example/callee/CMakeFiles/edit_cache.dir +/home/ubuntu/mprpc/build/example/callee/CMakeFiles/provider.dir +/home/ubuntu/mprpc/build/example/caller/CMakeFiles/rebuild_cache.dir +/home/ubuntu/mprpc/build/example/caller/CMakeFiles/edit_cache.dir +/home/ubuntu/mprpc/build/example/caller/CMakeFiles/consumer.dir diff --git a/mprpc/build/CMakeFiles/cmake.check_cache b/mprpc/build/CMakeFiles/cmake.check_cache new file mode 100644 index 0000000..3dccd73 --- /dev/null +++ b/mprpc/build/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/mprpc/build/CMakeFiles/progress.marks b/mprpc/build/CMakeFiles/progress.marks new file mode 100644 index 0000000..60d3b2f --- /dev/null +++ b/mprpc/build/CMakeFiles/progress.marks @@ -0,0 +1 @@ +15 diff --git a/mprpc/build/Makefile b/mprpc/build/Makefile new file mode 100644 index 0000000..eb7a70b --- /dev/null +++ b/mprpc/build/Makefile @@ -0,0 +1,176 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/ubuntu/mprpc + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/ubuntu/mprpc/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles /home/ubuntu/mprpc/build/CMakeFiles/progress.marks + $(MAKE) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named mprpc + +# Build rule for target. +mprpc: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 mprpc +.PHONY : mprpc + +# fast build rule for target. +mprpc/fast: + $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/build +.PHONY : mprpc/fast + +#============================================================================= +# Target rules for targets named provider + +# Build rule for target. +provider: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 provider +.PHONY : provider + +# fast build rule for target. +provider/fast: + $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/build +.PHONY : provider/fast + +#============================================================================= +# Target rules for targets named consumer + +# Build rule for target. +consumer: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 consumer +.PHONY : consumer + +# fast build rule for target. +consumer/fast: + $(MAKE) -f example/caller/CMakeFiles/consumer.dir/build.make example/caller/CMakeFiles/consumer.dir/build +.PHONY : consumer/fast + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... rebuild_cache" + @echo "... edit_cache" + @echo "... mprpc" + @echo "... provider" + @echo "... consumer" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/mprpc/build/cmake_install.cmake b/mprpc/build/cmake_install.cmake new file mode 100644 index 0000000..1369344 --- /dev/null +++ b/mprpc/build/cmake_install.cmake @@ -0,0 +1,56 @@ +# Install script for directory: /home/ubuntu/mprpc + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "Debug") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for each subdirectory. + include("/home/ubuntu/mprpc/build/src/cmake_install.cmake") + include("/home/ubuntu/mprpc/build/example/cmake_install.cmake") + +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "/home/ubuntu/mprpc/build/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/mprpc/build/compile_commands.json b/mprpc/build/compile_commands.json new file mode 100644 index 0000000..bff7a7e --- /dev/null +++ b/mprpc/build/compile_commands.json @@ -0,0 +1,62 @@ +[ +{ + "directory": "/home/ubuntu/mprpc/build/src", + "command": "/usr/bin/g++ -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example -g -o CMakeFiles/mprpc.dir/mprpcapplication.cc.o -c /home/ubuntu/mprpc/src/mprpcapplication.cc", + "file": "/home/ubuntu/mprpc/src/mprpcapplication.cc" +}, +{ + "directory": "/home/ubuntu/mprpc/build/src", + "command": "/usr/bin/g++ -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example -g -o CMakeFiles/mprpc.dir/mprpcconfig.cc.o -c /home/ubuntu/mprpc/src/mprpcconfig.cc", + "file": "/home/ubuntu/mprpc/src/mprpcconfig.cc" +}, +{ + "directory": "/home/ubuntu/mprpc/build/src", + "command": "/usr/bin/g++ -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example -g -o CMakeFiles/mprpc.dir/rpcheader.pb.cc.o -c /home/ubuntu/mprpc/src/rpcheader.pb.cc", + "file": "/home/ubuntu/mprpc/src/rpcheader.pb.cc" +}, +{ + "directory": "/home/ubuntu/mprpc/build/src", + "command": "/usr/bin/g++ -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example -g -o CMakeFiles/mprpc.dir/rpcprovider.cc.o -c /home/ubuntu/mprpc/src/rpcprovider.cc", + "file": "/home/ubuntu/mprpc/src/rpcprovider.cc" +}, +{ + "directory": "/home/ubuntu/mprpc/build/src", + "command": "/usr/bin/g++ -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example -g -o CMakeFiles/mprpc.dir/mprpcchannel.cc.o -c /home/ubuntu/mprpc/src/mprpcchannel.cc", + "file": "/home/ubuntu/mprpc/src/mprpcchannel.cc" +}, +{ + "directory": "/home/ubuntu/mprpc/build/src", + "command": "/usr/bin/g++ -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example -g -o CMakeFiles/mprpc.dir/mprpccontroller.cc.o -c /home/ubuntu/mprpc/src/mprpccontroller.cc", + "file": "/home/ubuntu/mprpc/src/mprpccontroller.cc" +}, +{ + "directory": "/home/ubuntu/mprpc/build/src", + "command": "/usr/bin/g++ -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example -g -o CMakeFiles/mprpc.dir/logger.cc.o -c /home/ubuntu/mprpc/src/logger.cc", + "file": "/home/ubuntu/mprpc/src/logger.cc" +}, +{ + "directory": "/home/ubuntu/mprpc/build/src", + "command": "/usr/bin/g++ -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example -g -o CMakeFiles/mprpc.dir/zookeeperutil.cc.o -c /home/ubuntu/mprpc/src/zookeeperutil.cc", + "file": "/home/ubuntu/mprpc/src/zookeeperutil.cc" +}, +{ + "directory": "/home/ubuntu/mprpc/build/example/callee", + "command": "/usr/bin/g++ -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example -g -o CMakeFiles/provider.dir/friendservice.cc.o -c /home/ubuntu/mprpc/example/callee/friendservice.cc", + "file": "/home/ubuntu/mprpc/example/callee/friendservice.cc" +}, +{ + "directory": "/home/ubuntu/mprpc/build/example/callee", + "command": "/usr/bin/g++ -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example -g -o CMakeFiles/provider.dir/__/friend.pb.cc.o -c /home/ubuntu/mprpc/example/friend.pb.cc", + "file": "/home/ubuntu/mprpc/example/friend.pb.cc" +}, +{ + "directory": "/home/ubuntu/mprpc/build/example/caller", + "command": "/usr/bin/g++ -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example -g -o CMakeFiles/consumer.dir/callfriendservice.cc.o -c /home/ubuntu/mprpc/example/caller/callfriendservice.cc", + "file": "/home/ubuntu/mprpc/example/caller/callfriendservice.cc" +}, +{ + "directory": "/home/ubuntu/mprpc/build/example/caller", + "command": "/usr/bin/g++ -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example -g -o CMakeFiles/consumer.dir/__/friend.pb.cc.o -c /home/ubuntu/mprpc/example/friend.pb.cc", + "file": "/home/ubuntu/mprpc/example/friend.pb.cc" +} +] \ No newline at end of file diff --git a/mprpc/build/example/CMakeFiles/CMakeDirectoryInformation.cmake b/mprpc/build/example/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..a0ec875 --- /dev/null +++ b/mprpc/build/example/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/mprpc") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/mprpc/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/mprpc/build/example/CMakeFiles/progress.marks b/mprpc/build/example/CMakeFiles/progress.marks new file mode 100644 index 0000000..60d3b2f --- /dev/null +++ b/mprpc/build/example/CMakeFiles/progress.marks @@ -0,0 +1 @@ +15 diff --git a/mprpc/build/example/Makefile b/mprpc/build/example/Makefile new file mode 100644 index 0000000..fc108ef --- /dev/null +++ b/mprpc/build/example/Makefile @@ -0,0 +1,134 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/ubuntu/mprpc + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/ubuntu/mprpc/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# The main all target +all: cmake_check_build_system + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles /home/ubuntu/mprpc/build/example/CMakeFiles/progress.marks + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... rebuild_cache" + @echo "... edit_cache" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/mprpc/build/example/callee/CMakeFiles/CMakeDirectoryInformation.cmake b/mprpc/build/example/callee/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..a0ec875 --- /dev/null +++ b/mprpc/build/example/callee/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/mprpc") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/mprpc/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/mprpc/build/example/callee/CMakeFiles/progress.marks b/mprpc/build/example/callee/CMakeFiles/progress.marks new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/mprpc/build/example/callee/CMakeFiles/progress.marks @@ -0,0 +1 @@ +12 diff --git a/mprpc/build/example/callee/CMakeFiles/provider.dir/CXX.includecache b/mprpc/build/example/callee/CMakeFiles/provider.dir/CXX.includecache new file mode 100644 index 0000000..f54f222 --- /dev/null +++ b/mprpc/build/example/callee/CMakeFiles/provider.dir/CXX.includecache @@ -0,0 +1,124 @@ +#IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +../example/friend.pb.h +limits +- +string +- +google/protobuf/port_def.inc +- +google/protobuf/port_undef.inc +- +google/protobuf/io/coded_stream.h +- +google/protobuf/arena.h +- +google/protobuf/arenastring.h +- +google/protobuf/generated_message_util.h +- +google/protobuf/metadata_lite.h +- +google/protobuf/generated_message_reflection.h +- +google/protobuf/message.h +- +google/protobuf/repeated_field.h +- +google/protobuf/extension_set.h +- +google/protobuf/service.h +- +google/protobuf/unknown_field_set.h +- +google/protobuf/port_def.inc +- +google/protobuf/port_undef.inc +- + +../src/include/lockqueue.h +queue +- +thread +- +mutex +- +condition_variable +- + +../src/include/logger.h +lockqueue.h +- +string +- + +../src/include/mprpcapplication.h +mprpcconfig.h +../src/include/mprpcconfig.h +mprpcchannel.h +../src/include/mprpcchannel.h +mprpccontroller.h +../src/include/mprpccontroller.h + +../src/include/mprpcchannel.h +google/protobuf/service.h +- +google/protobuf/descriptor.h +- +google/protobuf/message.h +- + +../src/include/mprpcconfig.h +unordered_map +- +string +- + +../src/include/mprpccontroller.h +google/protobuf/service.h +- +string +- + +../src/include/rpcprovider.h +google/protobuf/service.h +../src/include/google/protobuf/service.h +muduo/net/TcpServer.h +- +muduo/net/EventLoop.h +- +muduo/net/InetAddress.h +- +muduo/net/TcpConnection.h +- +string +- +functional +- +google/protobuf/descriptor.h +- +unordered_map +- + +/home/ubuntu/mprpc/example/callee/friendservice.cc +iostream +- +string +- +friend.pb.h +/home/ubuntu/mprpc/example/callee/friend.pb.h +mprpcapplication.h +/home/ubuntu/mprpc/example/callee/mprpcapplication.h +rpcprovider.h +/home/ubuntu/mprpc/example/callee/rpcprovider.h +vector +- +logger.h +/home/ubuntu/mprpc/example/callee/logger.h + diff --git a/mprpc/build/example/callee/CMakeFiles/provider.dir/DependInfo.cmake b/mprpc/build/example/callee/CMakeFiles/provider.dir/DependInfo.cmake new file mode 100644 index 0000000..31c874c --- /dev/null +++ b/mprpc/build/example/callee/CMakeFiles/provider.dir/DependInfo.cmake @@ -0,0 +1,24 @@ +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + "CXX" + ) +# The set of files for implicit dependencies of each language: +set(CMAKE_DEPENDS_CHECK_CXX + "/home/ubuntu/mprpc/example/friend.pb.cc" "/home/ubuntu/mprpc/build/example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.o" + "/home/ubuntu/mprpc/example/callee/friendservice.cc" "/home/ubuntu/mprpc/build/example/callee/CMakeFiles/provider.dir/friendservice.cc.o" + ) +set(CMAKE_CXX_COMPILER_ID "GNU") + +# The include file search paths: +set(CMAKE_CXX_TARGET_INCLUDE_PATH + "../src/include" + "../example" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + "/home/ubuntu/mprpc/build/src/CMakeFiles/mprpc.dir/DependInfo.cmake" + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/mprpc/build/example/callee/CMakeFiles/provider.dir/build.make b/mprpc/build/example/callee/CMakeFiles/provider.dir/build.make new file mode 100644 index 0000000..2c217c6 --- /dev/null +++ b/mprpc/build/example/callee/CMakeFiles/provider.dir/build.make @@ -0,0 +1,114 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/ubuntu/mprpc + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/ubuntu/mprpc/build + +# Include any dependencies generated for this target. +include example/callee/CMakeFiles/provider.dir/depend.make + +# Include the progress variables for this target. +include example/callee/CMakeFiles/provider.dir/progress.make + +# Include the compile flags for this target's objects. +include example/callee/CMakeFiles/provider.dir/flags.make + +example/callee/CMakeFiles/provider.dir/friendservice.cc.o: example/callee/CMakeFiles/provider.dir/flags.make +example/callee/CMakeFiles/provider.dir/friendservice.cc.o: ../example/callee/friendservice.cc + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object example/callee/CMakeFiles/provider.dir/friendservice.cc.o" + cd /home/ubuntu/mprpc/build/example/callee && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/provider.dir/friendservice.cc.o -c /home/ubuntu/mprpc/example/callee/friendservice.cc + +example/callee/CMakeFiles/provider.dir/friendservice.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/provider.dir/friendservice.cc.i" + cd /home/ubuntu/mprpc/build/example/callee && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/mprpc/example/callee/friendservice.cc > CMakeFiles/provider.dir/friendservice.cc.i + +example/callee/CMakeFiles/provider.dir/friendservice.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/provider.dir/friendservice.cc.s" + cd /home/ubuntu/mprpc/build/example/callee && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/mprpc/example/callee/friendservice.cc -o CMakeFiles/provider.dir/friendservice.cc.s + +example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.o: example/callee/CMakeFiles/provider.dir/flags.make +example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.o: ../example/friend.pb.cc + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.o" + cd /home/ubuntu/mprpc/build/example/callee && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/provider.dir/__/friend.pb.cc.o -c /home/ubuntu/mprpc/example/friend.pb.cc + +example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/provider.dir/__/friend.pb.cc.i" + cd /home/ubuntu/mprpc/build/example/callee && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/mprpc/example/friend.pb.cc > CMakeFiles/provider.dir/__/friend.pb.cc.i + +example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/provider.dir/__/friend.pb.cc.s" + cd /home/ubuntu/mprpc/build/example/callee && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/mprpc/example/friend.pb.cc -o CMakeFiles/provider.dir/__/friend.pb.cc.s + +# Object files for target provider +provider_OBJECTS = \ +"CMakeFiles/provider.dir/friendservice.cc.o" \ +"CMakeFiles/provider.dir/__/friend.pb.cc.o" + +# External object files for target provider +provider_EXTERNAL_OBJECTS = + +../bin/provider: example/callee/CMakeFiles/provider.dir/friendservice.cc.o +../bin/provider: example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.o +../bin/provider: example/callee/CMakeFiles/provider.dir/build.make +../bin/provider: ../lib/libmprpc.a +../bin/provider: example/callee/CMakeFiles/provider.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Linking CXX executable ../../../bin/provider" + cd /home/ubuntu/mprpc/build/example/callee && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/provider.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +example/callee/CMakeFiles/provider.dir/build: ../bin/provider + +.PHONY : example/callee/CMakeFiles/provider.dir/build + +example/callee/CMakeFiles/provider.dir/clean: + cd /home/ubuntu/mprpc/build/example/callee && $(CMAKE_COMMAND) -P CMakeFiles/provider.dir/cmake_clean.cmake +.PHONY : example/callee/CMakeFiles/provider.dir/clean + +example/callee/CMakeFiles/provider.dir/depend: + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/ubuntu/mprpc /home/ubuntu/mprpc/example/callee /home/ubuntu/mprpc/build /home/ubuntu/mprpc/build/example/callee /home/ubuntu/mprpc/build/example/callee/CMakeFiles/provider.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : example/callee/CMakeFiles/provider.dir/depend + diff --git a/mprpc/build/example/callee/CMakeFiles/provider.dir/cmake_clean.cmake b/mprpc/build/example/callee/CMakeFiles/provider.dir/cmake_clean.cmake new file mode 100644 index 0000000..6a621a9 --- /dev/null +++ b/mprpc/build/example/callee/CMakeFiles/provider.dir/cmake_clean.cmake @@ -0,0 +1,11 @@ +file(REMOVE_RECURSE + "../../../bin/provider" + "../../../bin/provider.pdb" + "CMakeFiles/provider.dir/__/friend.pb.cc.o" + "CMakeFiles/provider.dir/friendservice.cc.o" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/provider.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/mprpc/build/example/callee/CMakeFiles/provider.dir/depend.internal b/mprpc/build/example/callee/CMakeFiles/provider.dir/depend.internal new file mode 100644 index 0000000..f75194d --- /dev/null +++ b/mprpc/build/example/callee/CMakeFiles/provider.dir/depend.internal @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.o + /home/ubuntu/mprpc/example/friend.pb.cc + /home/ubuntu/mprpc/example/friend.pb.h +example/callee/CMakeFiles/provider.dir/friendservice.cc.o + ../example/friend.pb.h + ../src/include/lockqueue.h + ../src/include/logger.h + ../src/include/mprpcapplication.h + ../src/include/mprpcchannel.h + ../src/include/mprpcconfig.h + ../src/include/mprpccontroller.h + ../src/include/rpcprovider.h + /home/ubuntu/mprpc/example/callee/friendservice.cc diff --git a/mprpc/build/example/callee/CMakeFiles/provider.dir/depend.make b/mprpc/build/example/callee/CMakeFiles/provider.dir/depend.make new file mode 100644 index 0000000..f3c87d4 --- /dev/null +++ b/mprpc/build/example/callee/CMakeFiles/provider.dir/depend.make @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.o: ../example/friend.pb.cc +example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.o: ../example/friend.pb.h + +example/callee/CMakeFiles/provider.dir/friendservice.cc.o: ../example/friend.pb.h +example/callee/CMakeFiles/provider.dir/friendservice.cc.o: ../src/include/lockqueue.h +example/callee/CMakeFiles/provider.dir/friendservice.cc.o: ../src/include/logger.h +example/callee/CMakeFiles/provider.dir/friendservice.cc.o: ../src/include/mprpcapplication.h +example/callee/CMakeFiles/provider.dir/friendservice.cc.o: ../src/include/mprpcchannel.h +example/callee/CMakeFiles/provider.dir/friendservice.cc.o: ../src/include/mprpcconfig.h +example/callee/CMakeFiles/provider.dir/friendservice.cc.o: ../src/include/mprpccontroller.h +example/callee/CMakeFiles/provider.dir/friendservice.cc.o: ../src/include/rpcprovider.h +example/callee/CMakeFiles/provider.dir/friendservice.cc.o: ../example/callee/friendservice.cc + diff --git a/mprpc/build/example/callee/CMakeFiles/provider.dir/flags.make b/mprpc/build/example/callee/CMakeFiles/provider.dir/flags.make new file mode 100644 index 0000000..c3169d2 --- /dev/null +++ b/mprpc/build/example/callee/CMakeFiles/provider.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# compile CXX with /usr/bin/g++ +CXX_FLAGS = -g + +CXX_DEFINES = + +CXX_INCLUDES = -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example + diff --git a/mprpc/build/example/callee/CMakeFiles/provider.dir/link.txt b/mprpc/build/example/callee/CMakeFiles/provider.dir/link.txt new file mode 100644 index 0000000..21c3006 --- /dev/null +++ b/mprpc/build/example/callee/CMakeFiles/provider.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/g++ -g -rdynamic CMakeFiles/provider.dir/friendservice.cc.o CMakeFiles/provider.dir/__/friend.pb.cc.o -o ../../../bin/provider -L/home/ubuntu/mprpc/lib -Wl,-rpath,/home/ubuntu/mprpc/lib ../../../lib/libmprpc.a -lprotobuf -lmuduo_net -lmuduo_base -lpthread -lzookeeper_mt diff --git a/mprpc/build/example/callee/CMakeFiles/provider.dir/progress.make b/mprpc/build/example/callee/CMakeFiles/provider.dir/progress.make new file mode 100644 index 0000000..d47d864 --- /dev/null +++ b/mprpc/build/example/callee/CMakeFiles/provider.dir/progress.make @@ -0,0 +1,4 @@ +CMAKE_PROGRESS_1 = 13 +CMAKE_PROGRESS_2 = 14 +CMAKE_PROGRESS_3 = 15 + diff --git a/mprpc/build/example/callee/Makefile b/mprpc/build/example/callee/Makefile new file mode 100644 index 0000000..77d2b68 --- /dev/null +++ b/mprpc/build/example/callee/Makefile @@ -0,0 +1,210 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/ubuntu/mprpc + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/ubuntu/mprpc/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# The main all target +all: cmake_check_build_system + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles /home/ubuntu/mprpc/build/example/callee/CMakeFiles/progress.marks + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/callee/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/callee/clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/callee/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/callee/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +example/callee/CMakeFiles/provider.dir/rule: + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/callee/CMakeFiles/provider.dir/rule +.PHONY : example/callee/CMakeFiles/provider.dir/rule + +# Convenience name for target. +provider: example/callee/CMakeFiles/provider.dir/rule + +.PHONY : provider + +# fast build rule for target. +provider/fast: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/build +.PHONY : provider/fast + +__/friend.pb.o: __/friend.pb.cc.o + +.PHONY : __/friend.pb.o + +# target to build an object file +__/friend.pb.cc.o: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.o +.PHONY : __/friend.pb.cc.o + +__/friend.pb.i: __/friend.pb.cc.i + +.PHONY : __/friend.pb.i + +# target to preprocess a source file +__/friend.pb.cc.i: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.i +.PHONY : __/friend.pb.cc.i + +__/friend.pb.s: __/friend.pb.cc.s + +.PHONY : __/friend.pb.s + +# target to generate assembly for a file +__/friend.pb.cc.s: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/__/friend.pb.cc.s +.PHONY : __/friend.pb.cc.s + +friendservice.o: friendservice.cc.o + +.PHONY : friendservice.o + +# target to build an object file +friendservice.cc.o: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/friendservice.cc.o +.PHONY : friendservice.cc.o + +friendservice.i: friendservice.cc.i + +.PHONY : friendservice.i + +# target to preprocess a source file +friendservice.cc.i: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/friendservice.cc.i +.PHONY : friendservice.cc.i + +friendservice.s: friendservice.cc.s + +.PHONY : friendservice.s + +# target to generate assembly for a file +friendservice.cc.s: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/friendservice.cc.s +.PHONY : friendservice.cc.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... rebuild_cache" + @echo "... edit_cache" + @echo "... provider" + @echo "... __/friend.pb.o" + @echo "... __/friend.pb.i" + @echo "... __/friend.pb.s" + @echo "... friendservice.o" + @echo "... friendservice.i" + @echo "... friendservice.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/mprpc/build/example/callee/cmake_install.cmake b/mprpc/build/example/callee/cmake_install.cmake new file mode 100644 index 0000000..dff6a47 --- /dev/null +++ b/mprpc/build/example/callee/cmake_install.cmake @@ -0,0 +1,39 @@ +# Install script for directory: /home/ubuntu/mprpc/example/callee + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "Debug") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + diff --git a/mprpc/build/example/caller/CMakeFiles/CMakeDirectoryInformation.cmake b/mprpc/build/example/caller/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..a0ec875 --- /dev/null +++ b/mprpc/build/example/caller/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/mprpc") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/mprpc/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/mprpc/build/example/caller/CMakeFiles/consumer.dir/CXX.includecache b/mprpc/build/example/caller/CMakeFiles/consumer.dir/CXX.includecache new file mode 100644 index 0000000..6afa96b --- /dev/null +++ b/mprpc/build/example/caller/CMakeFiles/consumer.dir/CXX.includecache @@ -0,0 +1,140 @@ +#IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +../example/friend.pb.h +limits +- +string +- +google/protobuf/port_def.inc +- +google/protobuf/port_undef.inc +- +google/protobuf/io/coded_stream.h +- +google/protobuf/arena.h +- +google/protobuf/arenastring.h +- +google/protobuf/generated_message_util.h +- +google/protobuf/metadata_lite.h +- +google/protobuf/generated_message_reflection.h +- +google/protobuf/message.h +- +google/protobuf/repeated_field.h +- +google/protobuf/extension_set.h +- +google/protobuf/service.h +- +google/protobuf/unknown_field_set.h +- +google/protobuf/port_def.inc +- +google/protobuf/port_undef.inc +- + +../src/include/mprpcapplication.h +mprpcconfig.h +../src/include/mprpcconfig.h +mprpcchannel.h +../src/include/mprpcchannel.h +mprpccontroller.h +../src/include/mprpccontroller.h + +../src/include/mprpcchannel.h +google/protobuf/service.h +- +google/protobuf/descriptor.h +- +google/protobuf/message.h +- + +../src/include/mprpcconfig.h +unordered_map +- +string +- + +../src/include/mprpccontroller.h +google/protobuf/service.h +- +string +- + +/home/ubuntu/mprpc/example/caller/callfriendservice.cc +iostream +- +mprpcapplication.h +/home/ubuntu/mprpc/example/caller/mprpcapplication.h +friend.pb.h +/home/ubuntu/mprpc/example/caller/friend.pb.h + +/home/ubuntu/mprpc/example/friend.pb.cc +friend.pb.h +/home/ubuntu/mprpc/example/friend.pb.h +algorithm +- +google/protobuf/io/coded_stream.h +- +google/protobuf/extension_set.h +- +google/protobuf/wire_format_lite.h +- +google/protobuf/descriptor.h +- +google/protobuf/generated_message_reflection.h +- +google/protobuf/reflection_ops.h +- +google/protobuf/wire_format.h +- +google/protobuf/port_def.inc +- +google/protobuf/port_undef.inc +- + +/home/ubuntu/mprpc/example/friend.pb.h +limits +- +string +- +google/protobuf/port_def.inc +- +google/protobuf/port_undef.inc +- +google/protobuf/io/coded_stream.h +- +google/protobuf/arena.h +- +google/protobuf/arenastring.h +- +google/protobuf/generated_message_util.h +- +google/protobuf/metadata_lite.h +- +google/protobuf/generated_message_reflection.h +- +google/protobuf/message.h +- +google/protobuf/repeated_field.h +- +google/protobuf/extension_set.h +- +google/protobuf/service.h +- +google/protobuf/unknown_field_set.h +- +google/protobuf/port_def.inc +- +google/protobuf/port_undef.inc +- + diff --git a/mprpc/build/example/caller/CMakeFiles/consumer.dir/DependInfo.cmake b/mprpc/build/example/caller/CMakeFiles/consumer.dir/DependInfo.cmake new file mode 100644 index 0000000..956e0a6 --- /dev/null +++ b/mprpc/build/example/caller/CMakeFiles/consumer.dir/DependInfo.cmake @@ -0,0 +1,24 @@ +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + "CXX" + ) +# The set of files for implicit dependencies of each language: +set(CMAKE_DEPENDS_CHECK_CXX + "/home/ubuntu/mprpc/example/friend.pb.cc" "/home/ubuntu/mprpc/build/example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.o" + "/home/ubuntu/mprpc/example/caller/callfriendservice.cc" "/home/ubuntu/mprpc/build/example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o" + ) +set(CMAKE_CXX_COMPILER_ID "GNU") + +# The include file search paths: +set(CMAKE_CXX_TARGET_INCLUDE_PATH + "../src/include" + "../example" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + "/home/ubuntu/mprpc/build/src/CMakeFiles/mprpc.dir/DependInfo.cmake" + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/mprpc/build/example/caller/CMakeFiles/consumer.dir/build.make b/mprpc/build/example/caller/CMakeFiles/consumer.dir/build.make new file mode 100644 index 0000000..8d9555f --- /dev/null +++ b/mprpc/build/example/caller/CMakeFiles/consumer.dir/build.make @@ -0,0 +1,114 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/ubuntu/mprpc + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/ubuntu/mprpc/build + +# Include any dependencies generated for this target. +include example/caller/CMakeFiles/consumer.dir/depend.make + +# Include the progress variables for this target. +include example/caller/CMakeFiles/consumer.dir/progress.make + +# Include the compile flags for this target's objects. +include example/caller/CMakeFiles/consumer.dir/flags.make + +example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o: example/caller/CMakeFiles/consumer.dir/flags.make +example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o: ../example/caller/callfriendservice.cc + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o" + cd /home/ubuntu/mprpc/build/example/caller && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/consumer.dir/callfriendservice.cc.o -c /home/ubuntu/mprpc/example/caller/callfriendservice.cc + +example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/consumer.dir/callfriendservice.cc.i" + cd /home/ubuntu/mprpc/build/example/caller && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/mprpc/example/caller/callfriendservice.cc > CMakeFiles/consumer.dir/callfriendservice.cc.i + +example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/consumer.dir/callfriendservice.cc.s" + cd /home/ubuntu/mprpc/build/example/caller && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/mprpc/example/caller/callfriendservice.cc -o CMakeFiles/consumer.dir/callfriendservice.cc.s + +example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.o: example/caller/CMakeFiles/consumer.dir/flags.make +example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.o: ../example/friend.pb.cc + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.o" + cd /home/ubuntu/mprpc/build/example/caller && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/consumer.dir/__/friend.pb.cc.o -c /home/ubuntu/mprpc/example/friend.pb.cc + +example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/consumer.dir/__/friend.pb.cc.i" + cd /home/ubuntu/mprpc/build/example/caller && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/mprpc/example/friend.pb.cc > CMakeFiles/consumer.dir/__/friend.pb.cc.i + +example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/consumer.dir/__/friend.pb.cc.s" + cd /home/ubuntu/mprpc/build/example/caller && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/mprpc/example/friend.pb.cc -o CMakeFiles/consumer.dir/__/friend.pb.cc.s + +# Object files for target consumer +consumer_OBJECTS = \ +"CMakeFiles/consumer.dir/callfriendservice.cc.o" \ +"CMakeFiles/consumer.dir/__/friend.pb.cc.o" + +# External object files for target consumer +consumer_EXTERNAL_OBJECTS = + +../bin/consumer: example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o +../bin/consumer: example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.o +../bin/consumer: example/caller/CMakeFiles/consumer.dir/build.make +../bin/consumer: ../lib/libmprpc.a +../bin/consumer: example/caller/CMakeFiles/consumer.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Linking CXX executable ../../../bin/consumer" + cd /home/ubuntu/mprpc/build/example/caller && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/consumer.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +example/caller/CMakeFiles/consumer.dir/build: ../bin/consumer + +.PHONY : example/caller/CMakeFiles/consumer.dir/build + +example/caller/CMakeFiles/consumer.dir/clean: + cd /home/ubuntu/mprpc/build/example/caller && $(CMAKE_COMMAND) -P CMakeFiles/consumer.dir/cmake_clean.cmake +.PHONY : example/caller/CMakeFiles/consumer.dir/clean + +example/caller/CMakeFiles/consumer.dir/depend: + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/ubuntu/mprpc /home/ubuntu/mprpc/example/caller /home/ubuntu/mprpc/build /home/ubuntu/mprpc/build/example/caller /home/ubuntu/mprpc/build/example/caller/CMakeFiles/consumer.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : example/caller/CMakeFiles/consumer.dir/depend + diff --git a/mprpc/build/example/caller/CMakeFiles/consumer.dir/cmake_clean.cmake b/mprpc/build/example/caller/CMakeFiles/consumer.dir/cmake_clean.cmake new file mode 100644 index 0000000..a81ae78 --- /dev/null +++ b/mprpc/build/example/caller/CMakeFiles/consumer.dir/cmake_clean.cmake @@ -0,0 +1,11 @@ +file(REMOVE_RECURSE + "../../../bin/consumer" + "../../../bin/consumer.pdb" + "CMakeFiles/consumer.dir/__/friend.pb.cc.o" + "CMakeFiles/consumer.dir/callfriendservice.cc.o" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/consumer.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/mprpc/build/example/caller/CMakeFiles/consumer.dir/depend.internal b/mprpc/build/example/caller/CMakeFiles/consumer.dir/depend.internal new file mode 100644 index 0000000..f345675 --- /dev/null +++ b/mprpc/build/example/caller/CMakeFiles/consumer.dir/depend.internal @@ -0,0 +1,13 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.o + /home/ubuntu/mprpc/example/friend.pb.cc + /home/ubuntu/mprpc/example/friend.pb.h +example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o + ../example/friend.pb.h + ../src/include/mprpcapplication.h + ../src/include/mprpcchannel.h + ../src/include/mprpcconfig.h + ../src/include/mprpccontroller.h + /home/ubuntu/mprpc/example/caller/callfriendservice.cc diff --git a/mprpc/build/example/caller/CMakeFiles/consumer.dir/depend.make b/mprpc/build/example/caller/CMakeFiles/consumer.dir/depend.make new file mode 100644 index 0000000..f9b055f --- /dev/null +++ b/mprpc/build/example/caller/CMakeFiles/consumer.dir/depend.make @@ -0,0 +1,13 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.o: ../example/friend.pb.cc +example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.o: ../example/friend.pb.h + +example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o: ../example/friend.pb.h +example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o: ../src/include/mprpcapplication.h +example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o: ../src/include/mprpcchannel.h +example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o: ../src/include/mprpcconfig.h +example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o: ../src/include/mprpccontroller.h +example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o: ../example/caller/callfriendservice.cc + diff --git a/mprpc/build/example/caller/CMakeFiles/consumer.dir/flags.make b/mprpc/build/example/caller/CMakeFiles/consumer.dir/flags.make new file mode 100644 index 0000000..c3169d2 --- /dev/null +++ b/mprpc/build/example/caller/CMakeFiles/consumer.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# compile CXX with /usr/bin/g++ +CXX_FLAGS = -g + +CXX_DEFINES = + +CXX_INCLUDES = -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example + diff --git a/mprpc/build/example/caller/CMakeFiles/consumer.dir/link.txt b/mprpc/build/example/caller/CMakeFiles/consumer.dir/link.txt new file mode 100644 index 0000000..5076874 --- /dev/null +++ b/mprpc/build/example/caller/CMakeFiles/consumer.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/g++ -g -rdynamic CMakeFiles/consumer.dir/callfriendservice.cc.o CMakeFiles/consumer.dir/__/friend.pb.cc.o -o ../../../bin/consumer -L/home/ubuntu/mprpc/lib -Wl,-rpath,/home/ubuntu/mprpc/lib ../../../lib/libmprpc.a -lprotobuf -lmuduo_net -lmuduo_base -lpthread -lzookeeper_mt diff --git a/mprpc/build/example/caller/CMakeFiles/consumer.dir/progress.make b/mprpc/build/example/caller/CMakeFiles/consumer.dir/progress.make new file mode 100644 index 0000000..6a9dc74 --- /dev/null +++ b/mprpc/build/example/caller/CMakeFiles/consumer.dir/progress.make @@ -0,0 +1,4 @@ +CMAKE_PROGRESS_1 = 1 +CMAKE_PROGRESS_2 = 2 +CMAKE_PROGRESS_3 = 3 + diff --git a/mprpc/build/example/caller/CMakeFiles/progress.marks b/mprpc/build/example/caller/CMakeFiles/progress.marks new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/mprpc/build/example/caller/CMakeFiles/progress.marks @@ -0,0 +1 @@ +12 diff --git a/mprpc/build/example/caller/Makefile b/mprpc/build/example/caller/Makefile new file mode 100644 index 0000000..8ddc9b6 --- /dev/null +++ b/mprpc/build/example/caller/Makefile @@ -0,0 +1,210 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/ubuntu/mprpc + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/ubuntu/mprpc/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# The main all target +all: cmake_check_build_system + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles /home/ubuntu/mprpc/build/example/caller/CMakeFiles/progress.marks + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/caller/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/caller/clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/caller/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/caller/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +example/caller/CMakeFiles/consumer.dir/rule: + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 example/caller/CMakeFiles/consumer.dir/rule +.PHONY : example/caller/CMakeFiles/consumer.dir/rule + +# Convenience name for target. +consumer: example/caller/CMakeFiles/consumer.dir/rule + +.PHONY : consumer + +# fast build rule for target. +consumer/fast: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/caller/CMakeFiles/consumer.dir/build.make example/caller/CMakeFiles/consumer.dir/build +.PHONY : consumer/fast + +__/friend.pb.o: __/friend.pb.cc.o + +.PHONY : __/friend.pb.o + +# target to build an object file +__/friend.pb.cc.o: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/caller/CMakeFiles/consumer.dir/build.make example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.o +.PHONY : __/friend.pb.cc.o + +__/friend.pb.i: __/friend.pb.cc.i + +.PHONY : __/friend.pb.i + +# target to preprocess a source file +__/friend.pb.cc.i: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/caller/CMakeFiles/consumer.dir/build.make example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.i +.PHONY : __/friend.pb.cc.i + +__/friend.pb.s: __/friend.pb.cc.s + +.PHONY : __/friend.pb.s + +# target to generate assembly for a file +__/friend.pb.cc.s: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/caller/CMakeFiles/consumer.dir/build.make example/caller/CMakeFiles/consumer.dir/__/friend.pb.cc.s +.PHONY : __/friend.pb.cc.s + +callfriendservice.o: callfriendservice.cc.o + +.PHONY : callfriendservice.o + +# target to build an object file +callfriendservice.cc.o: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/caller/CMakeFiles/consumer.dir/build.make example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.o +.PHONY : callfriendservice.cc.o + +callfriendservice.i: callfriendservice.cc.i + +.PHONY : callfriendservice.i + +# target to preprocess a source file +callfriendservice.cc.i: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/caller/CMakeFiles/consumer.dir/build.make example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.i +.PHONY : callfriendservice.cc.i + +callfriendservice.s: callfriendservice.cc.s + +.PHONY : callfriendservice.s + +# target to generate assembly for a file +callfriendservice.cc.s: + cd /home/ubuntu/mprpc/build && $(MAKE) -f example/caller/CMakeFiles/consumer.dir/build.make example/caller/CMakeFiles/consumer.dir/callfriendservice.cc.s +.PHONY : callfriendservice.cc.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... rebuild_cache" + @echo "... edit_cache" + @echo "... consumer" + @echo "... __/friend.pb.o" + @echo "... __/friend.pb.i" + @echo "... __/friend.pb.s" + @echo "... callfriendservice.o" + @echo "... callfriendservice.i" + @echo "... callfriendservice.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/mprpc/build/example/caller/cmake_install.cmake b/mprpc/build/example/caller/cmake_install.cmake new file mode 100644 index 0000000..2d9efa2 --- /dev/null +++ b/mprpc/build/example/caller/cmake_install.cmake @@ -0,0 +1,39 @@ +# Install script for directory: /home/ubuntu/mprpc/example/caller + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "Debug") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + diff --git a/mprpc/build/example/cmake_install.cmake b/mprpc/build/example/cmake_install.cmake new file mode 100644 index 0000000..8d9e855 --- /dev/null +++ b/mprpc/build/example/cmake_install.cmake @@ -0,0 +1,46 @@ +# Install script for directory: /home/ubuntu/mprpc/example + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "Debug") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for each subdirectory. + include("/home/ubuntu/mprpc/build/example/callee/cmake_install.cmake") + include("/home/ubuntu/mprpc/build/example/caller/cmake_install.cmake") + +endif() + diff --git a/mprpc/build/src/CMakeFiles/CMakeDirectoryInformation.cmake b/mprpc/build/src/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..a0ec875 --- /dev/null +++ b/mprpc/build/src/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/mprpc") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/mprpc/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/mprpc/build/src/CMakeFiles/mprpc.dir/CXX.includecache b/mprpc/build/src/CMakeFiles/mprpc.dir/CXX.includecache new file mode 100644 index 0000000..0eb5c62 --- /dev/null +++ b/mprpc/build/src/CMakeFiles/mprpc.dir/CXX.includecache @@ -0,0 +1,136 @@ +#IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +../src/include/lockqueue.h +queue +- +thread +- +mutex +- +condition_variable +- + +../src/include/logger.h +lockqueue.h +- +string +- + +../src/include/mprpcapplication.h +mprpcconfig.h +../src/include/mprpcconfig.h +mprpcchannel.h +../src/include/mprpcchannel.h +mprpccontroller.h +../src/include/mprpccontroller.h + +../src/include/mprpcchannel.h +google/protobuf/service.h +- +google/protobuf/descriptor.h +- +google/protobuf/message.h +- + +../src/include/mprpcconfig.h +unordered_map +- +string +- + +../src/include/mprpccontroller.h +google/protobuf/service.h +- +string +- + +../src/include/rpcheader.pb.h +limits +- +string +- +google/protobuf/port_def.inc +- +google/protobuf/port_undef.inc +- +google/protobuf/io/coded_stream.h +- +google/protobuf/arena.h +- +google/protobuf/arenastring.h +- +google/protobuf/generated_message_util.h +- +google/protobuf/metadata_lite.h +- +google/protobuf/generated_message_reflection.h +- +google/protobuf/message.h +- +google/protobuf/repeated_field.h +- +google/protobuf/extension_set.h +- +google/protobuf/unknown_field_set.h +- +google/protobuf/port_def.inc +- +google/protobuf/port_undef.inc +- + +../src/include/rpcprovider.h +google/protobuf/service.h +../src/include/google/protobuf/service.h +muduo/net/TcpServer.h +- +muduo/net/EventLoop.h +- +muduo/net/InetAddress.h +- +muduo/net/TcpConnection.h +- +string +- +functional +- +google/protobuf/descriptor.h +- +unordered_map +- + +../src/include/zookeeperutil.h +semaphore.h +- +zookeeper/zookeeper.h +- +string +- + +/home/ubuntu/mprpc/src/rpcprovider.cc +rpcprovider.h +/home/ubuntu/mprpc/src/rpcprovider.h +mprpcapplication.h +/home/ubuntu/mprpc/src/mprpcapplication.h +rpcheader.pb.h +/home/ubuntu/mprpc/src/rpcheader.pb.h +logger.h +/home/ubuntu/mprpc/src/logger.h +zookeeperutil.h +/home/ubuntu/mprpc/src/zookeeperutil.h + +/home/ubuntu/mprpc/src/zookeeperutil.cc +zookeeperutil.h +/home/ubuntu/mprpc/src/zookeeperutil.h +mprpcapplication.h +/home/ubuntu/mprpc/src/mprpcapplication.h +semaphore.h +- +iostream +- + diff --git a/mprpc/build/src/CMakeFiles/mprpc.dir/DependInfo.cmake b/mprpc/build/src/CMakeFiles/mprpc.dir/DependInfo.cmake new file mode 100644 index 0000000..c18dcd6 --- /dev/null +++ b/mprpc/build/src/CMakeFiles/mprpc.dir/DependInfo.cmake @@ -0,0 +1,29 @@ +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + "CXX" + ) +# The set of files for implicit dependencies of each language: +set(CMAKE_DEPENDS_CHECK_CXX + "/home/ubuntu/mprpc/src/logger.cc" "/home/ubuntu/mprpc/build/src/CMakeFiles/mprpc.dir/logger.cc.o" + "/home/ubuntu/mprpc/src/mprpcapplication.cc" "/home/ubuntu/mprpc/build/src/CMakeFiles/mprpc.dir/mprpcapplication.cc.o" + "/home/ubuntu/mprpc/src/mprpcchannel.cc" "/home/ubuntu/mprpc/build/src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o" + "/home/ubuntu/mprpc/src/mprpcconfig.cc" "/home/ubuntu/mprpc/build/src/CMakeFiles/mprpc.dir/mprpcconfig.cc.o" + "/home/ubuntu/mprpc/src/mprpccontroller.cc" "/home/ubuntu/mprpc/build/src/CMakeFiles/mprpc.dir/mprpccontroller.cc.o" + "/home/ubuntu/mprpc/src/rpcheader.pb.cc" "/home/ubuntu/mprpc/build/src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.o" + "/home/ubuntu/mprpc/src/rpcprovider.cc" "/home/ubuntu/mprpc/build/src/CMakeFiles/mprpc.dir/rpcprovider.cc.o" + "/home/ubuntu/mprpc/src/zookeeperutil.cc" "/home/ubuntu/mprpc/build/src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o" + ) +set(CMAKE_CXX_COMPILER_ID "GNU") + +# The include file search paths: +set(CMAKE_CXX_TARGET_INCLUDE_PATH + "../src/include" + "../example" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/mprpc/build/src/CMakeFiles/mprpc.dir/build.make b/mprpc/build/src/CMakeFiles/mprpc.dir/build.make new file mode 100644 index 0000000..f7cdcd4 --- /dev/null +++ b/mprpc/build/src/CMakeFiles/mprpc.dir/build.make @@ -0,0 +1,204 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/ubuntu/mprpc + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/ubuntu/mprpc/build + +# Include any dependencies generated for this target. +include src/CMakeFiles/mprpc.dir/depend.make + +# Include the progress variables for this target. +include src/CMakeFiles/mprpc.dir/progress.make + +# Include the compile flags for this target's objects. +include src/CMakeFiles/mprpc.dir/flags.make + +src/CMakeFiles/mprpc.dir/mprpcapplication.cc.o: src/CMakeFiles/mprpc.dir/flags.make +src/CMakeFiles/mprpc.dir/mprpcapplication.cc.o: ../src/mprpcapplication.cc + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object src/CMakeFiles/mprpc.dir/mprpcapplication.cc.o" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/mprpc.dir/mprpcapplication.cc.o -c /home/ubuntu/mprpc/src/mprpcapplication.cc + +src/CMakeFiles/mprpc.dir/mprpcapplication.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/mprpc.dir/mprpcapplication.cc.i" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/mprpc/src/mprpcapplication.cc > CMakeFiles/mprpc.dir/mprpcapplication.cc.i + +src/CMakeFiles/mprpc.dir/mprpcapplication.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/mprpc.dir/mprpcapplication.cc.s" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/mprpc/src/mprpcapplication.cc -o CMakeFiles/mprpc.dir/mprpcapplication.cc.s + +src/CMakeFiles/mprpc.dir/mprpcconfig.cc.o: src/CMakeFiles/mprpc.dir/flags.make +src/CMakeFiles/mprpc.dir/mprpcconfig.cc.o: ../src/mprpcconfig.cc + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object src/CMakeFiles/mprpc.dir/mprpcconfig.cc.o" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/mprpc.dir/mprpcconfig.cc.o -c /home/ubuntu/mprpc/src/mprpcconfig.cc + +src/CMakeFiles/mprpc.dir/mprpcconfig.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/mprpc.dir/mprpcconfig.cc.i" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/mprpc/src/mprpcconfig.cc > CMakeFiles/mprpc.dir/mprpcconfig.cc.i + +src/CMakeFiles/mprpc.dir/mprpcconfig.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/mprpc.dir/mprpcconfig.cc.s" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/mprpc/src/mprpcconfig.cc -o CMakeFiles/mprpc.dir/mprpcconfig.cc.s + +src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.o: src/CMakeFiles/mprpc.dir/flags.make +src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.o: ../src/rpcheader.pb.cc + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.o" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/mprpc.dir/rpcheader.pb.cc.o -c /home/ubuntu/mprpc/src/rpcheader.pb.cc + +src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/mprpc.dir/rpcheader.pb.cc.i" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/mprpc/src/rpcheader.pb.cc > CMakeFiles/mprpc.dir/rpcheader.pb.cc.i + +src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/mprpc.dir/rpcheader.pb.cc.s" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/mprpc/src/rpcheader.pb.cc -o CMakeFiles/mprpc.dir/rpcheader.pb.cc.s + +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o: src/CMakeFiles/mprpc.dir/flags.make +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o: ../src/rpcprovider.cc + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building CXX object src/CMakeFiles/mprpc.dir/rpcprovider.cc.o" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/mprpc.dir/rpcprovider.cc.o -c /home/ubuntu/mprpc/src/rpcprovider.cc + +src/CMakeFiles/mprpc.dir/rpcprovider.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/mprpc.dir/rpcprovider.cc.i" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/mprpc/src/rpcprovider.cc > CMakeFiles/mprpc.dir/rpcprovider.cc.i + +src/CMakeFiles/mprpc.dir/rpcprovider.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/mprpc.dir/rpcprovider.cc.s" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/mprpc/src/rpcprovider.cc -o CMakeFiles/mprpc.dir/rpcprovider.cc.s + +src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o: src/CMakeFiles/mprpc.dir/flags.make +src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o: ../src/mprpcchannel.cc + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Building CXX object src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/mprpc.dir/mprpcchannel.cc.o -c /home/ubuntu/mprpc/src/mprpcchannel.cc + +src/CMakeFiles/mprpc.dir/mprpcchannel.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/mprpc.dir/mprpcchannel.cc.i" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/mprpc/src/mprpcchannel.cc > CMakeFiles/mprpc.dir/mprpcchannel.cc.i + +src/CMakeFiles/mprpc.dir/mprpcchannel.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/mprpc.dir/mprpcchannel.cc.s" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/mprpc/src/mprpcchannel.cc -o CMakeFiles/mprpc.dir/mprpcchannel.cc.s + +src/CMakeFiles/mprpc.dir/mprpccontroller.cc.o: src/CMakeFiles/mprpc.dir/flags.make +src/CMakeFiles/mprpc.dir/mprpccontroller.cc.o: ../src/mprpccontroller.cc + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building CXX object src/CMakeFiles/mprpc.dir/mprpccontroller.cc.o" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/mprpc.dir/mprpccontroller.cc.o -c /home/ubuntu/mprpc/src/mprpccontroller.cc + +src/CMakeFiles/mprpc.dir/mprpccontroller.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/mprpc.dir/mprpccontroller.cc.i" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/mprpc/src/mprpccontroller.cc > CMakeFiles/mprpc.dir/mprpccontroller.cc.i + +src/CMakeFiles/mprpc.dir/mprpccontroller.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/mprpc.dir/mprpccontroller.cc.s" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/mprpc/src/mprpccontroller.cc -o CMakeFiles/mprpc.dir/mprpccontroller.cc.s + +src/CMakeFiles/mprpc.dir/logger.cc.o: src/CMakeFiles/mprpc.dir/flags.make +src/CMakeFiles/mprpc.dir/logger.cc.o: ../src/logger.cc + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Building CXX object src/CMakeFiles/mprpc.dir/logger.cc.o" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/mprpc.dir/logger.cc.o -c /home/ubuntu/mprpc/src/logger.cc + +src/CMakeFiles/mprpc.dir/logger.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/mprpc.dir/logger.cc.i" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/mprpc/src/logger.cc > CMakeFiles/mprpc.dir/logger.cc.i + +src/CMakeFiles/mprpc.dir/logger.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/mprpc.dir/logger.cc.s" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/mprpc/src/logger.cc -o CMakeFiles/mprpc.dir/logger.cc.s + +src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o: src/CMakeFiles/mprpc.dir/flags.make +src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o: ../src/zookeeperutil.cc + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) "Building CXX object src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/mprpc.dir/zookeeperutil.cc.o -c /home/ubuntu/mprpc/src/zookeeperutil.cc + +src/CMakeFiles/mprpc.dir/zookeeperutil.cc.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/mprpc.dir/zookeeperutil.cc.i" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/mprpc/src/zookeeperutil.cc > CMakeFiles/mprpc.dir/zookeeperutil.cc.i + +src/CMakeFiles/mprpc.dir/zookeeperutil.cc.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/mprpc.dir/zookeeperutil.cc.s" + cd /home/ubuntu/mprpc/build/src && /usr/bin/g++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/mprpc/src/zookeeperutil.cc -o CMakeFiles/mprpc.dir/zookeeperutil.cc.s + +# Object files for target mprpc +mprpc_OBJECTS = \ +"CMakeFiles/mprpc.dir/mprpcapplication.cc.o" \ +"CMakeFiles/mprpc.dir/mprpcconfig.cc.o" \ +"CMakeFiles/mprpc.dir/rpcheader.pb.cc.o" \ +"CMakeFiles/mprpc.dir/rpcprovider.cc.o" \ +"CMakeFiles/mprpc.dir/mprpcchannel.cc.o" \ +"CMakeFiles/mprpc.dir/mprpccontroller.cc.o" \ +"CMakeFiles/mprpc.dir/logger.cc.o" \ +"CMakeFiles/mprpc.dir/zookeeperutil.cc.o" + +# External object files for target mprpc +mprpc_EXTERNAL_OBJECTS = + +../lib/libmprpc.a: src/CMakeFiles/mprpc.dir/mprpcapplication.cc.o +../lib/libmprpc.a: src/CMakeFiles/mprpc.dir/mprpcconfig.cc.o +../lib/libmprpc.a: src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.o +../lib/libmprpc.a: src/CMakeFiles/mprpc.dir/rpcprovider.cc.o +../lib/libmprpc.a: src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o +../lib/libmprpc.a: src/CMakeFiles/mprpc.dir/mprpccontroller.cc.o +../lib/libmprpc.a: src/CMakeFiles/mprpc.dir/logger.cc.o +../lib/libmprpc.a: src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o +../lib/libmprpc.a: src/CMakeFiles/mprpc.dir/build.make +../lib/libmprpc.a: src/CMakeFiles/mprpc.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/ubuntu/mprpc/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Linking CXX static library ../../lib/libmprpc.a" + cd /home/ubuntu/mprpc/build/src && $(CMAKE_COMMAND) -P CMakeFiles/mprpc.dir/cmake_clean_target.cmake + cd /home/ubuntu/mprpc/build/src && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/mprpc.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +src/CMakeFiles/mprpc.dir/build: ../lib/libmprpc.a + +.PHONY : src/CMakeFiles/mprpc.dir/build + +src/CMakeFiles/mprpc.dir/clean: + cd /home/ubuntu/mprpc/build/src && $(CMAKE_COMMAND) -P CMakeFiles/mprpc.dir/cmake_clean.cmake +.PHONY : src/CMakeFiles/mprpc.dir/clean + +src/CMakeFiles/mprpc.dir/depend: + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/ubuntu/mprpc /home/ubuntu/mprpc/src /home/ubuntu/mprpc/build /home/ubuntu/mprpc/build/src /home/ubuntu/mprpc/build/src/CMakeFiles/mprpc.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : src/CMakeFiles/mprpc.dir/depend + diff --git a/mprpc/build/src/CMakeFiles/mprpc.dir/cmake_clean.cmake b/mprpc/build/src/CMakeFiles/mprpc.dir/cmake_clean.cmake new file mode 100644 index 0000000..983765e --- /dev/null +++ b/mprpc/build/src/CMakeFiles/mprpc.dir/cmake_clean.cmake @@ -0,0 +1,17 @@ +file(REMOVE_RECURSE + "../../lib/libmprpc.a" + "../../lib/libmprpc.pdb" + "CMakeFiles/mprpc.dir/logger.cc.o" + "CMakeFiles/mprpc.dir/mprpcapplication.cc.o" + "CMakeFiles/mprpc.dir/mprpcchannel.cc.o" + "CMakeFiles/mprpc.dir/mprpcconfig.cc.o" + "CMakeFiles/mprpc.dir/mprpccontroller.cc.o" + "CMakeFiles/mprpc.dir/rpcheader.pb.cc.o" + "CMakeFiles/mprpc.dir/rpcprovider.cc.o" + "CMakeFiles/mprpc.dir/zookeeperutil.cc.o" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/mprpc.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/mprpc/build/src/CMakeFiles/mprpc.dir/cmake_clean_target.cmake b/mprpc/build/src/CMakeFiles/mprpc.dir/cmake_clean_target.cmake new file mode 100644 index 0000000..6463a19 --- /dev/null +++ b/mprpc/build/src/CMakeFiles/mprpc.dir/cmake_clean_target.cmake @@ -0,0 +1,3 @@ +file(REMOVE_RECURSE + "../../lib/libmprpc.a" +) diff --git a/mprpc/build/src/CMakeFiles/mprpc.dir/depend.internal b/mprpc/build/src/CMakeFiles/mprpc.dir/depend.internal new file mode 100644 index 0000000..40a1e6e --- /dev/null +++ b/mprpc/build/src/CMakeFiles/mprpc.dir/depend.internal @@ -0,0 +1,48 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +src/CMakeFiles/mprpc.dir/logger.cc.o + ../src/include/lockqueue.h + ../src/include/logger.h + /home/ubuntu/mprpc/src/logger.cc +src/CMakeFiles/mprpc.dir/mprpcapplication.cc.o + ../src/include/mprpcapplication.h + ../src/include/mprpcchannel.h + ../src/include/mprpcconfig.h + ../src/include/mprpccontroller.h + /home/ubuntu/mprpc/src/mprpcapplication.cc +src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o + ../src/include/mprpcapplication.h + ../src/include/mprpcchannel.h + ../src/include/mprpcconfig.h + ../src/include/mprpccontroller.h + ../src/include/rpcheader.pb.h + ../src/include/zookeeperutil.h + /home/ubuntu/mprpc/src/mprpcchannel.cc +src/CMakeFiles/mprpc.dir/mprpcconfig.cc.o + ../src/include/mprpcconfig.h + /home/ubuntu/mprpc/src/mprpcconfig.cc +src/CMakeFiles/mprpc.dir/mprpccontroller.cc.o + ../src/include/mprpccontroller.h + /home/ubuntu/mprpc/src/mprpccontroller.cc +src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.o + ../src/include/rpcheader.pb.h + /home/ubuntu/mprpc/src/rpcheader.pb.cc +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o + ../src/include/lockqueue.h + ../src/include/logger.h + ../src/include/mprpcapplication.h + ../src/include/mprpcchannel.h + ../src/include/mprpcconfig.h + ../src/include/mprpccontroller.h + ../src/include/rpcheader.pb.h + ../src/include/rpcprovider.h + ../src/include/zookeeperutil.h + /home/ubuntu/mprpc/src/rpcprovider.cc +src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o + ../src/include/mprpcapplication.h + ../src/include/mprpcchannel.h + ../src/include/mprpcconfig.h + ../src/include/mprpccontroller.h + ../src/include/zookeeperutil.h + /home/ubuntu/mprpc/src/zookeeperutil.cc diff --git a/mprpc/build/src/CMakeFiles/mprpc.dir/depend.make b/mprpc/build/src/CMakeFiles/mprpc.dir/depend.make new file mode 100644 index 0000000..ac85070 --- /dev/null +++ b/mprpc/build/src/CMakeFiles/mprpc.dir/depend.make @@ -0,0 +1,48 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +src/CMakeFiles/mprpc.dir/logger.cc.o: ../src/include/lockqueue.h +src/CMakeFiles/mprpc.dir/logger.cc.o: ../src/include/logger.h +src/CMakeFiles/mprpc.dir/logger.cc.o: ../src/logger.cc + +src/CMakeFiles/mprpc.dir/mprpcapplication.cc.o: ../src/include/mprpcapplication.h +src/CMakeFiles/mprpc.dir/mprpcapplication.cc.o: ../src/include/mprpcchannel.h +src/CMakeFiles/mprpc.dir/mprpcapplication.cc.o: ../src/include/mprpcconfig.h +src/CMakeFiles/mprpc.dir/mprpcapplication.cc.o: ../src/include/mprpccontroller.h +src/CMakeFiles/mprpc.dir/mprpcapplication.cc.o: ../src/mprpcapplication.cc + +src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o: ../src/include/mprpcapplication.h +src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o: ../src/include/mprpcchannel.h +src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o: ../src/include/mprpcconfig.h +src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o: ../src/include/mprpccontroller.h +src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o: ../src/include/rpcheader.pb.h +src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o: ../src/include/zookeeperutil.h +src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o: ../src/mprpcchannel.cc + +src/CMakeFiles/mprpc.dir/mprpcconfig.cc.o: ../src/include/mprpcconfig.h +src/CMakeFiles/mprpc.dir/mprpcconfig.cc.o: ../src/mprpcconfig.cc + +src/CMakeFiles/mprpc.dir/mprpccontroller.cc.o: ../src/include/mprpccontroller.h +src/CMakeFiles/mprpc.dir/mprpccontroller.cc.o: ../src/mprpccontroller.cc + +src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.o: ../src/include/rpcheader.pb.h +src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.o: ../src/rpcheader.pb.cc + +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o: ../src/include/lockqueue.h +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o: ../src/include/logger.h +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o: ../src/include/mprpcapplication.h +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o: ../src/include/mprpcchannel.h +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o: ../src/include/mprpcconfig.h +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o: ../src/include/mprpccontroller.h +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o: ../src/include/rpcheader.pb.h +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o: ../src/include/rpcprovider.h +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o: ../src/include/zookeeperutil.h +src/CMakeFiles/mprpc.dir/rpcprovider.cc.o: ../src/rpcprovider.cc + +src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o: ../src/include/mprpcapplication.h +src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o: ../src/include/mprpcchannel.h +src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o: ../src/include/mprpcconfig.h +src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o: ../src/include/mprpccontroller.h +src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o: ../src/include/zookeeperutil.h +src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o: ../src/zookeeperutil.cc + diff --git a/mprpc/build/src/CMakeFiles/mprpc.dir/flags.make b/mprpc/build/src/CMakeFiles/mprpc.dir/flags.make new file mode 100644 index 0000000..c3169d2 --- /dev/null +++ b/mprpc/build/src/CMakeFiles/mprpc.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# compile CXX with /usr/bin/g++ +CXX_FLAGS = -g + +CXX_DEFINES = + +CXX_INCLUDES = -I/home/ubuntu/mprpc/src/include -I/home/ubuntu/mprpc/example + diff --git a/mprpc/build/src/CMakeFiles/mprpc.dir/link.txt b/mprpc/build/src/CMakeFiles/mprpc.dir/link.txt new file mode 100644 index 0000000..cc3fe00 --- /dev/null +++ b/mprpc/build/src/CMakeFiles/mprpc.dir/link.txt @@ -0,0 +1,2 @@ +/usr/bin/ar qc ../../lib/libmprpc.a CMakeFiles/mprpc.dir/mprpcapplication.cc.o CMakeFiles/mprpc.dir/mprpcconfig.cc.o CMakeFiles/mprpc.dir/rpcheader.pb.cc.o CMakeFiles/mprpc.dir/rpcprovider.cc.o CMakeFiles/mprpc.dir/mprpcchannel.cc.o CMakeFiles/mprpc.dir/mprpccontroller.cc.o CMakeFiles/mprpc.dir/logger.cc.o CMakeFiles/mprpc.dir/zookeeperutil.cc.o +/usr/bin/ranlib ../../lib/libmprpc.a diff --git a/mprpc/build/src/CMakeFiles/mprpc.dir/progress.make b/mprpc/build/src/CMakeFiles/mprpc.dir/progress.make new file mode 100644 index 0000000..4483204 --- /dev/null +++ b/mprpc/build/src/CMakeFiles/mprpc.dir/progress.make @@ -0,0 +1,10 @@ +CMAKE_PROGRESS_1 = 4 +CMAKE_PROGRESS_2 = 5 +CMAKE_PROGRESS_3 = 6 +CMAKE_PROGRESS_4 = 7 +CMAKE_PROGRESS_5 = 8 +CMAKE_PROGRESS_6 = 9 +CMAKE_PROGRESS_7 = 10 +CMAKE_PROGRESS_8 = 11 +CMAKE_PROGRESS_9 = 12 + diff --git a/mprpc/build/src/CMakeFiles/progress.marks b/mprpc/build/src/CMakeFiles/progress.marks new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/mprpc/build/src/CMakeFiles/progress.marks @@ -0,0 +1 @@ +9 diff --git a/mprpc/build/src/Makefile b/mprpc/build/src/Makefile new file mode 100644 index 0000000..3ad5110 --- /dev/null +++ b/mprpc/build/src/Makefile @@ -0,0 +1,390 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/ubuntu/mprpc + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/ubuntu/mprpc/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# The main all target +all: cmake_check_build_system + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles /home/ubuntu/mprpc/build/src/CMakeFiles/progress.marks + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 src/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/mprpc/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 src/clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 src/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 src/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +src/CMakeFiles/mprpc.dir/rule: + cd /home/ubuntu/mprpc/build && $(MAKE) -f CMakeFiles/Makefile2 src/CMakeFiles/mprpc.dir/rule +.PHONY : src/CMakeFiles/mprpc.dir/rule + +# Convenience name for target. +mprpc: src/CMakeFiles/mprpc.dir/rule + +.PHONY : mprpc + +# fast build rule for target. +mprpc/fast: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/build +.PHONY : mprpc/fast + +logger.o: logger.cc.o + +.PHONY : logger.o + +# target to build an object file +logger.cc.o: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/logger.cc.o +.PHONY : logger.cc.o + +logger.i: logger.cc.i + +.PHONY : logger.i + +# target to preprocess a source file +logger.cc.i: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/logger.cc.i +.PHONY : logger.cc.i + +logger.s: logger.cc.s + +.PHONY : logger.s + +# target to generate assembly for a file +logger.cc.s: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/logger.cc.s +.PHONY : logger.cc.s + +mprpcapplication.o: mprpcapplication.cc.o + +.PHONY : mprpcapplication.o + +# target to build an object file +mprpcapplication.cc.o: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/mprpcapplication.cc.o +.PHONY : mprpcapplication.cc.o + +mprpcapplication.i: mprpcapplication.cc.i + +.PHONY : mprpcapplication.i + +# target to preprocess a source file +mprpcapplication.cc.i: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/mprpcapplication.cc.i +.PHONY : mprpcapplication.cc.i + +mprpcapplication.s: mprpcapplication.cc.s + +.PHONY : mprpcapplication.s + +# target to generate assembly for a file +mprpcapplication.cc.s: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/mprpcapplication.cc.s +.PHONY : mprpcapplication.cc.s + +mprpcchannel.o: mprpcchannel.cc.o + +.PHONY : mprpcchannel.o + +# target to build an object file +mprpcchannel.cc.o: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/mprpcchannel.cc.o +.PHONY : mprpcchannel.cc.o + +mprpcchannel.i: mprpcchannel.cc.i + +.PHONY : mprpcchannel.i + +# target to preprocess a source file +mprpcchannel.cc.i: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/mprpcchannel.cc.i +.PHONY : mprpcchannel.cc.i + +mprpcchannel.s: mprpcchannel.cc.s + +.PHONY : mprpcchannel.s + +# target to generate assembly for a file +mprpcchannel.cc.s: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/mprpcchannel.cc.s +.PHONY : mprpcchannel.cc.s + +mprpcconfig.o: mprpcconfig.cc.o + +.PHONY : mprpcconfig.o + +# target to build an object file +mprpcconfig.cc.o: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/mprpcconfig.cc.o +.PHONY : mprpcconfig.cc.o + +mprpcconfig.i: mprpcconfig.cc.i + +.PHONY : mprpcconfig.i + +# target to preprocess a source file +mprpcconfig.cc.i: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/mprpcconfig.cc.i +.PHONY : mprpcconfig.cc.i + +mprpcconfig.s: mprpcconfig.cc.s + +.PHONY : mprpcconfig.s + +# target to generate assembly for a file +mprpcconfig.cc.s: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/mprpcconfig.cc.s +.PHONY : mprpcconfig.cc.s + +mprpccontroller.o: mprpccontroller.cc.o + +.PHONY : mprpccontroller.o + +# target to build an object file +mprpccontroller.cc.o: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/mprpccontroller.cc.o +.PHONY : mprpccontroller.cc.o + +mprpccontroller.i: mprpccontroller.cc.i + +.PHONY : mprpccontroller.i + +# target to preprocess a source file +mprpccontroller.cc.i: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/mprpccontroller.cc.i +.PHONY : mprpccontroller.cc.i + +mprpccontroller.s: mprpccontroller.cc.s + +.PHONY : mprpccontroller.s + +# target to generate assembly for a file +mprpccontroller.cc.s: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/mprpccontroller.cc.s +.PHONY : mprpccontroller.cc.s + +rpcheader.pb.o: rpcheader.pb.cc.o + +.PHONY : rpcheader.pb.o + +# target to build an object file +rpcheader.pb.cc.o: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.o +.PHONY : rpcheader.pb.cc.o + +rpcheader.pb.i: rpcheader.pb.cc.i + +.PHONY : rpcheader.pb.i + +# target to preprocess a source file +rpcheader.pb.cc.i: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.i +.PHONY : rpcheader.pb.cc.i + +rpcheader.pb.s: rpcheader.pb.cc.s + +.PHONY : rpcheader.pb.s + +# target to generate assembly for a file +rpcheader.pb.cc.s: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/rpcheader.pb.cc.s +.PHONY : rpcheader.pb.cc.s + +rpcprovider.o: rpcprovider.cc.o + +.PHONY : rpcprovider.o + +# target to build an object file +rpcprovider.cc.o: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/rpcprovider.cc.o +.PHONY : rpcprovider.cc.o + +rpcprovider.i: rpcprovider.cc.i + +.PHONY : rpcprovider.i + +# target to preprocess a source file +rpcprovider.cc.i: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/rpcprovider.cc.i +.PHONY : rpcprovider.cc.i + +rpcprovider.s: rpcprovider.cc.s + +.PHONY : rpcprovider.s + +# target to generate assembly for a file +rpcprovider.cc.s: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/rpcprovider.cc.s +.PHONY : rpcprovider.cc.s + +zookeeperutil.o: zookeeperutil.cc.o + +.PHONY : zookeeperutil.o + +# target to build an object file +zookeeperutil.cc.o: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/zookeeperutil.cc.o +.PHONY : zookeeperutil.cc.o + +zookeeperutil.i: zookeeperutil.cc.i + +.PHONY : zookeeperutil.i + +# target to preprocess a source file +zookeeperutil.cc.i: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/zookeeperutil.cc.i +.PHONY : zookeeperutil.cc.i + +zookeeperutil.s: zookeeperutil.cc.s + +.PHONY : zookeeperutil.s + +# target to generate assembly for a file +zookeeperutil.cc.s: + cd /home/ubuntu/mprpc/build && $(MAKE) -f src/CMakeFiles/mprpc.dir/build.make src/CMakeFiles/mprpc.dir/zookeeperutil.cc.s +.PHONY : zookeeperutil.cc.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... rebuild_cache" + @echo "... edit_cache" + @echo "... mprpc" + @echo "... logger.o" + @echo "... logger.i" + @echo "... logger.s" + @echo "... mprpcapplication.o" + @echo "... mprpcapplication.i" + @echo "... mprpcapplication.s" + @echo "... mprpcchannel.o" + @echo "... mprpcchannel.i" + @echo "... mprpcchannel.s" + @echo "... mprpcconfig.o" + @echo "... mprpcconfig.i" + @echo "... mprpcconfig.s" + @echo "... mprpccontroller.o" + @echo "... mprpccontroller.i" + @echo "... mprpccontroller.s" + @echo "... rpcheader.pb.o" + @echo "... rpcheader.pb.i" + @echo "... rpcheader.pb.s" + @echo "... rpcprovider.o" + @echo "... rpcprovider.i" + @echo "... rpcprovider.s" + @echo "... zookeeperutil.o" + @echo "... zookeeperutil.i" + @echo "... zookeeperutil.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/ubuntu/mprpc/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/mprpc/build/src/cmake_install.cmake b/mprpc/build/src/cmake_install.cmake new file mode 100644 index 0000000..74a759f --- /dev/null +++ b/mprpc/build/src/cmake_install.cmake @@ -0,0 +1,39 @@ +# Install script for directory: /home/ubuntu/mprpc/src + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "Debug") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + diff --git a/mprpc/example/CMakeLists.txt b/mprpc/example/CMakeLists.txt new file mode 100644 index 0000000..f5c134f --- /dev/null +++ b/mprpc/example/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(callee) +add_subdirectory(caller) \ No newline at end of file diff --git a/mprpc/example/callee/CMakeLists.txt b/mprpc/example/callee/CMakeLists.txt new file mode 100644 index 0000000..e85d4f9 --- /dev/null +++ b/mprpc/example/callee/CMakeLists.txt @@ -0,0 +1,4 @@ +# set(SRC_LIST userservice.cc ../user.pb.cc) +set(SRC_LIST friendservice.cc ../friend.pb.cc) +add_executable(provider ${SRC_LIST}) +target_link_libraries(provider mprpc protobuf) \ No newline at end of file diff --git a/mprpc/example/callee/friendservice.cc b/mprpc/example/callee/friendservice.cc new file mode 100644 index 0000000..79d3f94 --- /dev/null +++ b/mprpc/example/callee/friendservice.cc @@ -0,0 +1,57 @@ +#include +#include +#include "friend.pb.h" +#include "mprpcapplication.h" +#include "rpcprovider.h" +#include +#include "logger.h" + +class FriendService : public fixbug::FriendServiceRpc +{ +public: + std::vector GetFriendsList(uint32_t userid) + { + std::cout << "do GetFriendsList service! userid:" << userid << std::endl; + std::vector vec; + vec.push_back("gao yang"); + vec.push_back("liu hong"); + vec.push_back("wang shuo"); + return vec; + } + + // 重写基类方法 + void GetFriendsList(::google::protobuf::RpcController* controller, + const ::fixbug::GetFriendsListRequest* request, + ::fixbug::GetFriendsListResponse* response, + ::google::protobuf::Closure* done) + { + uint32_t userid = request->userid(); + std::vector friendsList = GetFriendsList(userid); + response->mutable_result()->set_errcode(0); + response->mutable_result()->set_errmsg(""); + for (std::string &name : friendsList) + { + std::string *p = response->add_friends(); + *p = name; + } + done->Run(); + } +}; + +int main(int argc, char **argv) +{ + LOG_ERR("ddddd"); + LOG_INFO("ddddd"); + + // 调用框架的初始化操作 + MprpcApplication::Init(argc, argv); + + // provider是一个rpc网络服务对象。把UserService对象发布到rpc节点上 + RpcProvider provider; + provider.NotifyService(new FriendService()); + + // 启动一个rpc服务发布节点 Run以后,进程进入阻塞状态,等待远程的rpc调用请求 + provider.Run(); + + return 0; +} \ No newline at end of file diff --git a/mprpc/example/callee/userservice.cc b/mprpc/example/callee/userservice.cc new file mode 100644 index 0000000..72dc6b8 --- /dev/null +++ b/mprpc/example/callee/userservice.cc @@ -0,0 +1,87 @@ +#include +#include +#include"../user.pb.h" +#include "mprpcapplication.h" +#include "rpcprovider.h" +// using namespace fixbug; + +/* +userservice原来是一个本地服务,提供了2个进程内的本地方法, Login和GetFriendLists +*/ + class UserService : public fixbug::UserServiceRpc // 使用在rpc服务发布端 + { + public: + bool Login(std::string name, std::string pwd) + { + std::cout << "doing local service Login" << std::endl; + std::cout << "name: " << name << "pwd: " << pwd << std::endl; + return false; + } + + bool Register(uint32_t id, std::string name, std::string pwd) + { + std::cout << "doing local service Register" << std::endl; + std::cout << "id: " << id << "name: " << name << "pwd: " << pwd << std::endl; + return true; + } + + /* + 重写UserServiceRpc的虚函数,以下方法均为框架直接调用 + 1. caller ===> Login(LoginRequest) => muduo => callee + 2. callee ===> Login(LoginRequest) => 调用下面重写过的Login方法 + */ + void Login(::google::protobuf::RpcController* controller, + const ::fixbug::LoginRequest* request, + ::fixbug::LoginResponse* response, + ::google::protobuf::Closure* done) + { + // 框架给业务上报了请求参数LoginRequest,业务获取相应数据做本地业务 + std::string name = request -> name(); + std::string pwd = request -> pwd(); + + // 本地业务 + bool login_result = Login(name, pwd); + + // 将响应写入 错误码、错误消息、返回值 + fixbug::ResultCode *code = response -> mutable_result(); + code -> set_errcode(0); + code -> set_errmsg(""); + response -> set_success(login_result); + + // 执行回调操作 执行响应对象数据的序列化和网络发送(均由框架来完成) + done -> Run(); + } + + void Register(::google::protobuf::RpcController* controller, + const ::fixbug::RegisterRequest* request, + ::fixbug::RegisterResponse* response, + ::google::protobuf::Closure* done) + { + uint32_t id = request -> id(); + std::string name = request -> name(); + std::string pwd = request -> pwd(); + + bool ret = Register(id, name, pwd); + + response -> mutable_result() -> set_errcode(0); + response -> mutable_result() -> set_errmsg(""); + response -> set_success(ret); + + done -> Run(); + } + }; + +int main(int argc, char **argv) +{ + // 调用框架的初始化操作 provider -i config.conf + MprpcApplication::Init(argc, argv); + + // provider是一个rpc网络服务对象。把UserService对象发布到rpc节点上 + RpcProvider provider; + provider.NotifyService(new UserService()); + + // 启动一个rpc服务发布节点,Run以后,进程进入阻塞状态,等待远程的rpc调用请求 + provider.Run(); + return 0; +} + \ No newline at end of file diff --git a/mprpc/example/caller/CMakeLists.txt b/mprpc/example/caller/CMakeLists.txt new file mode 100644 index 0000000..9424baa --- /dev/null +++ b/mprpc/example/caller/CMakeLists.txt @@ -0,0 +1,4 @@ +# set(SRC_LIST calluserservice.cc ../user.pb.cc) +set(SRC_LIST callfriendservice.cc ../friend.pb.cc) +add_executable(consumer ${SRC_LIST}) +target_link_libraries(consumer mprpc protobuf) \ No newline at end of file diff --git a/mprpc/example/caller/callfriendservice.cc b/mprpc/example/caller/callfriendservice.cc new file mode 100644 index 0000000..1c41cf3 --- /dev/null +++ b/mprpc/example/caller/callfriendservice.cc @@ -0,0 +1,44 @@ +#include +#include "mprpcapplication.h" +#include "friend.pb.h" + +int main(int argc, char **argv) +{ + // 整个程序启动以后,想使用mprpc框架来享受rpc服务调用,一定需要先调用框架的初始化函数(只初始化一次) + MprpcApplication::Init(argc, argv); + + // 演示调用远程发布的rpc方法Login + fixbug::FriendServiceRpc_Stub stub(new MprpcChannel()); + // rpc方法的请求参数 + fixbug::GetFriendsListRequest request; + request.set_userid(1000); + // rpc方法的响应 + fixbug::GetFriendsListResponse response; + // 发起rpc方法的调用 同步的rpc调用过程 MprpcChannel::callmethod + MprpcController controller; + stub.GetFriendsList(&controller, &request, &response, nullptr); // RpcChannel->RpcChannel::callMethod 集中来做所有rpc方法调用的参数序列化和网络发送 + + // 一次rpc调用完成,读调用的结果 + if (controller.Failed()) + { + std::cout << controller.ErrorText() << std::endl; + } + else + { + if (0 == response.result().errcode()) + { + std::cout << "rpc GetFriendsList response success!" << std::endl; + int size = response.friends_size(); + for (int i=0; i < size; ++i) + { + std::cout << "index:" << (i+1) << " name:" << response.friends(i) << std::endl; + } + } + else + { + std::cout << "rpc GetFriendsList response error : " << response.result().errmsg() << std::endl; + } + } + + return 0; +} \ No newline at end of file diff --git a/mprpc/example/caller/calluserservice.cc b/mprpc/example/caller/calluserservice.cc new file mode 100644 index 0000000..c02d465 --- /dev/null +++ b/mprpc/example/caller/calluserservice.cc @@ -0,0 +1,53 @@ +#include +#include "mprpcapplication.h" +#include "user.pb.h" +#include "mprpcchannel.h" + +int main(int argc, char **argv) +{ + // 整个程序启动以后,想以后mprpc框架来获得rpc服务调用,一定需要先调用框架的初始化函数(只初始化一次即可) + MprpcApplication::Init(argc, argv); + + // 演示调用远程发布的rpc方法Login + fixbug::UserServiceRpc_Stub stub(new MprpcChannel()); + // rpc方法的请求参数 + fixbug::LoginRequest request; + request.set_name("zhang san"); + request.set_pwd("123456"); + // rpc方法的响应 + fixbug::LoginResponse response; + // 发起rpc方法的调用 同步的rpc调用过程 MprpcChannel::callMethod + stub.Login(nullptr, &request, &response, nullptr); // RpcChannel -> RpcChannel::callMethod + + // 一次rpc的调用完成,读调用的结果 + if(response.result().errcode() == 0) + { + std::cout << "rpc login response success: " << response.success() << std::endl; + } + else + { + std::cout << "rpc login response error: " << response.result().errmsg() << std::endl; + } + + // 演示调用远程发布的rpc方法Register + fixbug::RegisterRequest req; + req.set_id(2000); + req.set_name("mprpc"); + req.set_pwd("666666"); + fixbug::RegisterResponse rsp; + + // 以同步的方式发起rpc调用请求,等待返回结果 + stub.Register(nullptr, &req, &rsp, nullptr); + + // 一次rpc的调用完成,读调用的结果 + if(rsp.result().errcode() == 0) + { + std::cout << "rpc register response success: " << rsp.success() << std::endl; + } + else + { + std::cout << "rpc register response error: " << rsp.result().errmsg() << std::endl; + } + + return 0; +} \ No newline at end of file diff --git a/mprpc/example/friend.pb.cc b/mprpc/example/friend.pb.cc new file mode 100644 index 0000000..51ceef5 --- /dev/null +++ b/mprpc/example/friend.pb.cc @@ -0,0 +1,869 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: friend.proto + +#include "friend.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace fixbug { +PROTOBUF_CONSTEXPR ResultCode::ResultCode( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.errmsg_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.errcode_)*/0 + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ResultCodeDefaultTypeInternal { + PROTOBUF_CONSTEXPR ResultCodeDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ResultCodeDefaultTypeInternal() {} + union { + ResultCode _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResultCodeDefaultTypeInternal _ResultCode_default_instance_; +PROTOBUF_CONSTEXPR GetFriendsListRequest::GetFriendsListRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.userid_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetFriendsListRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetFriendsListRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetFriendsListRequestDefaultTypeInternal() {} + union { + GetFriendsListRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetFriendsListRequestDefaultTypeInternal _GetFriendsListRequest_default_instance_; +PROTOBUF_CONSTEXPR GetFriendsListResponse::GetFriendsListResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.friends_)*/{} + , /*decltype(_impl_.result_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetFriendsListResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetFriendsListResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetFriendsListResponseDefaultTypeInternal() {} + union { + GetFriendsListResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetFriendsListResponseDefaultTypeInternal _GetFriendsListResponse_default_instance_; +} // namespace fixbug +static ::_pb::Metadata file_level_metadata_friend_2eproto[3]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_friend_2eproto = nullptr; +static const ::_pb::ServiceDescriptor* file_level_service_descriptors_friend_2eproto[1]; + +const uint32_t TableStruct_friend_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::ResultCode, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::ResultCode, _impl_.errcode_), + PROTOBUF_FIELD_OFFSET(::fixbug::ResultCode, _impl_.errmsg_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::GetFriendsListRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::GetFriendsListRequest, _impl_.userid_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::GetFriendsListResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::GetFriendsListResponse, _impl_.result_), + PROTOBUF_FIELD_OFFSET(::fixbug::GetFriendsListResponse, _impl_.friends_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::fixbug::ResultCode)}, + { 8, -1, -1, sizeof(::fixbug::GetFriendsListRequest)}, + { 15, -1, -1, sizeof(::fixbug::GetFriendsListResponse)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::fixbug::_ResultCode_default_instance_._instance, + &::fixbug::_GetFriendsListRequest_default_instance_._instance, + &::fixbug::_GetFriendsListResponse_default_instance_._instance, +}; + +const char descriptor_table_protodef_friend_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\014friend.proto\022\006fixbug\"-\n\nResultCode\022\017\n\007" + "errcode\030\001 \001(\005\022\016\n\006errmsg\030\002 \001(\014\"\'\n\025GetFrie" + "ndsListRequest\022\016\n\006userid\030\001 \001(\r\"M\n\026GetFri" + "endsListResponse\022\"\n\006result\030\001 \001(\0132\022.fixbu" + "g.ResultCode\022\017\n\007friends\030\002 \003(\0142c\n\020FriendS" + "erviceRpc\022O\n\016GetFriendsList\022\035.fixbug.Get" + "FriendsListRequest\032\036.fixbug.GetFriendsLi" + "stResponseB\003\200\001\001b\006proto3" + ; +static ::_pbi::once_flag descriptor_table_friend_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_friend_2eproto = { + false, false, 303, descriptor_table_protodef_friend_2eproto, + "friend.proto", + &descriptor_table_friend_2eproto_once, nullptr, 0, 3, + schemas, file_default_instances, TableStruct_friend_2eproto::offsets, + file_level_metadata_friend_2eproto, file_level_enum_descriptors_friend_2eproto, + file_level_service_descriptors_friend_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_friend_2eproto_getter() { + return &descriptor_table_friend_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_friend_2eproto(&descriptor_table_friend_2eproto); +namespace fixbug { + +// =================================================================== + +class ResultCode::_Internal { + public: +}; + +ResultCode::ResultCode(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.ResultCode) +} +ResultCode::ResultCode(const ResultCode& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ResultCode* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.errmsg_){} + , decltype(_impl_.errcode_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.errmsg_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.errmsg_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_errmsg().empty()) { + _this->_impl_.errmsg_.Set(from._internal_errmsg(), + _this->GetArenaForAllocation()); + } + _this->_impl_.errcode_ = from._impl_.errcode_; + // @@protoc_insertion_point(copy_constructor:fixbug.ResultCode) +} + +inline void ResultCode::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.errmsg_){} + , decltype(_impl_.errcode_){0} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.errmsg_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.errmsg_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ResultCode::~ResultCode() { + // @@protoc_insertion_point(destructor:fixbug.ResultCode) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ResultCode::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.errmsg_.Destroy(); +} + +void ResultCode::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ResultCode::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.ResultCode) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.errmsg_.ClearToEmpty(); + _impl_.errcode_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ResultCode::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 errcode = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.errcode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes errmsg = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_errmsg(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ResultCode::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.ResultCode) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // int32 errcode = 1; + if (this->_internal_errcode() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_errcode(), target); + } + + // bytes errmsg = 2; + if (!this->_internal_errmsg().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_errmsg(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.ResultCode) + return target; +} + +size_t ResultCode::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.ResultCode) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes errmsg = 2; + if (!this->_internal_errmsg().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_errmsg()); + } + + // int32 errcode = 1; + if (this->_internal_errcode() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_errcode()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ResultCode::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ResultCode::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ResultCode::GetClassData() const { return &_class_data_; } + + +void ResultCode::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.ResultCode) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_errmsg().empty()) { + _this->_internal_set_errmsg(from._internal_errmsg()); + } + if (from._internal_errcode() != 0) { + _this->_internal_set_errcode(from._internal_errcode()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ResultCode::CopyFrom(const ResultCode& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.ResultCode) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResultCode::IsInitialized() const { + return true; +} + +void ResultCode::InternalSwap(ResultCode* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.errmsg_, lhs_arena, + &other->_impl_.errmsg_, rhs_arena + ); + swap(_impl_.errcode_, other->_impl_.errcode_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ResultCode::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_friend_2eproto_getter, &descriptor_table_friend_2eproto_once, + file_level_metadata_friend_2eproto[0]); +} + +// =================================================================== + +class GetFriendsListRequest::_Internal { + public: +}; + +GetFriendsListRequest::GetFriendsListRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.GetFriendsListRequest) +} +GetFriendsListRequest::GetFriendsListRequest(const GetFriendsListRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetFriendsListRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.userid_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.userid_ = from._impl_.userid_; + // @@protoc_insertion_point(copy_constructor:fixbug.GetFriendsListRequest) +} + +inline void GetFriendsListRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.userid_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +GetFriendsListRequest::~GetFriendsListRequest() { + // @@protoc_insertion_point(destructor:fixbug.GetFriendsListRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetFriendsListRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void GetFriendsListRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetFriendsListRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.GetFriendsListRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.userid_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetFriendsListRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 userid = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.userid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetFriendsListRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.GetFriendsListRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 userid = 1; + if (this->_internal_userid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_userid(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.GetFriendsListRequest) + return target; +} + +size_t GetFriendsListRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.GetFriendsListRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 userid = 1; + if (this->_internal_userid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_userid()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetFriendsListRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetFriendsListRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetFriendsListRequest::GetClassData() const { return &_class_data_; } + + +void GetFriendsListRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.GetFriendsListRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_userid() != 0) { + _this->_internal_set_userid(from._internal_userid()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetFriendsListRequest::CopyFrom(const GetFriendsListRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.GetFriendsListRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetFriendsListRequest::IsInitialized() const { + return true; +} + +void GetFriendsListRequest::InternalSwap(GetFriendsListRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.userid_, other->_impl_.userid_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetFriendsListRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_friend_2eproto_getter, &descriptor_table_friend_2eproto_once, + file_level_metadata_friend_2eproto[1]); +} + +// =================================================================== + +class GetFriendsListResponse::_Internal { + public: + static const ::fixbug::ResultCode& result(const GetFriendsListResponse* msg); +}; + +const ::fixbug::ResultCode& +GetFriendsListResponse::_Internal::result(const GetFriendsListResponse* msg) { + return *msg->_impl_.result_; +} +GetFriendsListResponse::GetFriendsListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.GetFriendsListResponse) +} +GetFriendsListResponse::GetFriendsListResponse(const GetFriendsListResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetFriendsListResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.friends_){from._impl_.friends_} + , decltype(_impl_.result_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_result()) { + _this->_impl_.result_ = new ::fixbug::ResultCode(*from._impl_.result_); + } + // @@protoc_insertion_point(copy_constructor:fixbug.GetFriendsListResponse) +} + +inline void GetFriendsListResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.friends_){arena} + , decltype(_impl_.result_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +GetFriendsListResponse::~GetFriendsListResponse() { + // @@protoc_insertion_point(destructor:fixbug.GetFriendsListResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetFriendsListResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.friends_.~RepeatedPtrField(); + if (this != internal_default_instance()) delete _impl_.result_; +} + +void GetFriendsListResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetFriendsListResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.GetFriendsListResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.friends_.Clear(); + if (GetArenaForAllocation() == nullptr && _impl_.result_ != nullptr) { + delete _impl_.result_; + } + _impl_.result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetFriendsListResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .fixbug.ResultCode result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated bytes friends = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_friends(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetFriendsListResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.GetFriendsListResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .fixbug.ResultCode result = 1; + if (this->_internal_has_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::result(this), + _Internal::result(this).GetCachedSize(), target, stream); + } + + // repeated bytes friends = 2; + for (int i = 0, n = this->_internal_friends_size(); i < n; i++) { + const auto& s = this->_internal_friends(i); + target = stream->WriteBytes(2, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.GetFriendsListResponse) + return target; +} + +size_t GetFriendsListResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.GetFriendsListResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated bytes friends = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.friends_.size()); + for (int i = 0, n = _impl_.friends_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + _impl_.friends_.Get(i)); + } + + // .fixbug.ResultCode result = 1; + if (this->_internal_has_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetFriendsListResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetFriendsListResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetFriendsListResponse::GetClassData() const { return &_class_data_; } + + +void GetFriendsListResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.GetFriendsListResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.friends_.MergeFrom(from._impl_.friends_); + if (from._internal_has_result()) { + _this->_internal_mutable_result()->::fixbug::ResultCode::MergeFrom( + from._internal_result()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetFriendsListResponse::CopyFrom(const GetFriendsListResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.GetFriendsListResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetFriendsListResponse::IsInitialized() const { + return true; +} + +void GetFriendsListResponse::InternalSwap(GetFriendsListResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.friends_.InternalSwap(&other->_impl_.friends_); + swap(_impl_.result_, other->_impl_.result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetFriendsListResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_friend_2eproto_getter, &descriptor_table_friend_2eproto_once, + file_level_metadata_friend_2eproto[2]); +} + +// =================================================================== + +FriendServiceRpc::~FriendServiceRpc() {} + +const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* FriendServiceRpc::descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_friend_2eproto); + return file_level_service_descriptors_friend_2eproto[0]; +} + +const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* FriendServiceRpc::GetDescriptor() { + return descriptor(); +} + +void FriendServiceRpc::GetFriendsList(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::GetFriendsListRequest*, + ::fixbug::GetFriendsListResponse*, + ::google::protobuf::Closure* done) { + controller->SetFailed("Method GetFriendsList() not implemented."); + done->Run(); +} + +void FriendServiceRpc::CallMethod(const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method, + ::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::PROTOBUF_NAMESPACE_ID::Message* request, + ::PROTOBUF_NAMESPACE_ID::Message* response, + ::google::protobuf::Closure* done) { + GOOGLE_DCHECK_EQ(method->service(), file_level_service_descriptors_friend_2eproto[0]); + switch(method->index()) { + case 0: + GetFriendsList(controller, + ::PROTOBUF_NAMESPACE_ID::internal::DownCast( + request), + ::PROTOBUF_NAMESPACE_ID::internal::DownCast<::fixbug::GetFriendsListResponse*>( + response), + done); + break; + default: + GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; + break; + } +} + +const ::PROTOBUF_NAMESPACE_ID::Message& FriendServiceRpc::GetRequestPrototype( + const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const { + GOOGLE_DCHECK_EQ(method->service(), descriptor()); + switch(method->index()) { + case 0: + return ::fixbug::GetFriendsListRequest::default_instance(); + default: + GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; + return *::PROTOBUF_NAMESPACE_ID::MessageFactory::generated_factory() + ->GetPrototype(method->input_type()); + } +} + +const ::PROTOBUF_NAMESPACE_ID::Message& FriendServiceRpc::GetResponsePrototype( + const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const { + GOOGLE_DCHECK_EQ(method->service(), descriptor()); + switch(method->index()) { + case 0: + return ::fixbug::GetFriendsListResponse::default_instance(); + default: + GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; + return *::PROTOBUF_NAMESPACE_ID::MessageFactory::generated_factory() + ->GetPrototype(method->output_type()); + } +} + +FriendServiceRpc_Stub::FriendServiceRpc_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel) + : channel_(channel), owns_channel_(false) {} +FriendServiceRpc_Stub::FriendServiceRpc_Stub( + ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel, + ::PROTOBUF_NAMESPACE_ID::Service::ChannelOwnership ownership) + : channel_(channel), + owns_channel_(ownership == ::PROTOBUF_NAMESPACE_ID::Service::STUB_OWNS_CHANNEL) {} +FriendServiceRpc_Stub::~FriendServiceRpc_Stub() { + if (owns_channel_) delete channel_; +} + +void FriendServiceRpc_Stub::GetFriendsList(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::GetFriendsListRequest* request, + ::fixbug::GetFriendsListResponse* response, + ::google::protobuf::Closure* done) { + channel_->CallMethod(descriptor()->method(0), + controller, request, response, done); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace fixbug +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::fixbug::ResultCode* +Arena::CreateMaybeMessage< ::fixbug::ResultCode >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::ResultCode >(arena); +} +template<> PROTOBUF_NOINLINE ::fixbug::GetFriendsListRequest* +Arena::CreateMaybeMessage< ::fixbug::GetFriendsListRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::GetFriendsListRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::fixbug::GetFriendsListResponse* +Arena::CreateMaybeMessage< ::fixbug::GetFriendsListResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::GetFriendsListResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/mprpc/example/friend.pb.h b/mprpc/example/friend.pb.h new file mode 100644 index 0000000..649de1d --- /dev/null +++ b/mprpc/example/friend.pb.h @@ -0,0 +1,909 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: friend.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_friend_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_friend_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#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 3021001 < 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 +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_friend_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_friend_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_friend_2eproto; +namespace fixbug { +class GetFriendsListRequest; +struct GetFriendsListRequestDefaultTypeInternal; +extern GetFriendsListRequestDefaultTypeInternal _GetFriendsListRequest_default_instance_; +class GetFriendsListResponse; +struct GetFriendsListResponseDefaultTypeInternal; +extern GetFriendsListResponseDefaultTypeInternal _GetFriendsListResponse_default_instance_; +class ResultCode; +struct ResultCodeDefaultTypeInternal; +extern ResultCodeDefaultTypeInternal _ResultCode_default_instance_; +} // namespace fixbug +PROTOBUF_NAMESPACE_OPEN +template<> ::fixbug::GetFriendsListRequest* Arena::CreateMaybeMessage<::fixbug::GetFriendsListRequest>(Arena*); +template<> ::fixbug::GetFriendsListResponse* Arena::CreateMaybeMessage<::fixbug::GetFriendsListResponse>(Arena*); +template<> ::fixbug::ResultCode* Arena::CreateMaybeMessage<::fixbug::ResultCode>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace fixbug { + +// =================================================================== + +class ResultCode final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.ResultCode) */ { + public: + inline ResultCode() : ResultCode(nullptr) {} + ~ResultCode() override; + explicit PROTOBUF_CONSTEXPR ResultCode(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ResultCode(const ResultCode& from); + ResultCode(ResultCode&& from) noexcept + : ResultCode() { + *this = ::std::move(from); + } + + inline ResultCode& operator=(const ResultCode& from) { + CopyFrom(from); + return *this; + } + inline ResultCode& operator=(ResultCode&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ResultCode& default_instance() { + return *internal_default_instance(); + } + static inline const ResultCode* internal_default_instance() { + return reinterpret_cast( + &_ResultCode_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ResultCode& a, ResultCode& b) { + a.Swap(&b); + } + inline void Swap(ResultCode* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ResultCode* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ResultCode* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ResultCode& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ResultCode& from) { + ResultCode::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ResultCode* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.ResultCode"; + } + protected: + explicit ResultCode(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kErrmsgFieldNumber = 2, + kErrcodeFieldNumber = 1, + }; + // bytes errmsg = 2; + void clear_errmsg(); + const std::string& errmsg() const; + template + void set_errmsg(ArgT0&& arg0, ArgT... args); + std::string* mutable_errmsg(); + PROTOBUF_NODISCARD std::string* release_errmsg(); + void set_allocated_errmsg(std::string* errmsg); + private: + const std::string& _internal_errmsg() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_errmsg(const std::string& value); + std::string* _internal_mutable_errmsg(); + public: + + // int32 errcode = 1; + void clear_errcode(); + int32_t errcode() const; + void set_errcode(int32_t value); + private: + int32_t _internal_errcode() const; + void _internal_set_errcode(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:fixbug.ResultCode) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr errmsg_; + int32_t errcode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_friend_2eproto; +}; +// ------------------------------------------------------------------- + +class GetFriendsListRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.GetFriendsListRequest) */ { + public: + inline GetFriendsListRequest() : GetFriendsListRequest(nullptr) {} + ~GetFriendsListRequest() override; + explicit PROTOBUF_CONSTEXPR GetFriendsListRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetFriendsListRequest(const GetFriendsListRequest& from); + GetFriendsListRequest(GetFriendsListRequest&& from) noexcept + : GetFriendsListRequest() { + *this = ::std::move(from); + } + + inline GetFriendsListRequest& operator=(const GetFriendsListRequest& from) { + CopyFrom(from); + return *this; + } + inline GetFriendsListRequest& operator=(GetFriendsListRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetFriendsListRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetFriendsListRequest* internal_default_instance() { + return reinterpret_cast( + &_GetFriendsListRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(GetFriendsListRequest& a, GetFriendsListRequest& b) { + a.Swap(&b); + } + inline void Swap(GetFriendsListRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetFriendsListRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetFriendsListRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetFriendsListRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetFriendsListRequest& from) { + GetFriendsListRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetFriendsListRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.GetFriendsListRequest"; + } + protected: + explicit GetFriendsListRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUseridFieldNumber = 1, + }; + // uint32 userid = 1; + void clear_userid(); + uint32_t userid() const; + void set_userid(uint32_t value); + private: + uint32_t _internal_userid() const; + void _internal_set_userid(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:fixbug.GetFriendsListRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + uint32_t userid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_friend_2eproto; +}; +// ------------------------------------------------------------------- + +class GetFriendsListResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.GetFriendsListResponse) */ { + public: + inline GetFriendsListResponse() : GetFriendsListResponse(nullptr) {} + ~GetFriendsListResponse() override; + explicit PROTOBUF_CONSTEXPR GetFriendsListResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetFriendsListResponse(const GetFriendsListResponse& from); + GetFriendsListResponse(GetFriendsListResponse&& from) noexcept + : GetFriendsListResponse() { + *this = ::std::move(from); + } + + inline GetFriendsListResponse& operator=(const GetFriendsListResponse& from) { + CopyFrom(from); + return *this; + } + inline GetFriendsListResponse& operator=(GetFriendsListResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetFriendsListResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GetFriendsListResponse* internal_default_instance() { + return reinterpret_cast( + &_GetFriendsListResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(GetFriendsListResponse& a, GetFriendsListResponse& b) { + a.Swap(&b); + } + inline void Swap(GetFriendsListResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetFriendsListResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetFriendsListResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetFriendsListResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetFriendsListResponse& from) { + GetFriendsListResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetFriendsListResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.GetFriendsListResponse"; + } + protected: + explicit GetFriendsListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFriendsFieldNumber = 2, + kResultFieldNumber = 1, + }; + // repeated bytes friends = 2; + int friends_size() const; + private: + int _internal_friends_size() const; + public: + void clear_friends(); + const std::string& friends(int index) const; + std::string* mutable_friends(int index); + void set_friends(int index, const std::string& value); + void set_friends(int index, std::string&& value); + void set_friends(int index, const char* value); + void set_friends(int index, const void* value, size_t size); + std::string* add_friends(); + void add_friends(const std::string& value); + void add_friends(std::string&& value); + void add_friends(const char* value); + void add_friends(const void* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& friends() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_friends(); + private: + const std::string& _internal_friends(int index) const; + std::string* _internal_add_friends(); + public: + + // .fixbug.ResultCode result = 1; + bool has_result() const; + private: + bool _internal_has_result() const; + public: + void clear_result(); + const ::fixbug::ResultCode& result() const; + PROTOBUF_NODISCARD ::fixbug::ResultCode* release_result(); + ::fixbug::ResultCode* mutable_result(); + void set_allocated_result(::fixbug::ResultCode* result); + private: + const ::fixbug::ResultCode& _internal_result() const; + ::fixbug::ResultCode* _internal_mutable_result(); + public: + void unsafe_arena_set_allocated_result( + ::fixbug::ResultCode* result); + ::fixbug::ResultCode* unsafe_arena_release_result(); + + // @@protoc_insertion_point(class_scope:fixbug.GetFriendsListResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField friends_; + ::fixbug::ResultCode* result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_friend_2eproto; +}; +// =================================================================== + +class FriendServiceRpc_Stub; + +class FriendServiceRpc : public ::PROTOBUF_NAMESPACE_ID::Service { + protected: + // This class should be treated as an abstract interface. + inline FriendServiceRpc() {}; + public: + virtual ~FriendServiceRpc(); + + typedef FriendServiceRpc_Stub Stub; + + static const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* descriptor(); + + virtual void GetFriendsList(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::GetFriendsListRequest* request, + ::fixbug::GetFriendsListResponse* response, + ::google::protobuf::Closure* done); + + // implements Service ---------------------------------------------- + + const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* GetDescriptor(); + void CallMethod(const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method, + ::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::PROTOBUF_NAMESPACE_ID::Message* request, + ::PROTOBUF_NAMESPACE_ID::Message* response, + ::google::protobuf::Closure* done); + const ::PROTOBUF_NAMESPACE_ID::Message& GetRequestPrototype( + const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const; + const ::PROTOBUF_NAMESPACE_ID::Message& GetResponsePrototype( + const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const; + + private: + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FriendServiceRpc); +}; + +class FriendServiceRpc_Stub : public FriendServiceRpc { + public: + FriendServiceRpc_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel); + FriendServiceRpc_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel, + ::PROTOBUF_NAMESPACE_ID::Service::ChannelOwnership ownership); + ~FriendServiceRpc_Stub(); + + inline ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel() { return channel_; } + + // implements FriendServiceRpc ------------------------------------------ + + void GetFriendsList(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::GetFriendsListRequest* request, + ::fixbug::GetFriendsListResponse* response, + ::google::protobuf::Closure* done); + private: + ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel_; + bool owns_channel_; + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FriendServiceRpc_Stub); +}; + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ResultCode + +// int32 errcode = 1; +inline void ResultCode::clear_errcode() { + _impl_.errcode_ = 0; +} +inline int32_t ResultCode::_internal_errcode() const { + return _impl_.errcode_; +} +inline int32_t ResultCode::errcode() const { + // @@protoc_insertion_point(field_get:fixbug.ResultCode.errcode) + return _internal_errcode(); +} +inline void ResultCode::_internal_set_errcode(int32_t value) { + + _impl_.errcode_ = value; +} +inline void ResultCode::set_errcode(int32_t value) { + _internal_set_errcode(value); + // @@protoc_insertion_point(field_set:fixbug.ResultCode.errcode) +} + +// bytes errmsg = 2; +inline void ResultCode::clear_errmsg() { + _impl_.errmsg_.ClearToEmpty(); +} +inline const std::string& ResultCode::errmsg() const { + // @@protoc_insertion_point(field_get:fixbug.ResultCode.errmsg) + return _internal_errmsg(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ResultCode::set_errmsg(ArgT0&& arg0, ArgT... args) { + + _impl_.errmsg_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:fixbug.ResultCode.errmsg) +} +inline std::string* ResultCode::mutable_errmsg() { + std::string* _s = _internal_mutable_errmsg(); + // @@protoc_insertion_point(field_mutable:fixbug.ResultCode.errmsg) + return _s; +} +inline const std::string& ResultCode::_internal_errmsg() const { + return _impl_.errmsg_.Get(); +} +inline void ResultCode::_internal_set_errmsg(const std::string& value) { + + _impl_.errmsg_.Set(value, GetArenaForAllocation()); +} +inline std::string* ResultCode::_internal_mutable_errmsg() { + + return _impl_.errmsg_.Mutable(GetArenaForAllocation()); +} +inline std::string* ResultCode::release_errmsg() { + // @@protoc_insertion_point(field_release:fixbug.ResultCode.errmsg) + return _impl_.errmsg_.Release(); +} +inline void ResultCode::set_allocated_errmsg(std::string* errmsg) { + if (errmsg != nullptr) { + + } else { + + } + _impl_.errmsg_.SetAllocated(errmsg, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.errmsg_.IsDefault()) { + _impl_.errmsg_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:fixbug.ResultCode.errmsg) +} + +// ------------------------------------------------------------------- + +// GetFriendsListRequest + +// uint32 userid = 1; +inline void GetFriendsListRequest::clear_userid() { + _impl_.userid_ = 0u; +} +inline uint32_t GetFriendsListRequest::_internal_userid() const { + return _impl_.userid_; +} +inline uint32_t GetFriendsListRequest::userid() const { + // @@protoc_insertion_point(field_get:fixbug.GetFriendsListRequest.userid) + return _internal_userid(); +} +inline void GetFriendsListRequest::_internal_set_userid(uint32_t value) { + + _impl_.userid_ = value; +} +inline void GetFriendsListRequest::set_userid(uint32_t value) { + _internal_set_userid(value); + // @@protoc_insertion_point(field_set:fixbug.GetFriendsListRequest.userid) +} + +// ------------------------------------------------------------------- + +// GetFriendsListResponse + +// .fixbug.ResultCode result = 1; +inline bool GetFriendsListResponse::_internal_has_result() const { + return this != internal_default_instance() && _impl_.result_ != nullptr; +} +inline bool GetFriendsListResponse::has_result() const { + return _internal_has_result(); +} +inline void GetFriendsListResponse::clear_result() { + if (GetArenaForAllocation() == nullptr && _impl_.result_ != nullptr) { + delete _impl_.result_; + } + _impl_.result_ = nullptr; +} +inline const ::fixbug::ResultCode& GetFriendsListResponse::_internal_result() const { + const ::fixbug::ResultCode* p = _impl_.result_; + return p != nullptr ? *p : reinterpret_cast( + ::fixbug::_ResultCode_default_instance_); +} +inline const ::fixbug::ResultCode& GetFriendsListResponse::result() const { + // @@protoc_insertion_point(field_get:fixbug.GetFriendsListResponse.result) + return _internal_result(); +} +inline void GetFriendsListResponse::unsafe_arena_set_allocated_result( + ::fixbug::ResultCode* result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.result_); + } + _impl_.result_ = result; + if (result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:fixbug.GetFriendsListResponse.result) +} +inline ::fixbug::ResultCode* GetFriendsListResponse::release_result() { + + ::fixbug::ResultCode* temp = _impl_.result_; + _impl_.result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::fixbug::ResultCode* GetFriendsListResponse::unsafe_arena_release_result() { + // @@protoc_insertion_point(field_release:fixbug.GetFriendsListResponse.result) + + ::fixbug::ResultCode* temp = _impl_.result_; + _impl_.result_ = nullptr; + return temp; +} +inline ::fixbug::ResultCode* GetFriendsListResponse::_internal_mutable_result() { + + if (_impl_.result_ == nullptr) { + auto* p = CreateMaybeMessage<::fixbug::ResultCode>(GetArenaForAllocation()); + _impl_.result_ = p; + } + return _impl_.result_; +} +inline ::fixbug::ResultCode* GetFriendsListResponse::mutable_result() { + ::fixbug::ResultCode* _msg = _internal_mutable_result(); + // @@protoc_insertion_point(field_mutable:fixbug.GetFriendsListResponse.result) + return _msg; +} +inline void GetFriendsListResponse::set_allocated_result(::fixbug::ResultCode* result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.result_; + } + if (result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(result); + if (message_arena != submessage_arena) { + result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, result, submessage_arena); + } + + } else { + + } + _impl_.result_ = result; + // @@protoc_insertion_point(field_set_allocated:fixbug.GetFriendsListResponse.result) +} + +// repeated bytes friends = 2; +inline int GetFriendsListResponse::_internal_friends_size() const { + return _impl_.friends_.size(); +} +inline int GetFriendsListResponse::friends_size() const { + return _internal_friends_size(); +} +inline void GetFriendsListResponse::clear_friends() { + _impl_.friends_.Clear(); +} +inline std::string* GetFriendsListResponse::add_friends() { + std::string* _s = _internal_add_friends(); + // @@protoc_insertion_point(field_add_mutable:fixbug.GetFriendsListResponse.friends) + return _s; +} +inline const std::string& GetFriendsListResponse::_internal_friends(int index) const { + return _impl_.friends_.Get(index); +} +inline const std::string& GetFriendsListResponse::friends(int index) const { + // @@protoc_insertion_point(field_get:fixbug.GetFriendsListResponse.friends) + return _internal_friends(index); +} +inline std::string* GetFriendsListResponse::mutable_friends(int index) { + // @@protoc_insertion_point(field_mutable:fixbug.GetFriendsListResponse.friends) + return _impl_.friends_.Mutable(index); +} +inline void GetFriendsListResponse::set_friends(int index, const std::string& value) { + _impl_.friends_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:fixbug.GetFriendsListResponse.friends) +} +inline void GetFriendsListResponse::set_friends(int index, std::string&& value) { + _impl_.friends_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:fixbug.GetFriendsListResponse.friends) +} +inline void GetFriendsListResponse::set_friends(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.friends_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:fixbug.GetFriendsListResponse.friends) +} +inline void GetFriendsListResponse::set_friends(int index, const void* value, size_t size) { + _impl_.friends_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:fixbug.GetFriendsListResponse.friends) +} +inline std::string* GetFriendsListResponse::_internal_add_friends() { + return _impl_.friends_.Add(); +} +inline void GetFriendsListResponse::add_friends(const std::string& value) { + _impl_.friends_.Add()->assign(value); + // @@protoc_insertion_point(field_add:fixbug.GetFriendsListResponse.friends) +} +inline void GetFriendsListResponse::add_friends(std::string&& value) { + _impl_.friends_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:fixbug.GetFriendsListResponse.friends) +} +inline void GetFriendsListResponse::add_friends(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.friends_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:fixbug.GetFriendsListResponse.friends) +} +inline void GetFriendsListResponse::add_friends(const void* value, size_t size) { + _impl_.friends_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:fixbug.GetFriendsListResponse.friends) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +GetFriendsListResponse::friends() const { + // @@protoc_insertion_point(field_list:fixbug.GetFriendsListResponse.friends) + return _impl_.friends_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +GetFriendsListResponse::mutable_friends() { + // @@protoc_insertion_point(field_mutable_list:fixbug.GetFriendsListResponse.friends) + return &_impl_.friends_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace fixbug + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_friend_2eproto diff --git a/mprpc/example/friend.proto b/mprpc/example/friend.proto new file mode 100644 index 0000000..54dae8e --- /dev/null +++ b/mprpc/example/friend.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +package fixbug; + +option cc_generic_services = true; + +message ResultCode +{ + int32 errcode = 1; + bytes errmsg = 2; +} + +message GetFriendsListRequest +{ + uint32 userid = 1; +} + +message GetFriendsListResponse +{ + ResultCode result = 1; + repeated bytes friends = 2; +} + +// 好友模块 +service FriendServiceRpc +{ + rpc GetFriendsList(GetFriendsListRequest) returns(GetFriendsListResponse); +} \ No newline at end of file diff --git a/mprpc/example/user.pb.cc b/mprpc/example/user.pb.cc new file mode 100644 index 0000000..9ec94d3 --- /dev/null +++ b/mprpc/example/user.pb.cc @@ -0,0 +1,1516 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: user.proto + +#include "user.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace fixbug { +PROTOBUF_CONSTEXPR ResultCode::ResultCode( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.errmsg_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.errcode_)*/0 + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ResultCodeDefaultTypeInternal { + PROTOBUF_CONSTEXPR ResultCodeDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ResultCodeDefaultTypeInternal() {} + union { + ResultCode _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResultCodeDefaultTypeInternal _ResultCode_default_instance_; +PROTOBUF_CONSTEXPR LoginRequest::LoginRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.pwd_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct LoginRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR LoginRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~LoginRequestDefaultTypeInternal() {} + union { + LoginRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LoginRequestDefaultTypeInternal _LoginRequest_default_instance_; +PROTOBUF_CONSTEXPR LoginResponse::LoginResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.result_)*/nullptr + , /*decltype(_impl_.success_)*/false + , /*decltype(_impl_._cached_size_)*/{}} {} +struct LoginResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR LoginResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~LoginResponseDefaultTypeInternal() {} + union { + LoginResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LoginResponseDefaultTypeInternal _LoginResponse_default_instance_; +PROTOBUF_CONSTEXPR RegisterRequest::RegisterRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.pwd_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.id_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct RegisterRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RegisterRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RegisterRequestDefaultTypeInternal() {} + union { + RegisterRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegisterRequestDefaultTypeInternal _RegisterRequest_default_instance_; +PROTOBUF_CONSTEXPR RegisterResponse::RegisterResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.result_)*/nullptr + , /*decltype(_impl_.success_)*/false + , /*decltype(_impl_._cached_size_)*/{}} {} +struct RegisterResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RegisterResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RegisterResponseDefaultTypeInternal() {} + union { + RegisterResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegisterResponseDefaultTypeInternal _RegisterResponse_default_instance_; +} // namespace fixbug +static ::_pb::Metadata file_level_metadata_user_2eproto[5]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_user_2eproto = nullptr; +static const ::_pb::ServiceDescriptor* file_level_service_descriptors_user_2eproto[1]; + +const uint32_t TableStruct_user_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::ResultCode, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::ResultCode, _impl_.errcode_), + PROTOBUF_FIELD_OFFSET(::fixbug::ResultCode, _impl_.errmsg_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::LoginRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::LoginRequest, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::fixbug::LoginRequest, _impl_.pwd_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::LoginResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::LoginResponse, _impl_.result_), + PROTOBUF_FIELD_OFFSET(::fixbug::LoginResponse, _impl_.success_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::RegisterRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::RegisterRequest, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::fixbug::RegisterRequest, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::fixbug::RegisterRequest, _impl_.pwd_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::RegisterResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::RegisterResponse, _impl_.result_), + PROTOBUF_FIELD_OFFSET(::fixbug::RegisterResponse, _impl_.success_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::fixbug::ResultCode)}, + { 8, -1, -1, sizeof(::fixbug::LoginRequest)}, + { 16, -1, -1, sizeof(::fixbug::LoginResponse)}, + { 24, -1, -1, sizeof(::fixbug::RegisterRequest)}, + { 33, -1, -1, sizeof(::fixbug::RegisterResponse)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::fixbug::_ResultCode_default_instance_._instance, + &::fixbug::_LoginRequest_default_instance_._instance, + &::fixbug::_LoginResponse_default_instance_._instance, + &::fixbug::_RegisterRequest_default_instance_._instance, + &::fixbug::_RegisterResponse_default_instance_._instance, +}; + +const char descriptor_table_protodef_user_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\nuser.proto\022\006fixbug\"-\n\nResultCode\022\017\n\007er" + "rcode\030\001 \001(\005\022\016\n\006errmsg\030\002 \001(\014\")\n\014LoginRequ" + "est\022\014\n\004name\030\001 \001(\014\022\013\n\003pwd\030\002 \001(\014\"D\n\rLoginR" + "esponse\022\"\n\006result\030\001 \001(\0132\022.fixbug.ResultC" + "ode\022\017\n\007success\030\002 \001(\010\"8\n\017RegisterRequest\022" + "\n\n\002id\030\001 \001(\r\022\014\n\004name\030\002 \001(\014\022\013\n\003pwd\030\003 \001(\014\"G" + "\n\020RegisterResponse\022\"\n\006result\030\001 \001(\0132\022.fix" + "bug.ResultCode\022\017\n\007success\030\002 \001(\0102\205\001\n\016User" + "ServiceRpc\0224\n\005Login\022\024.fixbug.LoginReques" + "t\032\025.fixbug.LoginResponse\022=\n\010Register\022\027.f" + "ixbug.RegisterRequest\032\030.fixbug.RegisterR" + "esponseB\003\200\001\001b\006proto3" + ; +static ::_pbi::once_flag descriptor_table_user_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_user_2eproto = { + false, false, 460, descriptor_table_protodef_user_2eproto, + "user.proto", + &descriptor_table_user_2eproto_once, nullptr, 0, 5, + schemas, file_default_instances, TableStruct_user_2eproto::offsets, + file_level_metadata_user_2eproto, file_level_enum_descriptors_user_2eproto, + file_level_service_descriptors_user_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_user_2eproto_getter() { + return &descriptor_table_user_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_user_2eproto(&descriptor_table_user_2eproto); +namespace fixbug { + +// =================================================================== + +class ResultCode::_Internal { + public: +}; + +ResultCode::ResultCode(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.ResultCode) +} +ResultCode::ResultCode(const ResultCode& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ResultCode* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.errmsg_){} + , decltype(_impl_.errcode_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.errmsg_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.errmsg_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_errmsg().empty()) { + _this->_impl_.errmsg_.Set(from._internal_errmsg(), + _this->GetArenaForAllocation()); + } + _this->_impl_.errcode_ = from._impl_.errcode_; + // @@protoc_insertion_point(copy_constructor:fixbug.ResultCode) +} + +inline void ResultCode::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.errmsg_){} + , decltype(_impl_.errcode_){0} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.errmsg_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.errmsg_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ResultCode::~ResultCode() { + // @@protoc_insertion_point(destructor:fixbug.ResultCode) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ResultCode::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.errmsg_.Destroy(); +} + +void ResultCode::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ResultCode::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.ResultCode) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.errmsg_.ClearToEmpty(); + _impl_.errcode_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ResultCode::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 errcode = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.errcode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes errmsg = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_errmsg(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ResultCode::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.ResultCode) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // int32 errcode = 1; + if (this->_internal_errcode() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_errcode(), target); + } + + // bytes errmsg = 2; + if (!this->_internal_errmsg().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_errmsg(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.ResultCode) + return target; +} + +size_t ResultCode::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.ResultCode) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes errmsg = 2; + if (!this->_internal_errmsg().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_errmsg()); + } + + // int32 errcode = 1; + if (this->_internal_errcode() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_errcode()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ResultCode::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ResultCode::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ResultCode::GetClassData() const { return &_class_data_; } + + +void ResultCode::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.ResultCode) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_errmsg().empty()) { + _this->_internal_set_errmsg(from._internal_errmsg()); + } + if (from._internal_errcode() != 0) { + _this->_internal_set_errcode(from._internal_errcode()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ResultCode::CopyFrom(const ResultCode& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.ResultCode) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResultCode::IsInitialized() const { + return true; +} + +void ResultCode::InternalSwap(ResultCode* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.errmsg_, lhs_arena, + &other->_impl_.errmsg_, rhs_arena + ); + swap(_impl_.errcode_, other->_impl_.errcode_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ResultCode::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_user_2eproto_getter, &descriptor_table_user_2eproto_once, + file_level_metadata_user_2eproto[0]); +} + +// =================================================================== + +class LoginRequest::_Internal { + public: +}; + +LoginRequest::LoginRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.LoginRequest) +} +LoginRequest::LoginRequest(const LoginRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + LoginRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.pwd_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _impl_.pwd_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.pwd_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_pwd().empty()) { + _this->_impl_.pwd_.Set(from._internal_pwd(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:fixbug.LoginRequest) +} + +inline void LoginRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.pwd_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.pwd_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.pwd_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +LoginRequest::~LoginRequest() { + // @@protoc_insertion_point(destructor:fixbug.LoginRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void LoginRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); + _impl_.pwd_.Destroy(); +} + +void LoginRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void LoginRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.LoginRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.ClearToEmpty(); + _impl_.pwd_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* LoginRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bytes name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes pwd = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_pwd(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LoginRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.LoginRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // bytes name = 1; + if (!this->_internal_name().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_name(), target); + } + + // bytes pwd = 2; + if (!this->_internal_pwd().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_pwd(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.LoginRequest) + return target; +} + +size_t LoginRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.LoginRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes name = 1; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_name()); + } + + // bytes pwd = 2; + if (!this->_internal_pwd().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_pwd()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LoginRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + LoginRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LoginRequest::GetClassData() const { return &_class_data_; } + + +void LoginRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.LoginRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (!from._internal_pwd().empty()) { + _this->_internal_set_pwd(from._internal_pwd()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void LoginRequest::CopyFrom(const LoginRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.LoginRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LoginRequest::IsInitialized() const { + return true; +} + +void LoginRequest::InternalSwap(LoginRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.pwd_, lhs_arena, + &other->_impl_.pwd_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata LoginRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_user_2eproto_getter, &descriptor_table_user_2eproto_once, + file_level_metadata_user_2eproto[1]); +} + +// =================================================================== + +class LoginResponse::_Internal { + public: + static const ::fixbug::ResultCode& result(const LoginResponse* msg); +}; + +const ::fixbug::ResultCode& +LoginResponse::_Internal::result(const LoginResponse* msg) { + return *msg->_impl_.result_; +} +LoginResponse::LoginResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.LoginResponse) +} +LoginResponse::LoginResponse(const LoginResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + LoginResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.result_){nullptr} + , decltype(_impl_.success_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_result()) { + _this->_impl_.result_ = new ::fixbug::ResultCode(*from._impl_.result_); + } + _this->_impl_.success_ = from._impl_.success_; + // @@protoc_insertion_point(copy_constructor:fixbug.LoginResponse) +} + +inline void LoginResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.result_){nullptr} + , decltype(_impl_.success_){false} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +LoginResponse::~LoginResponse() { + // @@protoc_insertion_point(destructor:fixbug.LoginResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void LoginResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.result_; +} + +void LoginResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void LoginResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.LoginResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.result_ != nullptr) { + delete _impl_.result_; + } + _impl_.result_ = nullptr; + _impl_.success_ = false; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* LoginResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .fixbug.ResultCode result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool success = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.success_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LoginResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.LoginResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .fixbug.ResultCode result = 1; + if (this->_internal_has_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::result(this), + _Internal::result(this).GetCachedSize(), target, stream); + } + + // bool success = 2; + if (this->_internal_success() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_success(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.LoginResponse) + return target; +} + +size_t LoginResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.LoginResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .fixbug.ResultCode result = 1; + if (this->_internal_has_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.result_); + } + + // bool success = 2; + if (this->_internal_success() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LoginResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + LoginResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LoginResponse::GetClassData() const { return &_class_data_; } + + +void LoginResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.LoginResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_result()) { + _this->_internal_mutable_result()->::fixbug::ResultCode::MergeFrom( + from._internal_result()); + } + if (from._internal_success() != 0) { + _this->_internal_set_success(from._internal_success()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void LoginResponse::CopyFrom(const LoginResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.LoginResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LoginResponse::IsInitialized() const { + return true; +} + +void LoginResponse::InternalSwap(LoginResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(LoginResponse, _impl_.success_) + + sizeof(LoginResponse::_impl_.success_) + - PROTOBUF_FIELD_OFFSET(LoginResponse, _impl_.result_)>( + reinterpret_cast(&_impl_.result_), + reinterpret_cast(&other->_impl_.result_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata LoginResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_user_2eproto_getter, &descriptor_table_user_2eproto_once, + file_level_metadata_user_2eproto[2]); +} + +// =================================================================== + +class RegisterRequest::_Internal { + public: +}; + +RegisterRequest::RegisterRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.RegisterRequest) +} +RegisterRequest::RegisterRequest(const RegisterRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + RegisterRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.pwd_){} + , decltype(_impl_.id_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _impl_.pwd_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.pwd_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_pwd().empty()) { + _this->_impl_.pwd_.Set(from._internal_pwd(), + _this->GetArenaForAllocation()); + } + _this->_impl_.id_ = from._impl_.id_; + // @@protoc_insertion_point(copy_constructor:fixbug.RegisterRequest) +} + +inline void RegisterRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.pwd_){} + , decltype(_impl_.id_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.pwd_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.pwd_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +RegisterRequest::~RegisterRequest() { + // @@protoc_insertion_point(destructor:fixbug.RegisterRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RegisterRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); + _impl_.pwd_.Destroy(); +} + +void RegisterRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void RegisterRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.RegisterRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.ClearToEmpty(); + _impl_.pwd_.ClearToEmpty(); + _impl_.id_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* RegisterRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes pwd = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_pwd(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RegisterRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.RegisterRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 id = 1; + if (this->_internal_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_id(), target); + } + + // bytes name = 2; + if (!this->_internal_name().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_name(), target); + } + + // bytes pwd = 3; + if (!this->_internal_pwd().empty()) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_pwd(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.RegisterRequest) + return target; +} + +size_t RegisterRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.RegisterRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes name = 2; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_name()); + } + + // bytes pwd = 3; + if (!this->_internal_pwd().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_pwd()); + } + + // uint32 id = 1; + if (this->_internal_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RegisterRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + RegisterRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RegisterRequest::GetClassData() const { return &_class_data_; } + + +void RegisterRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.RegisterRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (!from._internal_pwd().empty()) { + _this->_internal_set_pwd(from._internal_pwd()); + } + if (from._internal_id() != 0) { + _this->_internal_set_id(from._internal_id()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void RegisterRequest::CopyFrom(const RegisterRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.RegisterRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RegisterRequest::IsInitialized() const { + return true; +} + +void RegisterRequest::InternalSwap(RegisterRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.pwd_, lhs_arena, + &other->_impl_.pwd_, rhs_arena + ); + swap(_impl_.id_, other->_impl_.id_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RegisterRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_user_2eproto_getter, &descriptor_table_user_2eproto_once, + file_level_metadata_user_2eproto[3]); +} + +// =================================================================== + +class RegisterResponse::_Internal { + public: + static const ::fixbug::ResultCode& result(const RegisterResponse* msg); +}; + +const ::fixbug::ResultCode& +RegisterResponse::_Internal::result(const RegisterResponse* msg) { + return *msg->_impl_.result_; +} +RegisterResponse::RegisterResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.RegisterResponse) +} +RegisterResponse::RegisterResponse(const RegisterResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + RegisterResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.result_){nullptr} + , decltype(_impl_.success_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_result()) { + _this->_impl_.result_ = new ::fixbug::ResultCode(*from._impl_.result_); + } + _this->_impl_.success_ = from._impl_.success_; + // @@protoc_insertion_point(copy_constructor:fixbug.RegisterResponse) +} + +inline void RegisterResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.result_){nullptr} + , decltype(_impl_.success_){false} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +RegisterResponse::~RegisterResponse() { + // @@protoc_insertion_point(destructor:fixbug.RegisterResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RegisterResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.result_; +} + +void RegisterResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void RegisterResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.RegisterResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.result_ != nullptr) { + delete _impl_.result_; + } + _impl_.result_ = nullptr; + _impl_.success_ = false; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* RegisterResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .fixbug.ResultCode result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool success = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.success_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RegisterResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.RegisterResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .fixbug.ResultCode result = 1; + if (this->_internal_has_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::result(this), + _Internal::result(this).GetCachedSize(), target, stream); + } + + // bool success = 2; + if (this->_internal_success() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_success(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.RegisterResponse) + return target; +} + +size_t RegisterResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.RegisterResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .fixbug.ResultCode result = 1; + if (this->_internal_has_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.result_); + } + + // bool success = 2; + if (this->_internal_success() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RegisterResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + RegisterResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RegisterResponse::GetClassData() const { return &_class_data_; } + + +void RegisterResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.RegisterResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_result()) { + _this->_internal_mutable_result()->::fixbug::ResultCode::MergeFrom( + from._internal_result()); + } + if (from._internal_success() != 0) { + _this->_internal_set_success(from._internal_success()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void RegisterResponse::CopyFrom(const RegisterResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.RegisterResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RegisterResponse::IsInitialized() const { + return true; +} + +void RegisterResponse::InternalSwap(RegisterResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(RegisterResponse, _impl_.success_) + + sizeof(RegisterResponse::_impl_.success_) + - PROTOBUF_FIELD_OFFSET(RegisterResponse, _impl_.result_)>( + reinterpret_cast(&_impl_.result_), + reinterpret_cast(&other->_impl_.result_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RegisterResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_user_2eproto_getter, &descriptor_table_user_2eproto_once, + file_level_metadata_user_2eproto[4]); +} + +// =================================================================== + +UserServiceRpc::~UserServiceRpc() {} + +const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* UserServiceRpc::descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_user_2eproto); + return file_level_service_descriptors_user_2eproto[0]; +} + +const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* UserServiceRpc::GetDescriptor() { + return descriptor(); +} + +void UserServiceRpc::Login(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::LoginRequest*, + ::fixbug::LoginResponse*, + ::google::protobuf::Closure* done) { + controller->SetFailed("Method Login() not implemented."); + done->Run(); +} + +void UserServiceRpc::Register(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::RegisterRequest*, + ::fixbug::RegisterResponse*, + ::google::protobuf::Closure* done) { + controller->SetFailed("Method Register() not implemented."); + done->Run(); +} + +void UserServiceRpc::CallMethod(const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method, + ::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::PROTOBUF_NAMESPACE_ID::Message* request, + ::PROTOBUF_NAMESPACE_ID::Message* response, + ::google::protobuf::Closure* done) { + GOOGLE_DCHECK_EQ(method->service(), file_level_service_descriptors_user_2eproto[0]); + switch(method->index()) { + case 0: + Login(controller, + ::PROTOBUF_NAMESPACE_ID::internal::DownCast( + request), + ::PROTOBUF_NAMESPACE_ID::internal::DownCast<::fixbug::LoginResponse*>( + response), + done); + break; + case 1: + Register(controller, + ::PROTOBUF_NAMESPACE_ID::internal::DownCast( + request), + ::PROTOBUF_NAMESPACE_ID::internal::DownCast<::fixbug::RegisterResponse*>( + response), + done); + break; + default: + GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; + break; + } +} + +const ::PROTOBUF_NAMESPACE_ID::Message& UserServiceRpc::GetRequestPrototype( + const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const { + GOOGLE_DCHECK_EQ(method->service(), descriptor()); + switch(method->index()) { + case 0: + return ::fixbug::LoginRequest::default_instance(); + case 1: + return ::fixbug::RegisterRequest::default_instance(); + default: + GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; + return *::PROTOBUF_NAMESPACE_ID::MessageFactory::generated_factory() + ->GetPrototype(method->input_type()); + } +} + +const ::PROTOBUF_NAMESPACE_ID::Message& UserServiceRpc::GetResponsePrototype( + const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const { + GOOGLE_DCHECK_EQ(method->service(), descriptor()); + switch(method->index()) { + case 0: + return ::fixbug::LoginResponse::default_instance(); + case 1: + return ::fixbug::RegisterResponse::default_instance(); + default: + GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; + return *::PROTOBUF_NAMESPACE_ID::MessageFactory::generated_factory() + ->GetPrototype(method->output_type()); + } +} + +UserServiceRpc_Stub::UserServiceRpc_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel) + : channel_(channel), owns_channel_(false) {} +UserServiceRpc_Stub::UserServiceRpc_Stub( + ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel, + ::PROTOBUF_NAMESPACE_ID::Service::ChannelOwnership ownership) + : channel_(channel), + owns_channel_(ownership == ::PROTOBUF_NAMESPACE_ID::Service::STUB_OWNS_CHANNEL) {} +UserServiceRpc_Stub::~UserServiceRpc_Stub() { + if (owns_channel_) delete channel_; +} + +void UserServiceRpc_Stub::Login(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::LoginRequest* request, + ::fixbug::LoginResponse* response, + ::google::protobuf::Closure* done) { + channel_->CallMethod(descriptor()->method(0), + controller, request, response, done); +} +void UserServiceRpc_Stub::Register(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::RegisterRequest* request, + ::fixbug::RegisterResponse* response, + ::google::protobuf::Closure* done) { + channel_->CallMethod(descriptor()->method(1), + controller, request, response, done); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace fixbug +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::fixbug::ResultCode* +Arena::CreateMaybeMessage< ::fixbug::ResultCode >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::ResultCode >(arena); +} +template<> PROTOBUF_NOINLINE ::fixbug::LoginRequest* +Arena::CreateMaybeMessage< ::fixbug::LoginRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::LoginRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::fixbug::LoginResponse* +Arena::CreateMaybeMessage< ::fixbug::LoginResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::LoginResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::fixbug::RegisterRequest* +Arena::CreateMaybeMessage< ::fixbug::RegisterRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::RegisterRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::fixbug::RegisterResponse* +Arena::CreateMaybeMessage< ::fixbug::RegisterResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::RegisterResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/mprpc/example/user.pb.h b/mprpc/example/user.pb.h new file mode 100644 index 0000000..7ce8b3c --- /dev/null +++ b/mprpc/example/user.pb.h @@ -0,0 +1,1546 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: user.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_user_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_user_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#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 3021001 < 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 +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_user_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_user_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_user_2eproto; +namespace fixbug { +class LoginRequest; +struct LoginRequestDefaultTypeInternal; +extern LoginRequestDefaultTypeInternal _LoginRequest_default_instance_; +class LoginResponse; +struct LoginResponseDefaultTypeInternal; +extern LoginResponseDefaultTypeInternal _LoginResponse_default_instance_; +class RegisterRequest; +struct RegisterRequestDefaultTypeInternal; +extern RegisterRequestDefaultTypeInternal _RegisterRequest_default_instance_; +class RegisterResponse; +struct RegisterResponseDefaultTypeInternal; +extern RegisterResponseDefaultTypeInternal _RegisterResponse_default_instance_; +class ResultCode; +struct ResultCodeDefaultTypeInternal; +extern ResultCodeDefaultTypeInternal _ResultCode_default_instance_; +} // namespace fixbug +PROTOBUF_NAMESPACE_OPEN +template<> ::fixbug::LoginRequest* Arena::CreateMaybeMessage<::fixbug::LoginRequest>(Arena*); +template<> ::fixbug::LoginResponse* Arena::CreateMaybeMessage<::fixbug::LoginResponse>(Arena*); +template<> ::fixbug::RegisterRequest* Arena::CreateMaybeMessage<::fixbug::RegisterRequest>(Arena*); +template<> ::fixbug::RegisterResponse* Arena::CreateMaybeMessage<::fixbug::RegisterResponse>(Arena*); +template<> ::fixbug::ResultCode* Arena::CreateMaybeMessage<::fixbug::ResultCode>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace fixbug { + +// =================================================================== + +class ResultCode final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.ResultCode) */ { + public: + inline ResultCode() : ResultCode(nullptr) {} + ~ResultCode() override; + explicit PROTOBUF_CONSTEXPR ResultCode(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ResultCode(const ResultCode& from); + ResultCode(ResultCode&& from) noexcept + : ResultCode() { + *this = ::std::move(from); + } + + inline ResultCode& operator=(const ResultCode& from) { + CopyFrom(from); + return *this; + } + inline ResultCode& operator=(ResultCode&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ResultCode& default_instance() { + return *internal_default_instance(); + } + static inline const ResultCode* internal_default_instance() { + return reinterpret_cast( + &_ResultCode_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ResultCode& a, ResultCode& b) { + a.Swap(&b); + } + inline void Swap(ResultCode* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ResultCode* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ResultCode* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ResultCode& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ResultCode& from) { + ResultCode::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ResultCode* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.ResultCode"; + } + protected: + explicit ResultCode(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kErrmsgFieldNumber = 2, + kErrcodeFieldNumber = 1, + }; + // bytes errmsg = 2; + void clear_errmsg(); + const std::string& errmsg() const; + template + void set_errmsg(ArgT0&& arg0, ArgT... args); + std::string* mutable_errmsg(); + PROTOBUF_NODISCARD std::string* release_errmsg(); + void set_allocated_errmsg(std::string* errmsg); + private: + const std::string& _internal_errmsg() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_errmsg(const std::string& value); + std::string* _internal_mutable_errmsg(); + public: + + // int32 errcode = 1; + void clear_errcode(); + int32_t errcode() const; + void set_errcode(int32_t value); + private: + int32_t _internal_errcode() const; + void _internal_set_errcode(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:fixbug.ResultCode) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr errmsg_; + int32_t errcode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_user_2eproto; +}; +// ------------------------------------------------------------------- + +class LoginRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.LoginRequest) */ { + public: + inline LoginRequest() : LoginRequest(nullptr) {} + ~LoginRequest() override; + explicit PROTOBUF_CONSTEXPR LoginRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LoginRequest(const LoginRequest& from); + LoginRequest(LoginRequest&& from) noexcept + : LoginRequest() { + *this = ::std::move(from); + } + + inline LoginRequest& operator=(const LoginRequest& from) { + CopyFrom(from); + return *this; + } + inline LoginRequest& operator=(LoginRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LoginRequest& default_instance() { + return *internal_default_instance(); + } + static inline const LoginRequest* internal_default_instance() { + return reinterpret_cast( + &_LoginRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(LoginRequest& a, LoginRequest& b) { + a.Swap(&b); + } + inline void Swap(LoginRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LoginRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LoginRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LoginRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const LoginRequest& from) { + LoginRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LoginRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.LoginRequest"; + } + protected: + explicit LoginRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kPwdFieldNumber = 2, + }; + // bytes name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // bytes pwd = 2; + void clear_pwd(); + const std::string& pwd() const; + template + void set_pwd(ArgT0&& arg0, ArgT... args); + std::string* mutable_pwd(); + PROTOBUF_NODISCARD std::string* release_pwd(); + void set_allocated_pwd(std::string* pwd); + private: + const std::string& _internal_pwd() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_pwd(const std::string& value); + std::string* _internal_mutable_pwd(); + public: + + // @@protoc_insertion_point(class_scope:fixbug.LoginRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr pwd_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_user_2eproto; +}; +// ------------------------------------------------------------------- + +class LoginResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.LoginResponse) */ { + public: + inline LoginResponse() : LoginResponse(nullptr) {} + ~LoginResponse() override; + explicit PROTOBUF_CONSTEXPR LoginResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LoginResponse(const LoginResponse& from); + LoginResponse(LoginResponse&& from) noexcept + : LoginResponse() { + *this = ::std::move(from); + } + + inline LoginResponse& operator=(const LoginResponse& from) { + CopyFrom(from); + return *this; + } + inline LoginResponse& operator=(LoginResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LoginResponse& default_instance() { + return *internal_default_instance(); + } + static inline const LoginResponse* internal_default_instance() { + return reinterpret_cast( + &_LoginResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(LoginResponse& a, LoginResponse& b) { + a.Swap(&b); + } + inline void Swap(LoginResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LoginResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LoginResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LoginResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const LoginResponse& from) { + LoginResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LoginResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.LoginResponse"; + } + protected: + explicit LoginResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kResultFieldNumber = 1, + kSuccessFieldNumber = 2, + }; + // .fixbug.ResultCode result = 1; + bool has_result() const; + private: + bool _internal_has_result() const; + public: + void clear_result(); + const ::fixbug::ResultCode& result() const; + PROTOBUF_NODISCARD ::fixbug::ResultCode* release_result(); + ::fixbug::ResultCode* mutable_result(); + void set_allocated_result(::fixbug::ResultCode* result); + private: + const ::fixbug::ResultCode& _internal_result() const; + ::fixbug::ResultCode* _internal_mutable_result(); + public: + void unsafe_arena_set_allocated_result( + ::fixbug::ResultCode* result); + ::fixbug::ResultCode* unsafe_arena_release_result(); + + // bool success = 2; + void clear_success(); + bool success() const; + void set_success(bool value); + private: + bool _internal_success() const; + void _internal_set_success(bool value); + public: + + // @@protoc_insertion_point(class_scope:fixbug.LoginResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::fixbug::ResultCode* result_; + bool success_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_user_2eproto; +}; +// ------------------------------------------------------------------- + +class RegisterRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.RegisterRequest) */ { + public: + inline RegisterRequest() : RegisterRequest(nullptr) {} + ~RegisterRequest() override; + explicit PROTOBUF_CONSTEXPR RegisterRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RegisterRequest(const RegisterRequest& from); + RegisterRequest(RegisterRequest&& from) noexcept + : RegisterRequest() { + *this = ::std::move(from); + } + + inline RegisterRequest& operator=(const RegisterRequest& from) { + CopyFrom(from); + return *this; + } + inline RegisterRequest& operator=(RegisterRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RegisterRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RegisterRequest* internal_default_instance() { + return reinterpret_cast( + &_RegisterRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(RegisterRequest& a, RegisterRequest& b) { + a.Swap(&b); + } + inline void Swap(RegisterRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RegisterRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RegisterRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RegisterRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RegisterRequest& from) { + RegisterRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RegisterRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.RegisterRequest"; + } + protected: + explicit RegisterRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 2, + kPwdFieldNumber = 3, + kIdFieldNumber = 1, + }; + // bytes name = 2; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // bytes pwd = 3; + void clear_pwd(); + const std::string& pwd() const; + template + void set_pwd(ArgT0&& arg0, ArgT... args); + std::string* mutable_pwd(); + PROTOBUF_NODISCARD std::string* release_pwd(); + void set_allocated_pwd(std::string* pwd); + private: + const std::string& _internal_pwd() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_pwd(const std::string& value); + std::string* _internal_mutable_pwd(); + public: + + // uint32 id = 1; + void clear_id(); + uint32_t id() const; + void set_id(uint32_t value); + private: + uint32_t _internal_id() const; + void _internal_set_id(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:fixbug.RegisterRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr pwd_; + uint32_t id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_user_2eproto; +}; +// ------------------------------------------------------------------- + +class RegisterResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.RegisterResponse) */ { + public: + inline RegisterResponse() : RegisterResponse(nullptr) {} + ~RegisterResponse() override; + explicit PROTOBUF_CONSTEXPR RegisterResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RegisterResponse(const RegisterResponse& from); + RegisterResponse(RegisterResponse&& from) noexcept + : RegisterResponse() { + *this = ::std::move(from); + } + + inline RegisterResponse& operator=(const RegisterResponse& from) { + CopyFrom(from); + return *this; + } + inline RegisterResponse& operator=(RegisterResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RegisterResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RegisterResponse* internal_default_instance() { + return reinterpret_cast( + &_RegisterResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(RegisterResponse& a, RegisterResponse& b) { + a.Swap(&b); + } + inline void Swap(RegisterResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RegisterResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RegisterResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RegisterResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RegisterResponse& from) { + RegisterResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RegisterResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.RegisterResponse"; + } + protected: + explicit RegisterResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kResultFieldNumber = 1, + kSuccessFieldNumber = 2, + }; + // .fixbug.ResultCode result = 1; + bool has_result() const; + private: + bool _internal_has_result() const; + public: + void clear_result(); + const ::fixbug::ResultCode& result() const; + PROTOBUF_NODISCARD ::fixbug::ResultCode* release_result(); + ::fixbug::ResultCode* mutable_result(); + void set_allocated_result(::fixbug::ResultCode* result); + private: + const ::fixbug::ResultCode& _internal_result() const; + ::fixbug::ResultCode* _internal_mutable_result(); + public: + void unsafe_arena_set_allocated_result( + ::fixbug::ResultCode* result); + ::fixbug::ResultCode* unsafe_arena_release_result(); + + // bool success = 2; + void clear_success(); + bool success() const; + void set_success(bool value); + private: + bool _internal_success() const; + void _internal_set_success(bool value); + public: + + // @@protoc_insertion_point(class_scope:fixbug.RegisterResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::fixbug::ResultCode* result_; + bool success_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_user_2eproto; +}; +// =================================================================== + +class UserServiceRpc_Stub; + +class UserServiceRpc : public ::PROTOBUF_NAMESPACE_ID::Service { + protected: + // This class should be treated as an abstract interface. + inline UserServiceRpc() {}; + public: + virtual ~UserServiceRpc(); + + typedef UserServiceRpc_Stub Stub; + + static const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* descriptor(); + + virtual void Login(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::LoginRequest* request, + ::fixbug::LoginResponse* response, + ::google::protobuf::Closure* done); + virtual void Register(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::RegisterRequest* request, + ::fixbug::RegisterResponse* response, + ::google::protobuf::Closure* done); + + // implements Service ---------------------------------------------- + + const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* GetDescriptor(); + void CallMethod(const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method, + ::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::PROTOBUF_NAMESPACE_ID::Message* request, + ::PROTOBUF_NAMESPACE_ID::Message* response, + ::google::protobuf::Closure* done); + const ::PROTOBUF_NAMESPACE_ID::Message& GetRequestPrototype( + const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const; + const ::PROTOBUF_NAMESPACE_ID::Message& GetResponsePrototype( + const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const; + + private: + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(UserServiceRpc); +}; + +class UserServiceRpc_Stub : public UserServiceRpc { + public: + UserServiceRpc_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel); + UserServiceRpc_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel, + ::PROTOBUF_NAMESPACE_ID::Service::ChannelOwnership ownership); + ~UserServiceRpc_Stub(); + + inline ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel() { return channel_; } + + // implements UserServiceRpc ------------------------------------------ + + void Login(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::LoginRequest* request, + ::fixbug::LoginResponse* response, + ::google::protobuf::Closure* done); + void Register(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::RegisterRequest* request, + ::fixbug::RegisterResponse* response, + ::google::protobuf::Closure* done); + private: + ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel_; + bool owns_channel_; + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(UserServiceRpc_Stub); +}; + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ResultCode + +// int32 errcode = 1; +inline void ResultCode::clear_errcode() { + _impl_.errcode_ = 0; +} +inline int32_t ResultCode::_internal_errcode() const { + return _impl_.errcode_; +} +inline int32_t ResultCode::errcode() const { + // @@protoc_insertion_point(field_get:fixbug.ResultCode.errcode) + return _internal_errcode(); +} +inline void ResultCode::_internal_set_errcode(int32_t value) { + + _impl_.errcode_ = value; +} +inline void ResultCode::set_errcode(int32_t value) { + _internal_set_errcode(value); + // @@protoc_insertion_point(field_set:fixbug.ResultCode.errcode) +} + +// bytes errmsg = 2; +inline void ResultCode::clear_errmsg() { + _impl_.errmsg_.ClearToEmpty(); +} +inline const std::string& ResultCode::errmsg() const { + // @@protoc_insertion_point(field_get:fixbug.ResultCode.errmsg) + return _internal_errmsg(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ResultCode::set_errmsg(ArgT0&& arg0, ArgT... args) { + + _impl_.errmsg_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:fixbug.ResultCode.errmsg) +} +inline std::string* ResultCode::mutable_errmsg() { + std::string* _s = _internal_mutable_errmsg(); + // @@protoc_insertion_point(field_mutable:fixbug.ResultCode.errmsg) + return _s; +} +inline const std::string& ResultCode::_internal_errmsg() const { + return _impl_.errmsg_.Get(); +} +inline void ResultCode::_internal_set_errmsg(const std::string& value) { + + _impl_.errmsg_.Set(value, GetArenaForAllocation()); +} +inline std::string* ResultCode::_internal_mutable_errmsg() { + + return _impl_.errmsg_.Mutable(GetArenaForAllocation()); +} +inline std::string* ResultCode::release_errmsg() { + // @@protoc_insertion_point(field_release:fixbug.ResultCode.errmsg) + return _impl_.errmsg_.Release(); +} +inline void ResultCode::set_allocated_errmsg(std::string* errmsg) { + if (errmsg != nullptr) { + + } else { + + } + _impl_.errmsg_.SetAllocated(errmsg, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.errmsg_.IsDefault()) { + _impl_.errmsg_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:fixbug.ResultCode.errmsg) +} + +// ------------------------------------------------------------------- + +// LoginRequest + +// bytes name = 1; +inline void LoginRequest::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& LoginRequest::name() const { + // @@protoc_insertion_point(field_get:fixbug.LoginRequest.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void LoginRequest::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:fixbug.LoginRequest.name) +} +inline std::string* LoginRequest::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:fixbug.LoginRequest.name) + return _s; +} +inline const std::string& LoginRequest::_internal_name() const { + return _impl_.name_.Get(); +} +inline void LoginRequest::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* LoginRequest::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* LoginRequest::release_name() { + // @@protoc_insertion_point(field_release:fixbug.LoginRequest.name) + return _impl_.name_.Release(); +} +inline void LoginRequest::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:fixbug.LoginRequest.name) +} + +// bytes pwd = 2; +inline void LoginRequest::clear_pwd() { + _impl_.pwd_.ClearToEmpty(); +} +inline const std::string& LoginRequest::pwd() const { + // @@protoc_insertion_point(field_get:fixbug.LoginRequest.pwd) + return _internal_pwd(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void LoginRequest::set_pwd(ArgT0&& arg0, ArgT... args) { + + _impl_.pwd_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:fixbug.LoginRequest.pwd) +} +inline std::string* LoginRequest::mutable_pwd() { + std::string* _s = _internal_mutable_pwd(); + // @@protoc_insertion_point(field_mutable:fixbug.LoginRequest.pwd) + return _s; +} +inline const std::string& LoginRequest::_internal_pwd() const { + return _impl_.pwd_.Get(); +} +inline void LoginRequest::_internal_set_pwd(const std::string& value) { + + _impl_.pwd_.Set(value, GetArenaForAllocation()); +} +inline std::string* LoginRequest::_internal_mutable_pwd() { + + return _impl_.pwd_.Mutable(GetArenaForAllocation()); +} +inline std::string* LoginRequest::release_pwd() { + // @@protoc_insertion_point(field_release:fixbug.LoginRequest.pwd) + return _impl_.pwd_.Release(); +} +inline void LoginRequest::set_allocated_pwd(std::string* pwd) { + if (pwd != nullptr) { + + } else { + + } + _impl_.pwd_.SetAllocated(pwd, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.pwd_.IsDefault()) { + _impl_.pwd_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:fixbug.LoginRequest.pwd) +} + +// ------------------------------------------------------------------- + +// LoginResponse + +// .fixbug.ResultCode result = 1; +inline bool LoginResponse::_internal_has_result() const { + return this != internal_default_instance() && _impl_.result_ != nullptr; +} +inline bool LoginResponse::has_result() const { + return _internal_has_result(); +} +inline void LoginResponse::clear_result() { + if (GetArenaForAllocation() == nullptr && _impl_.result_ != nullptr) { + delete _impl_.result_; + } + _impl_.result_ = nullptr; +} +inline const ::fixbug::ResultCode& LoginResponse::_internal_result() const { + const ::fixbug::ResultCode* p = _impl_.result_; + return p != nullptr ? *p : reinterpret_cast( + ::fixbug::_ResultCode_default_instance_); +} +inline const ::fixbug::ResultCode& LoginResponse::result() const { + // @@protoc_insertion_point(field_get:fixbug.LoginResponse.result) + return _internal_result(); +} +inline void LoginResponse::unsafe_arena_set_allocated_result( + ::fixbug::ResultCode* result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.result_); + } + _impl_.result_ = result; + if (result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:fixbug.LoginResponse.result) +} +inline ::fixbug::ResultCode* LoginResponse::release_result() { + + ::fixbug::ResultCode* temp = _impl_.result_; + _impl_.result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::fixbug::ResultCode* LoginResponse::unsafe_arena_release_result() { + // @@protoc_insertion_point(field_release:fixbug.LoginResponse.result) + + ::fixbug::ResultCode* temp = _impl_.result_; + _impl_.result_ = nullptr; + return temp; +} +inline ::fixbug::ResultCode* LoginResponse::_internal_mutable_result() { + + if (_impl_.result_ == nullptr) { + auto* p = CreateMaybeMessage<::fixbug::ResultCode>(GetArenaForAllocation()); + _impl_.result_ = p; + } + return _impl_.result_; +} +inline ::fixbug::ResultCode* LoginResponse::mutable_result() { + ::fixbug::ResultCode* _msg = _internal_mutable_result(); + // @@protoc_insertion_point(field_mutable:fixbug.LoginResponse.result) + return _msg; +} +inline void LoginResponse::set_allocated_result(::fixbug::ResultCode* result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.result_; + } + if (result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(result); + if (message_arena != submessage_arena) { + result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, result, submessage_arena); + } + + } else { + + } + _impl_.result_ = result; + // @@protoc_insertion_point(field_set_allocated:fixbug.LoginResponse.result) +} + +// bool success = 2; +inline void LoginResponse::clear_success() { + _impl_.success_ = false; +} +inline bool LoginResponse::_internal_success() const { + return _impl_.success_; +} +inline bool LoginResponse::success() const { + // @@protoc_insertion_point(field_get:fixbug.LoginResponse.success) + return _internal_success(); +} +inline void LoginResponse::_internal_set_success(bool value) { + + _impl_.success_ = value; +} +inline void LoginResponse::set_success(bool value) { + _internal_set_success(value); + // @@protoc_insertion_point(field_set:fixbug.LoginResponse.success) +} + +// ------------------------------------------------------------------- + +// RegisterRequest + +// uint32 id = 1; +inline void RegisterRequest::clear_id() { + _impl_.id_ = 0u; +} +inline uint32_t RegisterRequest::_internal_id() const { + return _impl_.id_; +} +inline uint32_t RegisterRequest::id() const { + // @@protoc_insertion_point(field_get:fixbug.RegisterRequest.id) + return _internal_id(); +} +inline void RegisterRequest::_internal_set_id(uint32_t value) { + + _impl_.id_ = value; +} +inline void RegisterRequest::set_id(uint32_t value) { + _internal_set_id(value); + // @@protoc_insertion_point(field_set:fixbug.RegisterRequest.id) +} + +// bytes name = 2; +inline void RegisterRequest::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& RegisterRequest::name() const { + // @@protoc_insertion_point(field_get:fixbug.RegisterRequest.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RegisterRequest::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:fixbug.RegisterRequest.name) +} +inline std::string* RegisterRequest::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:fixbug.RegisterRequest.name) + return _s; +} +inline const std::string& RegisterRequest::_internal_name() const { + return _impl_.name_.Get(); +} +inline void RegisterRequest::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* RegisterRequest::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* RegisterRequest::release_name() { + // @@protoc_insertion_point(field_release:fixbug.RegisterRequest.name) + return _impl_.name_.Release(); +} +inline void RegisterRequest::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:fixbug.RegisterRequest.name) +} + +// bytes pwd = 3; +inline void RegisterRequest::clear_pwd() { + _impl_.pwd_.ClearToEmpty(); +} +inline const std::string& RegisterRequest::pwd() const { + // @@protoc_insertion_point(field_get:fixbug.RegisterRequest.pwd) + return _internal_pwd(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RegisterRequest::set_pwd(ArgT0&& arg0, ArgT... args) { + + _impl_.pwd_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:fixbug.RegisterRequest.pwd) +} +inline std::string* RegisterRequest::mutable_pwd() { + std::string* _s = _internal_mutable_pwd(); + // @@protoc_insertion_point(field_mutable:fixbug.RegisterRequest.pwd) + return _s; +} +inline const std::string& RegisterRequest::_internal_pwd() const { + return _impl_.pwd_.Get(); +} +inline void RegisterRequest::_internal_set_pwd(const std::string& value) { + + _impl_.pwd_.Set(value, GetArenaForAllocation()); +} +inline std::string* RegisterRequest::_internal_mutable_pwd() { + + return _impl_.pwd_.Mutable(GetArenaForAllocation()); +} +inline std::string* RegisterRequest::release_pwd() { + // @@protoc_insertion_point(field_release:fixbug.RegisterRequest.pwd) + return _impl_.pwd_.Release(); +} +inline void RegisterRequest::set_allocated_pwd(std::string* pwd) { + if (pwd != nullptr) { + + } else { + + } + _impl_.pwd_.SetAllocated(pwd, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.pwd_.IsDefault()) { + _impl_.pwd_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:fixbug.RegisterRequest.pwd) +} + +// ------------------------------------------------------------------- + +// RegisterResponse + +// .fixbug.ResultCode result = 1; +inline bool RegisterResponse::_internal_has_result() const { + return this != internal_default_instance() && _impl_.result_ != nullptr; +} +inline bool RegisterResponse::has_result() const { + return _internal_has_result(); +} +inline void RegisterResponse::clear_result() { + if (GetArenaForAllocation() == nullptr && _impl_.result_ != nullptr) { + delete _impl_.result_; + } + _impl_.result_ = nullptr; +} +inline const ::fixbug::ResultCode& RegisterResponse::_internal_result() const { + const ::fixbug::ResultCode* p = _impl_.result_; + return p != nullptr ? *p : reinterpret_cast( + ::fixbug::_ResultCode_default_instance_); +} +inline const ::fixbug::ResultCode& RegisterResponse::result() const { + // @@protoc_insertion_point(field_get:fixbug.RegisterResponse.result) + return _internal_result(); +} +inline void RegisterResponse::unsafe_arena_set_allocated_result( + ::fixbug::ResultCode* result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.result_); + } + _impl_.result_ = result; + if (result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:fixbug.RegisterResponse.result) +} +inline ::fixbug::ResultCode* RegisterResponse::release_result() { + + ::fixbug::ResultCode* temp = _impl_.result_; + _impl_.result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::fixbug::ResultCode* RegisterResponse::unsafe_arena_release_result() { + // @@protoc_insertion_point(field_release:fixbug.RegisterResponse.result) + + ::fixbug::ResultCode* temp = _impl_.result_; + _impl_.result_ = nullptr; + return temp; +} +inline ::fixbug::ResultCode* RegisterResponse::_internal_mutable_result() { + + if (_impl_.result_ == nullptr) { + auto* p = CreateMaybeMessage<::fixbug::ResultCode>(GetArenaForAllocation()); + _impl_.result_ = p; + } + return _impl_.result_; +} +inline ::fixbug::ResultCode* RegisterResponse::mutable_result() { + ::fixbug::ResultCode* _msg = _internal_mutable_result(); + // @@protoc_insertion_point(field_mutable:fixbug.RegisterResponse.result) + return _msg; +} +inline void RegisterResponse::set_allocated_result(::fixbug::ResultCode* result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.result_; + } + if (result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(result); + if (message_arena != submessage_arena) { + result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, result, submessage_arena); + } + + } else { + + } + _impl_.result_ = result; + // @@protoc_insertion_point(field_set_allocated:fixbug.RegisterResponse.result) +} + +// bool success = 2; +inline void RegisterResponse::clear_success() { + _impl_.success_ = false; +} +inline bool RegisterResponse::_internal_success() const { + return _impl_.success_; +} +inline bool RegisterResponse::success() const { + // @@protoc_insertion_point(field_get:fixbug.RegisterResponse.success) + return _internal_success(); +} +inline void RegisterResponse::_internal_set_success(bool value) { + + _impl_.success_ = value; +} +inline void RegisterResponse::set_success(bool value) { + _internal_set_success(value); + // @@protoc_insertion_point(field_set:fixbug.RegisterResponse.success) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace fixbug + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_user_2eproto diff --git a/mprpc/example/user.proto b/mprpc/example/user.proto new file mode 100644 index 0000000..94e7f6a --- /dev/null +++ b/mprpc/example/user.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; + +package fixbug; + +option cc_generic_services = true; + +message ResultCode +{ + int32 errcode = 1; + bytes errmsg = 2; +} + +message LoginRequest +{ + bytes name = 1; + bytes pwd = 2; +} + +message LoginResponse +{ + ResultCode result = 1; + bool success = 2; +} + +message RegisterRequest +{ + uint32 id = 1; + bytes name = 2; + bytes pwd = 3; +} + +message RegisterResponse +{ + ResultCode result = 1; + bool success = 2; +} + +service UserServiceRpc +{ + rpc Login(LoginRequest) returns(LoginResponse); + rpc Register(RegisterRequest) returns(RegisterResponse); +} \ No newline at end of file diff --git a/mprpc/src/CMakeLists.txt b/mprpc/src/CMakeLists.txt new file mode 100644 index 0000000..6562cf6 --- /dev/null +++ b/mprpc/src/CMakeLists.txt @@ -0,0 +1,12 @@ +# aux_source_directory(. SRC_LIST) +set(SRC_LIST + mprpcapplication.cc + mprpcconfig.cc + rpcheader.pb.cc + rpcprovider.cc + mprpcchannel.cc + mprpccontroller.cc + logger.cc + zookeeperutil.cc) +add_library(mprpc ${SRC_LIST}) +target_link_libraries(mprpc muduo_net muduo_base pthread zookeeper_mt) \ No newline at end of file diff --git a/mprpc/src/include/lockqueue.h b/mprpc/src/include/lockqueue.h new file mode 100644 index 0000000..edf5c80 --- /dev/null +++ b/mprpc/src/include/lockqueue.h @@ -0,0 +1,37 @@ +#pragma once +#include +#include +#include // pthread_mutex_t +#include // pthread_condition_t + +// 异步写日志的日志队列 +template +class LockQueue +{ +public: + // 多个worker线程都会写日志queue + void Push(const T &data) + { + std::lock_guard lock(m_mutex); + m_queue.push(data); + m_condvariable.notify_one(); + } + + // 一个线程读日志queue,写日志文件 + T Pop() + { + std::unique_lock lock(m_mutex); + while(m_queue.empty()) + { + // 日志队列为空,线程进入wait状态 + m_condvariable.wait(lock); + } + T data = m_queue.front(); + m_queue.pop(); + return data; + } +private: + std::queue m_queue; + std::mutex m_mutex; + std::condition_variable m_condvariable; +}; \ No newline at end of file diff --git a/mprpc/src/include/logger.h b/mprpc/src/include/logger.h new file mode 100644 index 0000000..b2c16d2 --- /dev/null +++ b/mprpc/src/include/logger.h @@ -0,0 +1,49 @@ +#pragma once +#include +#include +enum LogLevel +{ + INFO, // 普通信息 + ERROR, // 错误信息 +}; + + +// mprpc框架提供的日志系统 +class Logger +{ +public: + // 获取日志的单例 + static Logger& GetInstance(); + // 设置日志级别 + void SetLogLevel(LogLevel level); + // 写日志 + void Log(std::string msg); +private: + int m_loglevel; // 记录日志级别 + LockQueue m_lckQue; // 日志缓冲队列 + + Logger(); + Logger(const Logger&) = delete; + Logger(Logger&&) = delete; +}; + +// 定义宏 +#define LOG_INFO(logmsgformat, ...)\ + do \ + { \ + Logger &logger = Logger::GetInstance(); \ + logger.SetLogLevel(INFO); \ + char c[1024] = {0}; \ + snprintf(c, 1024, logmsgformat, ##__VA_ARGS__); \ + logger.Log(c); \ + }while(0) + +#define LOG_ERR(logmsgformat, ...)\ + do \ + { \ + Logger &logger = Logger::GetInstance(); \ + logger.SetLogLevel(ERROR); \ + char c[1024] = {0}; \ + snprintf(c, 1024, logmsgformat, ##__VA_ARGS__); \ + logger.Log(c); \ + }while(0) diff --git a/mprpc/src/include/mprpcapplication.h b/mprpc/src/include/mprpcapplication.h new file mode 100644 index 0000000..1cd35f3 --- /dev/null +++ b/mprpc/src/include/mprpcapplication.h @@ -0,0 +1,20 @@ +#pragma once + +#include "mprpcconfig.h" +#include "mprpcchannel.h" +#include "mprpccontroller.h" + +// mprpc框架的初始化类 +class MprpcApplication +{ +public: + static void Init(int argc, char **argv); + static MprpcApplication& GetInstance(); + static Mprpcconfig& GetConfig(); +private: + static Mprpcconfig m_config; + + MprpcApplication(){} + MprpcApplication(const MprpcApplication &) = delete; + MprpcApplication(MprpcApplication&&) = delete; +}; \ No newline at end of file diff --git a/mprpc/src/include/mprpcchannel.h b/mprpc/src/include/mprpcchannel.h new file mode 100644 index 0000000..fdd717c --- /dev/null +++ b/mprpc/src/include/mprpcchannel.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include +#include + +class MprpcChannel : public google::protobuf::RpcChannel +{ + // 所有通过stub代理对象调用的rpc方法都会集中到这里,统一做rpc方法调用的数据序列化和网络发送 + void CallMethod(const google::protobuf::MethodDescriptor* method, + google::protobuf::RpcController* controller, + const google::protobuf::Message* request, + google::protobuf::Message* response, + google::protobuf::Closure* done); +}; \ No newline at end of file diff --git a/mprpc/src/include/mprpcconfig.h b/mprpc/src/include/mprpcconfig.h new file mode 100644 index 0000000..b848076 --- /dev/null +++ b/mprpc/src/include/mprpcconfig.h @@ -0,0 +1,17 @@ +#pragma once +#include +#include + +// 框架读取配置文件类 +class Mprpcconfig +{ +public: + // 负责解析加载配置文件 + void LoadConfigFile(const char *config_file); + // 查询配置项信息 + std::string Load(const std::string &key); +private: + std::unordered_map m_configMap; + // 去掉字符串前后的空格 + void Trim(std::string &src_buf); +}; diff --git a/mprpc/src/include/mprpccontroller.h b/mprpc/src/include/mprpccontroller.h new file mode 100644 index 0000000..6156ad6 --- /dev/null +++ b/mprpc/src/include/mprpccontroller.h @@ -0,0 +1,22 @@ +#pragma once +#include +#include + + +class MprpcController : public google::protobuf::RpcController +{ +public: + MprpcController(); + void Reset(); + bool Failed() const; + std::string ErrorText() const; + void SetFailed(const std::string &reason); + + // 目前未实现具体的功能 + void StartCancel(); + bool IsCanceled() const; + void NotifyOnCancel(google::protobuf::Closure* callback); +private: + bool m_failed; // RPC方法执行过程中的状态 + std::string m_errText; // RPC方法执行过程中的错误信息 +}; \ No newline at end of file diff --git a/mprpc/src/include/rpcheader.pb.h b/mprpc/src/include/rpcheader.pb.h new file mode 100644 index 0000000..f6aa676 --- /dev/null +++ b/mprpc/src/include/rpcheader.pb.h @@ -0,0 +1,379 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: rpcheader.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_rpcheader_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_rpcheader_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#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 3021001 < 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 +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_rpcheader_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_rpcheader_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_rpcheader_2eproto; +namespace mprpc { +class RpcHeader; +struct RpcHeaderDefaultTypeInternal; +extern RpcHeaderDefaultTypeInternal _RpcHeader_default_instance_; +} // namespace mprpc +PROTOBUF_NAMESPACE_OPEN +template<> ::mprpc::RpcHeader* Arena::CreateMaybeMessage<::mprpc::RpcHeader>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace mprpc { + +// =================================================================== + +class RpcHeader final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mprpc.RpcHeader) */ { + public: + inline RpcHeader() : RpcHeader(nullptr) {} + ~RpcHeader() override; + explicit PROTOBUF_CONSTEXPR RpcHeader(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RpcHeader(const RpcHeader& from); + RpcHeader(RpcHeader&& from) noexcept + : RpcHeader() { + *this = ::std::move(from); + } + + inline RpcHeader& operator=(const RpcHeader& from) { + CopyFrom(from); + return *this; + } + inline RpcHeader& operator=(RpcHeader&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RpcHeader& default_instance() { + return *internal_default_instance(); + } + static inline const RpcHeader* internal_default_instance() { + return reinterpret_cast( + &_RpcHeader_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(RpcHeader& a, RpcHeader& b) { + a.Swap(&b); + } + inline void Swap(RpcHeader* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RpcHeader* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RpcHeader* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RpcHeader& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const RpcHeader& from) { + RpcHeader::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RpcHeader* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mprpc.RpcHeader"; + } + protected: + explicit RpcHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kServiceNameFieldNumber = 1, + kMethodNameFieldNumber = 2, + kArgsSizeFieldNumber = 3, + }; + // bytes service_name = 1; + void clear_service_name(); + const std::string& service_name() const; + template + void set_service_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_service_name(); + PROTOBUF_NODISCARD std::string* release_service_name(); + void set_allocated_service_name(std::string* service_name); + private: + const std::string& _internal_service_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_service_name(const std::string& value); + std::string* _internal_mutable_service_name(); + public: + + // bytes method_name = 2; + void clear_method_name(); + const std::string& method_name() const; + template + void set_method_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_method_name(); + PROTOBUF_NODISCARD std::string* release_method_name(); + void set_allocated_method_name(std::string* method_name); + private: + const std::string& _internal_method_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_method_name(const std::string& value); + std::string* _internal_mutable_method_name(); + public: + + // uint32 args_size = 3; + void clear_args_size(); + uint32_t args_size() const; + void set_args_size(uint32_t value); + private: + uint32_t _internal_args_size() const; + void _internal_set_args_size(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:mprpc.RpcHeader) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr service_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr method_name_; + uint32_t args_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_rpcheader_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// RpcHeader + +// bytes service_name = 1; +inline void RpcHeader::clear_service_name() { + _impl_.service_name_.ClearToEmpty(); +} +inline const std::string& RpcHeader::service_name() const { + // @@protoc_insertion_point(field_get:mprpc.RpcHeader.service_name) + return _internal_service_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RpcHeader::set_service_name(ArgT0&& arg0, ArgT... args) { + + _impl_.service_name_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mprpc.RpcHeader.service_name) +} +inline std::string* RpcHeader::mutable_service_name() { + std::string* _s = _internal_mutable_service_name(); + // @@protoc_insertion_point(field_mutable:mprpc.RpcHeader.service_name) + return _s; +} +inline const std::string& RpcHeader::_internal_service_name() const { + return _impl_.service_name_.Get(); +} +inline void RpcHeader::_internal_set_service_name(const std::string& value) { + + _impl_.service_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* RpcHeader::_internal_mutable_service_name() { + + return _impl_.service_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* RpcHeader::release_service_name() { + // @@protoc_insertion_point(field_release:mprpc.RpcHeader.service_name) + return _impl_.service_name_.Release(); +} +inline void RpcHeader::set_allocated_service_name(std::string* service_name) { + if (service_name != nullptr) { + + } else { + + } + _impl_.service_name_.SetAllocated(service_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.service_name_.IsDefault()) { + _impl_.service_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mprpc.RpcHeader.service_name) +} + +// bytes method_name = 2; +inline void RpcHeader::clear_method_name() { + _impl_.method_name_.ClearToEmpty(); +} +inline const std::string& RpcHeader::method_name() const { + // @@protoc_insertion_point(field_get:mprpc.RpcHeader.method_name) + return _internal_method_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void RpcHeader::set_method_name(ArgT0&& arg0, ArgT... args) { + + _impl_.method_name_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mprpc.RpcHeader.method_name) +} +inline std::string* RpcHeader::mutable_method_name() { + std::string* _s = _internal_mutable_method_name(); + // @@protoc_insertion_point(field_mutable:mprpc.RpcHeader.method_name) + return _s; +} +inline const std::string& RpcHeader::_internal_method_name() const { + return _impl_.method_name_.Get(); +} +inline void RpcHeader::_internal_set_method_name(const std::string& value) { + + _impl_.method_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* RpcHeader::_internal_mutable_method_name() { + + return _impl_.method_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* RpcHeader::release_method_name() { + // @@protoc_insertion_point(field_release:mprpc.RpcHeader.method_name) + return _impl_.method_name_.Release(); +} +inline void RpcHeader::set_allocated_method_name(std::string* method_name) { + if (method_name != nullptr) { + + } else { + + } + _impl_.method_name_.SetAllocated(method_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.method_name_.IsDefault()) { + _impl_.method_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mprpc.RpcHeader.method_name) +} + +// uint32 args_size = 3; +inline void RpcHeader::clear_args_size() { + _impl_.args_size_ = 0u; +} +inline uint32_t RpcHeader::_internal_args_size() const { + return _impl_.args_size_; +} +inline uint32_t RpcHeader::args_size() const { + // @@protoc_insertion_point(field_get:mprpc.RpcHeader.args_size) + return _internal_args_size(); +} +inline void RpcHeader::_internal_set_args_size(uint32_t value) { + + _impl_.args_size_ = value; +} +inline void RpcHeader::set_args_size(uint32_t value) { + _internal_set_args_size(value); + // @@protoc_insertion_point(field_set:mprpc.RpcHeader.args_size) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace mprpc + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_rpcheader_2eproto diff --git a/mprpc/src/include/rpcprovider.h b/mprpc/src/include/rpcprovider.h new file mode 100644 index 0000000..f73e7ba --- /dev/null +++ b/mprpc/src/include/rpcprovider.h @@ -0,0 +1,41 @@ +#pragma once +#include "google/protobuf/service.h" +#include +#include +#include +#include +#include +#include +#include +#include + +// 框架提供的专门发布rpc服务的网络对象类 +class RpcProvider +{ +public: + // 这里是框架提供给外部使用的,可以发布rpc方法的函数接口 + void NotifyService(google::protobuf::Service *service); + + // 启动rpc服务节点,开始提供rpc远程网络调用服务 + void Run(); + +private: + // 组合EventLoop + muduo::net::EventLoop m_eventLoop; + + // service服务类型信息 + struct ServiceInfo + { + google::protobuf::Service *m_service; // 保存服务对象 + std::unordered_map m_methodMap; // 保存服务方法 + }; + // 存储注册成功的服务对象和其服务方法的所有信息 + std::unordered_map m_serviceMap; + + // 新的socket连接回调 + void OnConnection(const muduo::net::TcpConnectionPtr&); + // 已建立连接用户的读写事件回调 + void OnMessage(const muduo::net::TcpConnectionPtr&, muduo::net::Buffer*, muduo::Timestamp); + // Closure的回调操作,用于序列化rpc的响应和网络发送 + void SendRpcResponse(const muduo::net::TcpConnectionPtr&, google::protobuf::Message*); +}; \ No newline at end of file diff --git a/mprpc/src/include/zookeeperutil.h b/mprpc/src/include/zookeeperutil.h new file mode 100644 index 0000000..f38c717 --- /dev/null +++ b/mprpc/src/include/zookeeperutil.h @@ -0,0 +1,22 @@ +#pragma once + +#include +#include +#include + +// 封装的zk客户端类 +class ZkClient +{ +public: + ZkClient(); + ~ZkClient(); + // zkclient启动连接zkserver + void Start(); + // 在zkserver上指定的path创建znode节点 + void Create(const char *path, const char *data, int datalen, int state = 0); + // 根据参数指定的znode节点路径,获取znode节点的值 + std::string GetData(const char *path); +private: + // zk客户端的句柄 + zhandle_t *m_zhandle; +}; \ No newline at end of file diff --git a/mprpc/src/logger.cc b/mprpc/src/logger.cc new file mode 100644 index 0000000..14b062b --- /dev/null +++ b/mprpc/src/logger.cc @@ -0,0 +1,60 @@ +#include "logger.h" +#include +#include + +// 获取日志的单例 +Logger& Logger::GetInstance() +{ + static Logger logger; + return logger; +} + +Logger::Logger() +{ + // 启动专门的写日志线程 + std::thread writeLogTask([&](){ + for(;;) + { + // 获取当前的日期,然后获取日志信息,写入当前的文件当中 + time_t now = time(nullptr); + tm *nowtm = localtime(&now); + + char file_name[128]; + sprintf(file_name, "%d-%d-%d-log.txt", nowtm -> tm_year + 1900, nowtm -> tm_mon + 1, nowtm -> tm_mday); + + FILE *pf = fopen(file_name, "a+"); + if(pf == nullptr) + { + std::cout << "logger file: " << file_name << "open error!" << std::endl; + exit(EXIT_FAILURE); + } + + std::string msg = m_lckQue.Pop(); + + char time_buf[128] = {0}; + sprintf(time_buf, "%d:%d:%d => [%s]", + nowtm -> tm_hour, + nowtm -> tm_min, + nowtm -> tm_sec, + (m_loglevel == INFO ? "info" : "error")); + msg.insert(0, time_buf); + msg.append("\n"); + + fputs(msg.c_str(), pf); + fclose(pf); + } + }); + // 设置分离线程(守护线程) + writeLogTask.detach(); +} + +// 设置日志级别 +void Logger::SetLogLevel(LogLevel level) +{ + m_loglevel = level; +} +// 写日志:将日志信息写入lockqueue缓冲区中 +void Logger::Log(std::string msg) +{ + m_lckQue.Push(msg); +} \ No newline at end of file diff --git a/mprpc/src/mprpcapplication.cc b/mprpc/src/mprpcapplication.cc new file mode 100644 index 0000000..c43e926 --- /dev/null +++ b/mprpc/src/mprpcapplication.cc @@ -0,0 +1,58 @@ +#include "mprpcapplication.h" +#include +#include +#include + +Mprpcconfig MprpcApplication::m_config; + +void ShowArgsHelp() +{ + std::cout << "format: command - i " << std::endl; +} + +void MprpcApplication::Init(int argc, char **argv) +{ + if(argc < 2) + { + ShowArgsHelp(); + exit(EXIT_FAILURE); + } + int c = 0; + std::string config_file; + while((c = getopt(argc, argv, "i:")) != -1) + { + switch(c) + { + case 'i': + config_file = optarg; + break; + case '?': + // std::cout << "Invalid args!" << std::endl; + ShowArgsHelp(); + exit(EXIT_FAILURE); + case ':': + // std::cout << "need !" << std::endl; + ShowArgsHelp(); + exit(EXIT_FAILURE); + default: + break; + } + } + // 开始加载配置文件 rpcserver_ip= rpcserver_port= zookeep_ip= zookeeper_port= + m_config.LoadConfigFile(config_file.c_str()); + + // std::cout << "rpcserverip:" << m_config.Load("rpcserverip") << std::endl; + // std::cout << "rpcserverport:" << m_config.Load("rpcserverport") << std::endl; + // std::cout << "zookeeperip:" << m_config.Load("zookeeperip") << std::endl; + // std::cout << "zookeeperport:" << m_config.Load("zookeeperport") << std::endl; +} +MprpcApplication& MprpcApplication::GetInstance() +{ + static MprpcApplication app; + return app; +} + +Mprpcconfig& MprpcApplication::GetConfig() +{ + return m_config; +} \ No newline at end of file diff --git a/mprpc/src/mprpcchannel.cc b/mprpc/src/mprpcchannel.cc new file mode 100644 index 0000000..b3788a0 --- /dev/null +++ b/mprpc/src/mprpcchannel.cc @@ -0,0 +1,158 @@ +#include "mprpcchannel.h" +#include +#include "rpcheader.pb.h" +#include +#include +#include +#include +#include +#include +#include "mprpcapplication.h" +#include "mprpccontroller.h" +#include "zookeeperutil.h" + +/* +header_size + service_name method_name args_size + args +*/ +// 所有通过stub代理对象调用的rpc方法,都走到这里了,统一做rpc方法调用的数据数据序列化和网络发送 +void MprpcChannel::CallMethod(const google::protobuf::MethodDescriptor* method, + google::protobuf::RpcController* controller, + const google::protobuf::Message* request, + google::protobuf::Message* response, + google::protobuf:: Closure* done) +{ + const google::protobuf::ServiceDescriptor* sd = method->service(); + std::string service_name = sd->name(); // service_name + std::string method_name = method->name(); // method_name + + // 获取参数的序列化字符串长度 args_size + uint32_t args_size = 0; + std::string args_str; + if (request->SerializeToString(&args_str)) + { + args_size = args_str.size(); + } + else + { + controller->SetFailed("serialize request error!"); + return; + } + + // 定义rpc的请求header + mprpc::RpcHeader rpcHeader; + rpcHeader.set_service_name(service_name); + rpcHeader.set_method_name(method_name); + rpcHeader.set_args_size(args_size); + + uint32_t header_size = 0; + std::string rpc_header_str; + if (rpcHeader.SerializeToString(&rpc_header_str)) + { + header_size = rpc_header_str.size(); + } + else + { + controller->SetFailed("serialize rpc header error!"); + return; + } + + // 组织待发送的rpc请求的字符串 + std::string send_rpc_str; + send_rpc_str.insert(0, std::string((char*)&header_size, 4)); // header_size + send_rpc_str += rpc_header_str; // rpcheader + send_rpc_str += args_str; // args + + // 打印调试信息 + std::cout << "============================================" << std::endl; + std::cout << "header_size: " << header_size << std::endl; + std::cout << "rpc_header_str: " << rpc_header_str << std::endl; + std::cout << "service_name: " << service_name << std::endl; + std::cout << "method_name: " << method_name << std::endl; + std::cout << "args_str: " << args_str << std::endl; + std::cout << "============================================" << std::endl; + + // 使用tcp编程,完成rpc方法的远程调用 + int clientfd = socket(AF_INET, SOCK_STREAM, 0); + if (-1 == clientfd) + { + char errtxt[512] = {0}; + sprintf(errtxt, "create socket error! errno:%d", errno); + controller->SetFailed(errtxt); + return; + } + + // 读取配置文件rpcserver的信息 + // std::string ip = MprpcApplication::GetInstance().GetConfig().Load("rpcserverip"); + // uint16_t port = atoi(MprpcApplication::GetInstance().GetConfig().Load("rpcserverport").c_str()); + // rpc调用方想调用service_name的method_name服务,需要查询zk上该服务所在的host信息 + ZkClient zkCli; + zkCli.Start(); + // /UserServiceRpc/Login + std::string method_path = "/" + service_name + "/" + method_name; + // 127.0.0.1:8000 + std::string host_data = zkCli.GetData(method_path.c_str()); + if (host_data == "") + { + controller->SetFailed(method_path + " is not exist!"); + return; + } + int idx = host_data.find(":"); + if (idx == -1) + { + controller->SetFailed(method_path + " address is invalid!"); + return; + } + std::string ip = host_data.substr(0, idx); + uint16_t port = atoi(host_data.substr(idx+1, host_data.size()-idx).c_str()); + + struct sockaddr_in server_addr; + server_addr.sin_family = AF_INET; + server_addr.sin_port = htons(port); + server_addr.sin_addr.s_addr = inet_addr(ip.c_str()); + + // 连接rpc服务节点 + if (-1 == connect(clientfd, (struct sockaddr*)&server_addr, sizeof(server_addr))) + { + close(clientfd); + char errtxt[512] = {0}; + sprintf(errtxt, "connect error! errno:%d", errno); + controller->SetFailed(errtxt); + return; + } + + // 发送rpc请求 + if (-1 == send(clientfd, send_rpc_str.c_str(), send_rpc_str.size(), 0)) + { + close(clientfd); + char errtxt[512] = {0}; + sprintf(errtxt, "send error! errno:%d", errno); + controller->SetFailed(errtxt); + return; + } + + // 接收rpc请求的响应值 + char recv_buf[1024] = {0}; + int recv_size = 0; + if (-1 == (recv_size = recv(clientfd, recv_buf, 1024, 0))) + { + close(clientfd); + char errtxt[512] = {0}; + sprintf(errtxt, "recv error! errno:%d", errno); + controller->SetFailed(errtxt); + return; + } + + // 反序列化rpc调用的响应数据 + // std::string response_str(recv_buf, 0, recv_size); // bug出现问题,recv_buf中遇到\0后面的数据就存不下来了,导致反序列化失败 + // if (!response->ParseFromString(response_str)) + if (!response->ParseFromArray(recv_buf, recv_size)) + { + close(clientfd); + char errtxt[2048] = {0}; + sprintf(errtxt, "parse error! response_str:%s", recv_buf); + controller->SetFailed(errtxt); + return; + } + + close(clientfd); +} \ No newline at end of file diff --git a/mprpc/src/mprpcconfig.cc b/mprpc/src/mprpcconfig.cc new file mode 100644 index 0000000..68fae7c --- /dev/null +++ b/mprpc/src/mprpcconfig.cc @@ -0,0 +1,72 @@ +#include "mprpcconfig.h" +#include +#include + +// 负责解析加载配置文件 +void Mprpcconfig::LoadConfigFile(const char *config_file) +{ + FILE *pf = fopen(config_file, "r"); + if(pf == nullptr) + { + std::cout << config_file << "is not exist!" << std::endl; + exit(EXIT_FAILURE); + } + + while(!feof(pf)) + { + char buf[512] = {0}; + fgets(buf, 512, pf); + + // 去掉字符串前多余的空格 + std::string read_buf(buf); + Trim(read_buf); + + // 判断#的注释 + if(read_buf[0] == '#' || read_buf.empty()) + { + continue; + } + + // 解析配置项 + int idx = read_buf.find('='); + if(idx == -1) + { + // 配置项不合法 + continue; + } + std::string key; + std::string value; + key = read_buf.substr(0, idx); + Trim(key); + // 127.0.0.1\n + int endidx = read_buf.find('\n', idx); + value = read_buf.substr(idx + 1, endidx - idx - 1); + Trim(value); + m_configMap.insert({key, value}); + } +} + +// 查询配置项信息 +std::string Mprpcconfig::Load(const std::string &key) +{ + if(m_configMap.find(key) == m_configMap.end()) + { + return ""; + } + auto it = m_configMap.find(key); + return it -> second; +} + +void Mprpcconfig::Trim(std::string &src_buf) +{ + int idx = src_buf.find_first_not_of(' '); + if(idx != -1) + { + src_buf = src_buf.substr(idx, src_buf.size() - idx); + } + idx = src_buf.find_last_not_of(' '); + if(idx != -1) + { + src_buf = src_buf.substr(0, idx + 1); + } +} \ No newline at end of file diff --git a/mprpc/src/mprpccontroller.cc b/mprpc/src/mprpccontroller.cc new file mode 100644 index 0000000..58ffd7d --- /dev/null +++ b/mprpc/src/mprpccontroller.cc @@ -0,0 +1,34 @@ +#include "mprpccontroller.h" + +MprpcController::MprpcController() +{ + m_failed = false; + m_errText = ""; +} + +void MprpcController::Reset() +{ + m_failed = false; + m_errText = ""; +} + +bool MprpcController::Failed() const +{ + return m_failed; +} + +std::string MprpcController::ErrorText() const +{ + return m_errText; +} + +void MprpcController::SetFailed(const std::string &reason) +{ + m_failed = true; + m_errText = reason; +} + +// 目前未实现的具体功能 +void MprpcController::StartCancel(){} +bool MprpcController::IsCanceled() const{return false;} +void MprpcController::NotifyOnCancel(google::protobuf::Closure* callback){} \ No newline at end of file diff --git a/mprpc/src/rpcheader.pb.cc b/mprpc/src/rpcheader.pb.cc new file mode 100644 index 0000000..25fb8cc --- /dev/null +++ b/mprpc/src/rpcheader.pb.cc @@ -0,0 +1,365 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: rpcheader.proto + +#include "rpcheader.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace mprpc { +PROTOBUF_CONSTEXPR RpcHeader::RpcHeader( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.service_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.method_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.args_size_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct RpcHeaderDefaultTypeInternal { + PROTOBUF_CONSTEXPR RpcHeaderDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RpcHeaderDefaultTypeInternal() {} + union { + RpcHeader _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RpcHeaderDefaultTypeInternal _RpcHeader_default_instance_; +} // namespace mprpc +static ::_pb::Metadata file_level_metadata_rpcheader_2eproto[1]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_rpcheader_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_rpcheader_2eproto = nullptr; + +const uint32_t TableStruct_rpcheader_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mprpc::RpcHeader, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mprpc::RpcHeader, _impl_.service_name_), + PROTOBUF_FIELD_OFFSET(::mprpc::RpcHeader, _impl_.method_name_), + PROTOBUF_FIELD_OFFSET(::mprpc::RpcHeader, _impl_.args_size_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::mprpc::RpcHeader)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::mprpc::_RpcHeader_default_instance_._instance, +}; + +const char descriptor_table_protodef_rpcheader_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\017rpcheader.proto\022\005mprpc\"I\n\tRpcHeader\022\024\n" + "\014service_name\030\001 \001(\014\022\023\n\013method_name\030\002 \001(\014" + "\022\021\n\targs_size\030\003 \001(\rb\006proto3" + ; +static ::_pbi::once_flag descriptor_table_rpcheader_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_rpcheader_2eproto = { + false, false, 107, descriptor_table_protodef_rpcheader_2eproto, + "rpcheader.proto", + &descriptor_table_rpcheader_2eproto_once, nullptr, 0, 1, + schemas, file_default_instances, TableStruct_rpcheader_2eproto::offsets, + file_level_metadata_rpcheader_2eproto, file_level_enum_descriptors_rpcheader_2eproto, + file_level_service_descriptors_rpcheader_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_rpcheader_2eproto_getter() { + return &descriptor_table_rpcheader_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_rpcheader_2eproto(&descriptor_table_rpcheader_2eproto); +namespace mprpc { + +// =================================================================== + +class RpcHeader::_Internal { + public: +}; + +RpcHeader::RpcHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mprpc.RpcHeader) +} +RpcHeader::RpcHeader(const RpcHeader& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + RpcHeader* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.service_name_){} + , decltype(_impl_.method_name_){} + , decltype(_impl_.args_size_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.service_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.service_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_service_name().empty()) { + _this->_impl_.service_name_.Set(from._internal_service_name(), + _this->GetArenaForAllocation()); + } + _impl_.method_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.method_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_method_name().empty()) { + _this->_impl_.method_name_.Set(from._internal_method_name(), + _this->GetArenaForAllocation()); + } + _this->_impl_.args_size_ = from._impl_.args_size_; + // @@protoc_insertion_point(copy_constructor:mprpc.RpcHeader) +} + +inline void RpcHeader::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.service_name_){} + , decltype(_impl_.method_name_){} + , decltype(_impl_.args_size_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.service_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.service_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.method_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.method_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +RpcHeader::~RpcHeader() { + // @@protoc_insertion_point(destructor:mprpc.RpcHeader) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RpcHeader::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.service_name_.Destroy(); + _impl_.method_name_.Destroy(); +} + +void RpcHeader::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void RpcHeader::Clear() { +// @@protoc_insertion_point(message_clear_start:mprpc.RpcHeader) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.service_name_.ClearToEmpty(); + _impl_.method_name_.ClearToEmpty(); + _impl_.args_size_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* RpcHeader::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bytes service_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_service_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes method_name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_method_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint32 args_size = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _impl_.args_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RpcHeader::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mprpc.RpcHeader) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // bytes service_name = 1; + if (!this->_internal_service_name().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_service_name(), target); + } + + // bytes method_name = 2; + if (!this->_internal_method_name().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_method_name(), target); + } + + // uint32 args_size = 3; + if (this->_internal_args_size() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_args_size(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mprpc.RpcHeader) + return target; +} + +size_t RpcHeader::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mprpc.RpcHeader) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes service_name = 1; + if (!this->_internal_service_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_service_name()); + } + + // bytes method_name = 2; + if (!this->_internal_method_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_method_name()); + } + + // uint32 args_size = 3; + if (this->_internal_args_size() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_args_size()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RpcHeader::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + RpcHeader::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RpcHeader::GetClassData() const { return &_class_data_; } + + +void RpcHeader::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:mprpc.RpcHeader) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_service_name().empty()) { + _this->_internal_set_service_name(from._internal_service_name()); + } + if (!from._internal_method_name().empty()) { + _this->_internal_set_method_name(from._internal_method_name()); + } + if (from._internal_args_size() != 0) { + _this->_internal_set_args_size(from._internal_args_size()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void RpcHeader::CopyFrom(const RpcHeader& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mprpc.RpcHeader) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RpcHeader::IsInitialized() const { + return true; +} + +void RpcHeader::InternalSwap(RpcHeader* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.service_name_, lhs_arena, + &other->_impl_.service_name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.method_name_, lhs_arena, + &other->_impl_.method_name_, rhs_arena + ); + swap(_impl_.args_size_, other->_impl_.args_size_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RpcHeader::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_rpcheader_2eproto_getter, &descriptor_table_rpcheader_2eproto_once, + file_level_metadata_rpcheader_2eproto[0]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace mprpc +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::mprpc::RpcHeader* +Arena::CreateMaybeMessage< ::mprpc::RpcHeader >(Arena* arena) { + return Arena::CreateMessageInternal< ::mprpc::RpcHeader >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/mprpc/src/rpcheader.proto b/mprpc/src/rpcheader.proto new file mode 100644 index 0000000..9a8aa5e --- /dev/null +++ b/mprpc/src/rpcheader.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package mprpc; + +message RpcHeader +{ + bytes service_name = 1; + bytes method_name = 2; + uint32 args_size = 3; +} \ No newline at end of file diff --git a/mprpc/src/rpcprovider.cc b/mprpc/src/rpcprovider.cc new file mode 100644 index 0000000..a039efb --- /dev/null +++ b/mprpc/src/rpcprovider.cc @@ -0,0 +1,197 @@ +#include "rpcprovider.h" +#include "mprpcapplication.h" +#include "rpcheader.pb.h" +#include "logger.h" +#include "zookeeperutil.h" +/* +service_name => service描述 =》 service* 记录服务对象 + method_name => method方法对象 +*/ + + + + +// 框架提供给外部使用的,可以发布rpc方法的函数接口 +void RpcProvider::NotifyService(google::protobuf::Service *service) +{ + ServiceInfo service_info; + + // 获取服务对象的描述信息 + const google::protobuf::ServiceDescriptor *pserviceDesc = service -> GetDescriptor(); + // 获取服务的名字 + const std::string service_name = pserviceDesc -> name(); + // 获取服务对象方法的数量 + int methodCnt = pserviceDesc -> method_count(); + + // std::cout << "service name is: " << service_name << std::endl; + LOG_INFO("service_name: %s", service_name.c_str()); + for(int i = 0; i < methodCnt; i ++ ) + { + // 获取了服务对象指定下标的方法描述 + const google::protobuf::MethodDescriptor *pmethodDesc = pserviceDesc -> method(i); + std::string method_name = pmethodDesc -> name(); + service_info.m_methodMap.insert({method_name, pmethodDesc}); + // std::cout << "method name is: " << method_name << std::endl; + LOG_INFO("method_name: %s", method_name.c_str()); + } + service_info.m_service = service; + m_serviceMap.insert({service_name, service_info}); +} + +// 启动Rpc服务节点,开始提供Rpc远程调用服务 +void RpcProvider::Run() +{ + std::string ip = MprpcApplication::GetInstance().GetConfig().Load("rpcserverip"); + uint16_t port = atoi(MprpcApplication::GetInstance().GetConfig().Load("rpcserverport").c_str()); + muduo::net::InetAddress address(ip, port); + + // 创建TcpServer对象 + muduo::net::TcpServer server(&m_eventLoop, address, "RpcProvider"); + // 绑定连接回调与消息读写回调方法 分离了网络代码和业务代码 + server.setConnectionCallback(std::bind(&RpcProvider::OnConnection, this, std::placeholders::_1)); + server.setMessageCallback(std::bind(&RpcProvider::OnMessage, this, std::placeholders::_1, + std::placeholders::_2, std::placeholders::_3)); + // 设置muduo库的线程数量 + server.setThreadNum(4); + + // 将当前rpc节点上要发布的服务全部注册到zk上,让rpc client可以从zk上发现服务 + // session timeout = 30s zkclient 网络I/O线程 1/3 * timeout时间发送ping消息 + ZkClient zkCli; + zkCli.Start(); + // service_name为永久性节点, method_name为临时性节点 + for(auto &sp : m_serviceMap) + { + // service_name /UserServiceRpc + std::string service_path = "/" + sp.first; + zkCli.Create(service_path.c_str(), nullptr, 0); + for(auto &mp : sp.second.m_methodMap) + { + // service_name/method_name /UserServiceRpc/Login 存储当前此Rpc服务节点主机的ip与port + std::string method_path = service_path + "/" + mp.first; + char method_path_data[128] = {0}; + sprintf(method_path_data, "%s:%d", ip.c_str(), port); + // ZOO_EPHEMERAL表示znode是一个临时性节点 + zkCli.Create(method_path.c_str(), method_path_data, strlen(method_path_data), ZOO_EPHEMERAL); + } + } + + // rpc服务准备启动,打印信息 + std::cout << "RpcProvider start service at ip: " << ip << "port: " << port << std::endl; + + + // 启动网络服务 + server.start(); + m_eventLoop.loop(); +} + +// 新的socket连接回调 +void RpcProvider::OnConnection(const muduo::net::TcpConnectionPtr& conn) +{ + if(!conn -> connected()) + { + // 与rpc client的连接断开了 + conn -> shutdown(); + } +} + + +/* +在框架内部,RpcProvider和RpcConsumer协商好彼此之间通信用的protobuf数据类型 +service_name method_name args 定义proto的message类型,进行数据头的序列化和反序列化 +head_size(4 byte) + head_str + args_str +*/ +// 已建立连接用户的读写事件回调,如果远程有一个rpc服务的调用请求,那么OnMessage方法就会响应 +void RpcProvider::OnMessage(const muduo::net::TcpConnectionPtr &conn, + muduo::net::Buffer* buffer, + muduo::Timestamp) +{ + // 网络上接受的rpc调用请求的字符流 Login args + std::string recv_buf = buffer -> retrieveAllAsString(); + + // 从字符流中读取前4个字节的内容 + uint32_t header_size = 0; + recv_buf.copy((char*)&header_size, 4, 0); + + // 根据header_size读取数据头的原始字符流 反序列化数据得到rpc请求的详细信息 + std::string rpc_header_str = recv_buf.substr(4, header_size); + mprpc::RpcHeader rpcHeader; + std::string service_name; + std::string method_name; + uint32_t args_size; + if(rpcHeader.ParseFromString(rpc_header_str)) + { + // 数据头反序列化成功 + service_name = rpcHeader.service_name(); + method_name = rpcHeader.method_name(); + args_size = rpcHeader.args_size(); + } + else + { + // 数据头反序列化失败 + std::cout << "rpc_header_str: " << rpc_header_str << "parse error!" << std::endl; + return; + } + // 获取rpc方法参数的字符流数据 + std::string args_str = recv_buf.substr(4 + header_size, args_size); + // 打印调试信息 + std::cout << "==========================================" << std::endl; + std::cout << "header_size is: " << header_size << std::endl; + std::cout << "rpc_header_str is: " << rpc_header_str << std::endl; + std::cout << "service_name is: " << service_name << std::endl; + std::cout << "method_name is: " << method_name << std::endl; + std::cout << "args_str is: " << args_str << std::endl; + std::cout << "==========================================" << std::endl; + + // 获取service对象和method对象 + auto it = m_serviceMap.find(service_name); + if(it == m_serviceMap.end()) + { + std::cout << service_name << "does not exist!" << std::endl; + return; + } + + auto mit = it -> second.m_methodMap.find(method_name); + if(mit == it -> second.m_methodMap.end()) + { + std::cout << service_name << ": " << method_name << "does not exist!" << std::endl; + return; + } + + google::protobuf::Service *service = it -> second.m_service; // 获取service对象 + const google::protobuf::MethodDescriptor *method = mit -> second; // 获取method对象 + + // 生成rpc方法调用的请求request和响应response参数 + google::protobuf::Message *request = service -> GetRequestPrototype(method).New(); + if(!request -> ParseFromString(args_str)) + { + std::cout << "request parse error!" << std::endl; + return; + } + google::protobuf::Message *response = service -> GetResponsePrototype(method).New(); + + // 给下面的method方法的调用,绑定一个Closure回调函数 + google::protobuf::Closure *done = + google::protobuf::NewCallback(this, &RpcProvider::SendRpcResponse, conn, response); + + // 在框架上根据远端rpc请求,调用当前rpc节点上发布的方法 + // new UserService.Login(controller, request, response, done) + service -> CallMethod(method, nullptr, request, response, done); +} + +// Closure回调操作,用于序列化rpc的响应与网络发送 +void RpcProvider::SendRpcResponse(const muduo::net::TcpConnectionPtr& conn, google::protobuf::Message* response) +{ + std::string response_str; + if(response -> SerializeToString(&response_str)) // response进行序列化 + { + // 序列化成功后,将rpc执行的结果发送给rpc调用方 + conn -> send(response_str); + } + else + { + std::cout << "Serialize response_str error!" << std::endl; + } + conn -> shutdown(); // 模仿http的短链接服务,由rpcprovider主动断开连接 +} \ No newline at end of file diff --git a/mprpc/src/zookeeperutil.cc b/mprpc/src/zookeeperutil.cc new file mode 100644 index 0000000..2c090dc --- /dev/null +++ b/mprpc/src/zookeeperutil.cc @@ -0,0 +1,105 @@ +#include "zookeeperutil.h" +#include "mprpcapplication.h" +#include +#include + +// 全局的watcher观察器 zkserver给zkclient的通知 +void global_watcher(zhandle_t *zh, int type, + int state, const char *path, void *watcherCtx) +{ + if(type == ZOO_SESSION_EVENT) // 回调的消息类型是与会话相关的消息类型 + { + if(state == ZOO_CONNECTED_STATE) // zkclient与zkserver连接成功 + { + sem_t *sem = (sem_t*)zoo_get_context(zh); + sem_post(sem); // 给信号量+1 + } + } +} + +ZkClient::ZkClient() : m_zhandle(nullptr) +{ + +} + +ZkClient::~ZkClient() +{ + // 已经与zkserver连接 + if(m_zhandle != nullptr) + { + zookeeper_close(m_zhandle); // 关闭句柄,释放资源 + } +} + +// 连接zkserver +void ZkClient::Start() +{ + std::string host = MprpcApplication::GetInstance().GetConfig().Load("zookeeperip"); + std::string port = MprpcApplication::GetInstance().GetConfig().Load("zookeeperport"); + std::string connstr = host + ":" + port; + + + /* + zookeeper_mt:多线程版本 + zookeeper的API客户端程序提供了3个线程 + API调用线程 + 网络I/O线程 pthread_create poll + watcher回调线程 + */ + m_zhandle = zookeeper_init(connstr.c_str(), global_watcher, 30000, nullptr, nullptr, 0); // gloabal_watcher就是回调函数 + if(nullptr == m_zhandle) + { + std::cout << "zookeeper_init error!" << std::endl; + exit(EXIT_FAILURE); + } + sem_t sem; // 创建信号量 + sem_init(&sem, 0, 0); + zoo_set_context(m_zhandle, &sem); // 给gloabal_watcher传参,给指定句柄绑定信号量 + + sem_wait(&sem); // 等待zkserver响应 + std::cout << "zookeeper_init success!" << std::endl; +} + + +void ZkClient::Create(const char *path, const char *data, int datalen, int state) +{ + char path_buffer[128]; + int bufferlen = sizeof(path_buffer); + int flag; + // 先判断path表示的znode节点是否存在,如果存在,就不再重复创建了 + flag = zoo_exists(m_zhandle, path, 0, nullptr); + if(ZNONODE == flag) // 表示path的znode节点不存在 + { + // 创建指定path的znode节点了 + flag = zoo_create(m_zhandle, path, data, datalen, + &ZOO_OPEN_ACL_UNSAFE, state, path_buffer, bufferlen); + if(flag == ZOK) + { + std::cout << "znode create success... path:" << path << std::endl; + } + else + { + std::cout << "flag:" << flag << std::endl; + std::cout << "znode create error... path:" << path << std::endl; + exit(EXIT_FAILURE); + } + } +} + + +// 根据指定的path,获取znode节点的值 +std::string ZkClient::GetData(const char *path) +{ + char buffer[64]; + int bufferlen = sizeof(buffer); + int flag = zoo_get(m_zhandle, path, 0, buffer, &bufferlen, nullptr); + if(flag != ZOK) + { + std::cout << "get znode error... path:" << path << std::endl; + return ""; + } + else + { + return buffer; + } +} \ No newline at end of file diff --git a/mprpc/test/protobuf/main.cc b/mprpc/test/protobuf/main.cc new file mode 100644 index 0000000..bc47415 --- /dev/null +++ b/mprpc/test/protobuf/main.cc @@ -0,0 +1,54 @@ +#include "test.pb.h" +#include +#include + +using namespace fixbug; + +int main() +{ + // LoginResponse rsp; + // ResultCode *rc = rsp.mutable_result(); + // rc -> set_errcode(0); + // rc -> set_errmsg("Failed to login!"); + GetFriendResponse rsp; + ResultCode *rc = rsp.mutable_result(); + rc -> set_errcode(0); + User *user1 = rsp.add_friend_list(); + user1 -> set_name("zhang san"); + user1 -> set_age(20); + user1 -> set_sex(User::MAN); + + User *user2 = rsp.add_friend_list(); + user2 -> set_name("li si"); + user2 -> set_age(20); + user2 -> set_sex(User::MAN); + + std::cout << rsp.friend_list_size() << std::endl; + + return 0; +} + + +int main1() +{ + // 封装login请求对象的数据 + LoginRequest req; + req.set_name("zhang san"); + req.set_pwd("123456"); + + // 对象数据序列化 -> char* + std::string send_str; + if(req.SerializeToString(&send_str)) + { + std::cout << send_str.c_str() << std::endl; + } + + // 从send_str反序列化一个login请求对象 + LoginRequest reqB; + if(reqB.ParseFromString(send_str)) + { + std::cout << reqB.name() << std::endl; + std::cout << reqB.pwd() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/mprpc/test/protobuf/test.pb.cc b/mprpc/test/protobuf/test.pb.cc new file mode 100644 index 0000000..da79780 --- /dev/null +++ b/mprpc/test/protobuf/test.pb.cc @@ -0,0 +1,1738 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: test.proto + +#include "test.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace fixbug { +PROTOBUF_CONSTEXPR ResultCode::ResultCode( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.errmsg_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.errcode_)*/0 + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ResultCodeDefaultTypeInternal { + PROTOBUF_CONSTEXPR ResultCodeDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ResultCodeDefaultTypeInternal() {} + union { + ResultCode _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResultCodeDefaultTypeInternal _ResultCode_default_instance_; +PROTOBUF_CONSTEXPR LoginRequest::LoginRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.pwd_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct LoginRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR LoginRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~LoginRequestDefaultTypeInternal() {} + union { + LoginRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LoginRequestDefaultTypeInternal _LoginRequest_default_instance_; +PROTOBUF_CONSTEXPR LoginResponse::LoginResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.result_)*/nullptr + , /*decltype(_impl_.success_)*/false + , /*decltype(_impl_._cached_size_)*/{}} {} +struct LoginResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR LoginResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~LoginResponseDefaultTypeInternal() {} + union { + LoginResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LoginResponseDefaultTypeInternal _LoginResponse_default_instance_; +PROTOBUF_CONSTEXPR GetFriendListsRequest::GetFriendListsRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.userid_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetFriendListsRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetFriendListsRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetFriendListsRequestDefaultTypeInternal() {} + union { + GetFriendListsRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetFriendListsRequestDefaultTypeInternal _GetFriendListsRequest_default_instance_; +PROTOBUF_CONSTEXPR User::User( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.age_)*/0u + , /*decltype(_impl_.sex_)*/0 + , /*decltype(_impl_._cached_size_)*/{}} {} +struct UserDefaultTypeInternal { + PROTOBUF_CONSTEXPR UserDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~UserDefaultTypeInternal() {} + union { + User _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UserDefaultTypeInternal _User_default_instance_; +PROTOBUF_CONSTEXPR GetFriendResponse::GetFriendResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.friend_list_)*/{} + , /*decltype(_impl_.result_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct GetFriendResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetFriendResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GetFriendResponseDefaultTypeInternal() {} + union { + GetFriendResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetFriendResponseDefaultTypeInternal _GetFriendResponse_default_instance_; +} // namespace fixbug +static ::_pb::Metadata file_level_metadata_test_2eproto[6]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_test_2eproto[1]; +static const ::_pb::ServiceDescriptor* file_level_service_descriptors_test_2eproto[1]; + +const uint32_t TableStruct_test_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::ResultCode, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::ResultCode, _impl_.errcode_), + PROTOBUF_FIELD_OFFSET(::fixbug::ResultCode, _impl_.errmsg_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::LoginRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::LoginRequest, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::fixbug::LoginRequest, _impl_.pwd_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::LoginResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::LoginResponse, _impl_.result_), + PROTOBUF_FIELD_OFFSET(::fixbug::LoginResponse, _impl_.success_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::GetFriendListsRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::GetFriendListsRequest, _impl_.userid_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::User, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::User, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::fixbug::User, _impl_.age_), + PROTOBUF_FIELD_OFFSET(::fixbug::User, _impl_.sex_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::fixbug::GetFriendResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::fixbug::GetFriendResponse, _impl_.result_), + PROTOBUF_FIELD_OFFSET(::fixbug::GetFriendResponse, _impl_.friend_list_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::fixbug::ResultCode)}, + { 8, -1, -1, sizeof(::fixbug::LoginRequest)}, + { 16, -1, -1, sizeof(::fixbug::LoginResponse)}, + { 24, -1, -1, sizeof(::fixbug::GetFriendListsRequest)}, + { 31, -1, -1, sizeof(::fixbug::User)}, + { 40, -1, -1, sizeof(::fixbug::GetFriendResponse)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::fixbug::_ResultCode_default_instance_._instance, + &::fixbug::_LoginRequest_default_instance_._instance, + &::fixbug::_LoginResponse_default_instance_._instance, + &::fixbug::_GetFriendListsRequest_default_instance_._instance, + &::fixbug::_User_default_instance_._instance, + &::fixbug::_GetFriendResponse_default_instance_._instance, +}; + +const char descriptor_table_protodef_test_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\ntest.proto\022\006fixbug\"-\n\nResultCode\022\017\n\007er" + "rcode\030\001 \001(\005\022\016\n\006errmsg\030\002 \001(\014\")\n\014LoginRequ" + "est\022\014\n\004name\030\001 \001(\014\022\013\n\003pwd\030\002 \001(\014\"D\n\rLoginR" + "esponse\022\"\n\006result\030\001 \001(\0132\022.fixbug.ResultC" + "ode\022\017\n\007success\030\002 \001(\010\"\'\n\025GetFriendListsRe" + "quest\022\016\n\006userid\030\001 \001(\r\"[\n\004User\022\014\n\004name\030\001 " + "\001(\014\022\013\n\003age\030\002 \001(\r\022\035\n\003sex\030\003 \001(\0162\020.fixbug.U" + "ser.Sex\"\031\n\003Sex\022\007\n\003MAN\020\000\022\t\n\005WOMAN\020\001\"Z\n\021Ge" + "tFriendResponse\022\"\n\006result\030\001 \001(\0132\022.fixbug" + ".ResultCode\022!\n\013friend_list\030\002 \003(\0132\014.fixbu" + "g.User2\222\001\n\016UserServiceRpc\0224\n\005Login\022\024.fix" + "bug.LoginRequest\032\025.fixbug.LoginResponse\022" + "J\n\016GetFriendLists\022\035.fixbug.GetFriendList" + "sRequest\032\031.fixbug.GetFriendResponseB\003\200\001\001" + "b\006proto3" + ; +static ::_pbi::once_flag descriptor_table_test_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_test_2eproto = { + false, false, 568, descriptor_table_protodef_test_2eproto, + "test.proto", + &descriptor_table_test_2eproto_once, nullptr, 0, 6, + schemas, file_default_instances, TableStruct_test_2eproto::offsets, + file_level_metadata_test_2eproto, file_level_enum_descriptors_test_2eproto, + file_level_service_descriptors_test_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_test_2eproto_getter() { + return &descriptor_table_test_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_test_2eproto(&descriptor_table_test_2eproto); +namespace fixbug { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* User_Sex_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_test_2eproto); + return file_level_enum_descriptors_test_2eproto[0]; +} +bool User_Sex_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr User_Sex User::MAN; +constexpr User_Sex User::WOMAN; +constexpr User_Sex User::Sex_MIN; +constexpr User_Sex User::Sex_MAX; +constexpr int User::Sex_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) + +// =================================================================== + +class ResultCode::_Internal { + public: +}; + +ResultCode::ResultCode(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.ResultCode) +} +ResultCode::ResultCode(const ResultCode& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ResultCode* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.errmsg_){} + , decltype(_impl_.errcode_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.errmsg_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.errmsg_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_errmsg().empty()) { + _this->_impl_.errmsg_.Set(from._internal_errmsg(), + _this->GetArenaForAllocation()); + } + _this->_impl_.errcode_ = from._impl_.errcode_; + // @@protoc_insertion_point(copy_constructor:fixbug.ResultCode) +} + +inline void ResultCode::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.errmsg_){} + , decltype(_impl_.errcode_){0} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.errmsg_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.errmsg_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ResultCode::~ResultCode() { + // @@protoc_insertion_point(destructor:fixbug.ResultCode) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ResultCode::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.errmsg_.Destroy(); +} + +void ResultCode::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ResultCode::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.ResultCode) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.errmsg_.ClearToEmpty(); + _impl_.errcode_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ResultCode::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 errcode = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.errcode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes errmsg = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_errmsg(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ResultCode::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.ResultCode) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // int32 errcode = 1; + if (this->_internal_errcode() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_errcode(), target); + } + + // bytes errmsg = 2; + if (!this->_internal_errmsg().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_errmsg(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.ResultCode) + return target; +} + +size_t ResultCode::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.ResultCode) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes errmsg = 2; + if (!this->_internal_errmsg().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_errmsg()); + } + + // int32 errcode = 1; + if (this->_internal_errcode() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_errcode()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ResultCode::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ResultCode::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ResultCode::GetClassData() const { return &_class_data_; } + + +void ResultCode::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.ResultCode) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_errmsg().empty()) { + _this->_internal_set_errmsg(from._internal_errmsg()); + } + if (from._internal_errcode() != 0) { + _this->_internal_set_errcode(from._internal_errcode()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ResultCode::CopyFrom(const ResultCode& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.ResultCode) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResultCode::IsInitialized() const { + return true; +} + +void ResultCode::InternalSwap(ResultCode* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.errmsg_, lhs_arena, + &other->_impl_.errmsg_, rhs_arena + ); + swap(_impl_.errcode_, other->_impl_.errcode_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ResultCode::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_test_2eproto_getter, &descriptor_table_test_2eproto_once, + file_level_metadata_test_2eproto[0]); +} + +// =================================================================== + +class LoginRequest::_Internal { + public: +}; + +LoginRequest::LoginRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.LoginRequest) +} +LoginRequest::LoginRequest(const LoginRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + LoginRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.pwd_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _impl_.pwd_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.pwd_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_pwd().empty()) { + _this->_impl_.pwd_.Set(from._internal_pwd(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:fixbug.LoginRequest) +} + +inline void LoginRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.pwd_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.pwd_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.pwd_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +LoginRequest::~LoginRequest() { + // @@protoc_insertion_point(destructor:fixbug.LoginRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void LoginRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); + _impl_.pwd_.Destroy(); +} + +void LoginRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void LoginRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.LoginRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.ClearToEmpty(); + _impl_.pwd_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* LoginRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bytes name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes pwd = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_pwd(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LoginRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.LoginRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // bytes name = 1; + if (!this->_internal_name().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_name(), target); + } + + // bytes pwd = 2; + if (!this->_internal_pwd().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_pwd(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.LoginRequest) + return target; +} + +size_t LoginRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.LoginRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes name = 1; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_name()); + } + + // bytes pwd = 2; + if (!this->_internal_pwd().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_pwd()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LoginRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + LoginRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LoginRequest::GetClassData() const { return &_class_data_; } + + +void LoginRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.LoginRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (!from._internal_pwd().empty()) { + _this->_internal_set_pwd(from._internal_pwd()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void LoginRequest::CopyFrom(const LoginRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.LoginRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LoginRequest::IsInitialized() const { + return true; +} + +void LoginRequest::InternalSwap(LoginRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.pwd_, lhs_arena, + &other->_impl_.pwd_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata LoginRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_test_2eproto_getter, &descriptor_table_test_2eproto_once, + file_level_metadata_test_2eproto[1]); +} + +// =================================================================== + +class LoginResponse::_Internal { + public: + static const ::fixbug::ResultCode& result(const LoginResponse* msg); +}; + +const ::fixbug::ResultCode& +LoginResponse::_Internal::result(const LoginResponse* msg) { + return *msg->_impl_.result_; +} +LoginResponse::LoginResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.LoginResponse) +} +LoginResponse::LoginResponse(const LoginResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + LoginResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.result_){nullptr} + , decltype(_impl_.success_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_result()) { + _this->_impl_.result_ = new ::fixbug::ResultCode(*from._impl_.result_); + } + _this->_impl_.success_ = from._impl_.success_; + // @@protoc_insertion_point(copy_constructor:fixbug.LoginResponse) +} + +inline void LoginResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.result_){nullptr} + , decltype(_impl_.success_){false} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +LoginResponse::~LoginResponse() { + // @@protoc_insertion_point(destructor:fixbug.LoginResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void LoginResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.result_; +} + +void LoginResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void LoginResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.LoginResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.result_ != nullptr) { + delete _impl_.result_; + } + _impl_.result_ = nullptr; + _impl_.success_ = false; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* LoginResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .fixbug.ResultCode result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool success = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.success_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LoginResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.LoginResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .fixbug.ResultCode result = 1; + if (this->_internal_has_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::result(this), + _Internal::result(this).GetCachedSize(), target, stream); + } + + // bool success = 2; + if (this->_internal_success() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_success(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.LoginResponse) + return target; +} + +size_t LoginResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.LoginResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .fixbug.ResultCode result = 1; + if (this->_internal_has_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.result_); + } + + // bool success = 2; + if (this->_internal_success() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LoginResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + LoginResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LoginResponse::GetClassData() const { return &_class_data_; } + + +void LoginResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.LoginResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_result()) { + _this->_internal_mutable_result()->::fixbug::ResultCode::MergeFrom( + from._internal_result()); + } + if (from._internal_success() != 0) { + _this->_internal_set_success(from._internal_success()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void LoginResponse::CopyFrom(const LoginResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.LoginResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LoginResponse::IsInitialized() const { + return true; +} + +void LoginResponse::InternalSwap(LoginResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(LoginResponse, _impl_.success_) + + sizeof(LoginResponse::_impl_.success_) + - PROTOBUF_FIELD_OFFSET(LoginResponse, _impl_.result_)>( + reinterpret_cast(&_impl_.result_), + reinterpret_cast(&other->_impl_.result_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata LoginResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_test_2eproto_getter, &descriptor_table_test_2eproto_once, + file_level_metadata_test_2eproto[2]); +} + +// =================================================================== + +class GetFriendListsRequest::_Internal { + public: +}; + +GetFriendListsRequest::GetFriendListsRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.GetFriendListsRequest) +} +GetFriendListsRequest::GetFriendListsRequest(const GetFriendListsRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetFriendListsRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.userid_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.userid_ = from._impl_.userid_; + // @@protoc_insertion_point(copy_constructor:fixbug.GetFriendListsRequest) +} + +inline void GetFriendListsRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.userid_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +GetFriendListsRequest::~GetFriendListsRequest() { + // @@protoc_insertion_point(destructor:fixbug.GetFriendListsRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetFriendListsRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void GetFriendListsRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetFriendListsRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.GetFriendListsRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.userid_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetFriendListsRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 userid = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.userid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetFriendListsRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.GetFriendListsRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 userid = 1; + if (this->_internal_userid() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_userid(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.GetFriendListsRequest) + return target; +} + +size_t GetFriendListsRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.GetFriendListsRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 userid = 1; + if (this->_internal_userid() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_userid()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetFriendListsRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetFriendListsRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetFriendListsRequest::GetClassData() const { return &_class_data_; } + + +void GetFriendListsRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.GetFriendListsRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_userid() != 0) { + _this->_internal_set_userid(from._internal_userid()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetFriendListsRequest::CopyFrom(const GetFriendListsRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.GetFriendListsRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetFriendListsRequest::IsInitialized() const { + return true; +} + +void GetFriendListsRequest::InternalSwap(GetFriendListsRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.userid_, other->_impl_.userid_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetFriendListsRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_test_2eproto_getter, &descriptor_table_test_2eproto_once, + file_level_metadata_test_2eproto[3]); +} + +// =================================================================== + +class User::_Internal { + public: +}; + +User::User(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.User) +} +User::User(const User& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + User* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.age_){} + , decltype(_impl_.sex_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + ::memcpy(&_impl_.age_, &from._impl_.age_, + static_cast(reinterpret_cast(&_impl_.sex_) - + reinterpret_cast(&_impl_.age_)) + sizeof(_impl_.sex_)); + // @@protoc_insertion_point(copy_constructor:fixbug.User) +} + +inline void User::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.age_){0u} + , decltype(_impl_.sex_){0} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +User::~User() { + // @@protoc_insertion_point(destructor:fixbug.User) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void User::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); +} + +void User::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void User::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.User) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.ClearToEmpty(); + ::memset(&_impl_.age_, 0, static_cast( + reinterpret_cast(&_impl_.sex_) - + reinterpret_cast(&_impl_.age_)) + sizeof(_impl_.sex_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* User::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bytes name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint32 age = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.age_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .fixbug.User.Sex sex = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_sex(static_cast<::fixbug::User_Sex>(val)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* User::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.User) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // bytes name = 1; + if (!this->_internal_name().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_name(), target); + } + + // uint32 age = 2; + if (this->_internal_age() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_age(), target); + } + + // .fixbug.User.Sex sex = 3; + if (this->_internal_sex() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this->_internal_sex(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.User) + return target; +} + +size_t User::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.User) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes name = 1; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_name()); + } + + // uint32 age = 2; + if (this->_internal_age() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_age()); + } + + // .fixbug.User.Sex sex = 3; + if (this->_internal_sex() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_sex()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData User::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + User::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*User::GetClassData() const { return &_class_data_; } + + +void User::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.User) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (from._internal_age() != 0) { + _this->_internal_set_age(from._internal_age()); + } + if (from._internal_sex() != 0) { + _this->_internal_set_sex(from._internal_sex()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void User::CopyFrom(const User& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.User) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool User::IsInitialized() const { + return true; +} + +void User::InternalSwap(User* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(User, _impl_.sex_) + + sizeof(User::_impl_.sex_) + - PROTOBUF_FIELD_OFFSET(User, _impl_.age_)>( + reinterpret_cast(&_impl_.age_), + reinterpret_cast(&other->_impl_.age_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata User::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_test_2eproto_getter, &descriptor_table_test_2eproto_once, + file_level_metadata_test_2eproto[4]); +} + +// =================================================================== + +class GetFriendResponse::_Internal { + public: + static const ::fixbug::ResultCode& result(const GetFriendResponse* msg); +}; + +const ::fixbug::ResultCode& +GetFriendResponse::_Internal::result(const GetFriendResponse* msg) { + return *msg->_impl_.result_; +} +GetFriendResponse::GetFriendResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:fixbug.GetFriendResponse) +} +GetFriendResponse::GetFriendResponse(const GetFriendResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + GetFriendResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.friend_list_){from._impl_.friend_list_} + , decltype(_impl_.result_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_result()) { + _this->_impl_.result_ = new ::fixbug::ResultCode(*from._impl_.result_); + } + // @@protoc_insertion_point(copy_constructor:fixbug.GetFriendResponse) +} + +inline void GetFriendResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.friend_list_){arena} + , decltype(_impl_.result_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +GetFriendResponse::~GetFriendResponse() { + // @@protoc_insertion_point(destructor:fixbug.GetFriendResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GetFriendResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.friend_list_.~RepeatedPtrField(); + if (this != internal_default_instance()) delete _impl_.result_; +} + +void GetFriendResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void GetFriendResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:fixbug.GetFriendResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.friend_list_.Clear(); + if (GetArenaForAllocation() == nullptr && _impl_.result_ != nullptr) { + delete _impl_.result_; + } + _impl_.result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetFriendResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .fixbug.ResultCode result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .fixbug.User friend_list = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_friend_list(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GetFriendResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:fixbug.GetFriendResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .fixbug.ResultCode result = 1; + if (this->_internal_has_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::result(this), + _Internal::result(this).GetCachedSize(), target, stream); + } + + // repeated .fixbug.User friend_list = 2; + for (unsigned i = 0, + n = static_cast(this->_internal_friend_list_size()); i < n; i++) { + const auto& repfield = this->_internal_friend_list(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:fixbug.GetFriendResponse) + return target; +} + +size_t GetFriendResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:fixbug.GetFriendResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .fixbug.User friend_list = 2; + total_size += 1UL * this->_internal_friend_list_size(); + for (const auto& msg : this->_impl_.friend_list_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // .fixbug.ResultCode result = 1; + if (this->_internal_has_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GetFriendResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + GetFriendResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetFriendResponse::GetClassData() const { return &_class_data_; } + + +void GetFriendResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:fixbug.GetFriendResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.friend_list_.MergeFrom(from._impl_.friend_list_); + if (from._internal_has_result()) { + _this->_internal_mutable_result()->::fixbug::ResultCode::MergeFrom( + from._internal_result()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetFriendResponse::CopyFrom(const GetFriendResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:fixbug.GetFriendResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetFriendResponse::IsInitialized() const { + return true; +} + +void GetFriendResponse::InternalSwap(GetFriendResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.friend_list_.InternalSwap(&other->_impl_.friend_list_); + swap(_impl_.result_, other->_impl_.result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetFriendResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_test_2eproto_getter, &descriptor_table_test_2eproto_once, + file_level_metadata_test_2eproto[5]); +} + +// =================================================================== + +UserServiceRpc::~UserServiceRpc() {} + +const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* UserServiceRpc::descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_test_2eproto); + return file_level_service_descriptors_test_2eproto[0]; +} + +const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* UserServiceRpc::GetDescriptor() { + return descriptor(); +} + +void UserServiceRpc::Login(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::LoginRequest*, + ::fixbug::LoginResponse*, + ::google::protobuf::Closure* done) { + controller->SetFailed("Method Login() not implemented."); + done->Run(); +} + +void UserServiceRpc::GetFriendLists(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::GetFriendListsRequest*, + ::fixbug::GetFriendResponse*, + ::google::protobuf::Closure* done) { + controller->SetFailed("Method GetFriendLists() not implemented."); + done->Run(); +} + +void UserServiceRpc::CallMethod(const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method, + ::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::PROTOBUF_NAMESPACE_ID::Message* request, + ::PROTOBUF_NAMESPACE_ID::Message* response, + ::google::protobuf::Closure* done) { + GOOGLE_DCHECK_EQ(method->service(), file_level_service_descriptors_test_2eproto[0]); + switch(method->index()) { + case 0: + Login(controller, + ::PROTOBUF_NAMESPACE_ID::internal::DownCast( + request), + ::PROTOBUF_NAMESPACE_ID::internal::DownCast<::fixbug::LoginResponse*>( + response), + done); + break; + case 1: + GetFriendLists(controller, + ::PROTOBUF_NAMESPACE_ID::internal::DownCast( + request), + ::PROTOBUF_NAMESPACE_ID::internal::DownCast<::fixbug::GetFriendResponse*>( + response), + done); + break; + default: + GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; + break; + } +} + +const ::PROTOBUF_NAMESPACE_ID::Message& UserServiceRpc::GetRequestPrototype( + const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const { + GOOGLE_DCHECK_EQ(method->service(), descriptor()); + switch(method->index()) { + case 0: + return ::fixbug::LoginRequest::default_instance(); + case 1: + return ::fixbug::GetFriendListsRequest::default_instance(); + default: + GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; + return *::PROTOBUF_NAMESPACE_ID::MessageFactory::generated_factory() + ->GetPrototype(method->input_type()); + } +} + +const ::PROTOBUF_NAMESPACE_ID::Message& UserServiceRpc::GetResponsePrototype( + const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const { + GOOGLE_DCHECK_EQ(method->service(), descriptor()); + switch(method->index()) { + case 0: + return ::fixbug::LoginResponse::default_instance(); + case 1: + return ::fixbug::GetFriendResponse::default_instance(); + default: + GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; + return *::PROTOBUF_NAMESPACE_ID::MessageFactory::generated_factory() + ->GetPrototype(method->output_type()); + } +} + +UserServiceRpc_Stub::UserServiceRpc_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel) + : channel_(channel), owns_channel_(false) {} +UserServiceRpc_Stub::UserServiceRpc_Stub( + ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel, + ::PROTOBUF_NAMESPACE_ID::Service::ChannelOwnership ownership) + : channel_(channel), + owns_channel_(ownership == ::PROTOBUF_NAMESPACE_ID::Service::STUB_OWNS_CHANNEL) {} +UserServiceRpc_Stub::~UserServiceRpc_Stub() { + if (owns_channel_) delete channel_; +} + +void UserServiceRpc_Stub::Login(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::LoginRequest* request, + ::fixbug::LoginResponse* response, + ::google::protobuf::Closure* done) { + channel_->CallMethod(descriptor()->method(0), + controller, request, response, done); +} +void UserServiceRpc_Stub::GetFriendLists(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::GetFriendListsRequest* request, + ::fixbug::GetFriendResponse* response, + ::google::protobuf::Closure* done) { + channel_->CallMethod(descriptor()->method(1), + controller, request, response, done); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace fixbug +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::fixbug::ResultCode* +Arena::CreateMaybeMessage< ::fixbug::ResultCode >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::ResultCode >(arena); +} +template<> PROTOBUF_NOINLINE ::fixbug::LoginRequest* +Arena::CreateMaybeMessage< ::fixbug::LoginRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::LoginRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::fixbug::LoginResponse* +Arena::CreateMaybeMessage< ::fixbug::LoginResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::LoginResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::fixbug::GetFriendListsRequest* +Arena::CreateMaybeMessage< ::fixbug::GetFriendListsRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::GetFriendListsRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::fixbug::User* +Arena::CreateMaybeMessage< ::fixbug::User >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::User >(arena); +} +template<> PROTOBUF_NOINLINE ::fixbug::GetFriendResponse* +Arena::CreateMaybeMessage< ::fixbug::GetFriendResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::fixbug::GetFriendResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/mprpc/test/protobuf/test.pb.h b/mprpc/test/protobuf/test.pb.h new file mode 100644 index 0000000..51e8328 --- /dev/null +++ b/mprpc/test/protobuf/test.pb.h @@ -0,0 +1,1784 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: test.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_test_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_test_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#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 3021001 < 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 +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_test_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_test_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_test_2eproto; +namespace fixbug { +class GetFriendListsRequest; +struct GetFriendListsRequestDefaultTypeInternal; +extern GetFriendListsRequestDefaultTypeInternal _GetFriendListsRequest_default_instance_; +class GetFriendResponse; +struct GetFriendResponseDefaultTypeInternal; +extern GetFriendResponseDefaultTypeInternal _GetFriendResponse_default_instance_; +class LoginRequest; +struct LoginRequestDefaultTypeInternal; +extern LoginRequestDefaultTypeInternal _LoginRequest_default_instance_; +class LoginResponse; +struct LoginResponseDefaultTypeInternal; +extern LoginResponseDefaultTypeInternal _LoginResponse_default_instance_; +class ResultCode; +struct ResultCodeDefaultTypeInternal; +extern ResultCodeDefaultTypeInternal _ResultCode_default_instance_; +class User; +struct UserDefaultTypeInternal; +extern UserDefaultTypeInternal _User_default_instance_; +} // namespace fixbug +PROTOBUF_NAMESPACE_OPEN +template<> ::fixbug::GetFriendListsRequest* Arena::CreateMaybeMessage<::fixbug::GetFriendListsRequest>(Arena*); +template<> ::fixbug::GetFriendResponse* Arena::CreateMaybeMessage<::fixbug::GetFriendResponse>(Arena*); +template<> ::fixbug::LoginRequest* Arena::CreateMaybeMessage<::fixbug::LoginRequest>(Arena*); +template<> ::fixbug::LoginResponse* Arena::CreateMaybeMessage<::fixbug::LoginResponse>(Arena*); +template<> ::fixbug::ResultCode* Arena::CreateMaybeMessage<::fixbug::ResultCode>(Arena*); +template<> ::fixbug::User* Arena::CreateMaybeMessage<::fixbug::User>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace fixbug { + +enum User_Sex : int { + User_Sex_MAN = 0, + User_Sex_WOMAN = 1, + User_Sex_User_Sex_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + User_Sex_User_Sex_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool User_Sex_IsValid(int value); +constexpr User_Sex User_Sex_Sex_MIN = User_Sex_MAN; +constexpr User_Sex User_Sex_Sex_MAX = User_Sex_WOMAN; +constexpr int User_Sex_Sex_ARRAYSIZE = User_Sex_Sex_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* User_Sex_descriptor(); +template +inline const std::string& User_Sex_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function User_Sex_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + User_Sex_descriptor(), enum_t_value); +} +inline bool User_Sex_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, User_Sex* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + User_Sex_descriptor(), name, value); +} +// =================================================================== + +class ResultCode final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.ResultCode) */ { + public: + inline ResultCode() : ResultCode(nullptr) {} + ~ResultCode() override; + explicit PROTOBUF_CONSTEXPR ResultCode(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ResultCode(const ResultCode& from); + ResultCode(ResultCode&& from) noexcept + : ResultCode() { + *this = ::std::move(from); + } + + inline ResultCode& operator=(const ResultCode& from) { + CopyFrom(from); + return *this; + } + inline ResultCode& operator=(ResultCode&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ResultCode& default_instance() { + return *internal_default_instance(); + } + static inline const ResultCode* internal_default_instance() { + return reinterpret_cast( + &_ResultCode_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ResultCode& a, ResultCode& b) { + a.Swap(&b); + } + inline void Swap(ResultCode* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ResultCode* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ResultCode* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ResultCode& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ResultCode& from) { + ResultCode::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ResultCode* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.ResultCode"; + } + protected: + explicit ResultCode(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kErrmsgFieldNumber = 2, + kErrcodeFieldNumber = 1, + }; + // bytes errmsg = 2; + void clear_errmsg(); + const std::string& errmsg() const; + template + void set_errmsg(ArgT0&& arg0, ArgT... args); + std::string* mutable_errmsg(); + PROTOBUF_NODISCARD std::string* release_errmsg(); + void set_allocated_errmsg(std::string* errmsg); + private: + const std::string& _internal_errmsg() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_errmsg(const std::string& value); + std::string* _internal_mutable_errmsg(); + public: + + // int32 errcode = 1; + void clear_errcode(); + int32_t errcode() const; + void set_errcode(int32_t value); + private: + int32_t _internal_errcode() const; + void _internal_set_errcode(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:fixbug.ResultCode) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr errmsg_; + int32_t errcode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_test_2eproto; +}; +// ------------------------------------------------------------------- + +class LoginRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.LoginRequest) */ { + public: + inline LoginRequest() : LoginRequest(nullptr) {} + ~LoginRequest() override; + explicit PROTOBUF_CONSTEXPR LoginRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LoginRequest(const LoginRequest& from); + LoginRequest(LoginRequest&& from) noexcept + : LoginRequest() { + *this = ::std::move(from); + } + + inline LoginRequest& operator=(const LoginRequest& from) { + CopyFrom(from); + return *this; + } + inline LoginRequest& operator=(LoginRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LoginRequest& default_instance() { + return *internal_default_instance(); + } + static inline const LoginRequest* internal_default_instance() { + return reinterpret_cast( + &_LoginRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(LoginRequest& a, LoginRequest& b) { + a.Swap(&b); + } + inline void Swap(LoginRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LoginRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LoginRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LoginRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const LoginRequest& from) { + LoginRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LoginRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.LoginRequest"; + } + protected: + explicit LoginRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kPwdFieldNumber = 2, + }; + // bytes name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // bytes pwd = 2; + void clear_pwd(); + const std::string& pwd() const; + template + void set_pwd(ArgT0&& arg0, ArgT... args); + std::string* mutable_pwd(); + PROTOBUF_NODISCARD std::string* release_pwd(); + void set_allocated_pwd(std::string* pwd); + private: + const std::string& _internal_pwd() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_pwd(const std::string& value); + std::string* _internal_mutable_pwd(); + public: + + // @@protoc_insertion_point(class_scope:fixbug.LoginRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr pwd_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_test_2eproto; +}; +// ------------------------------------------------------------------- + +class LoginResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.LoginResponse) */ { + public: + inline LoginResponse() : LoginResponse(nullptr) {} + ~LoginResponse() override; + explicit PROTOBUF_CONSTEXPR LoginResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LoginResponse(const LoginResponse& from); + LoginResponse(LoginResponse&& from) noexcept + : LoginResponse() { + *this = ::std::move(from); + } + + inline LoginResponse& operator=(const LoginResponse& from) { + CopyFrom(from); + return *this; + } + inline LoginResponse& operator=(LoginResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LoginResponse& default_instance() { + return *internal_default_instance(); + } + static inline const LoginResponse* internal_default_instance() { + return reinterpret_cast( + &_LoginResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(LoginResponse& a, LoginResponse& b) { + a.Swap(&b); + } + inline void Swap(LoginResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LoginResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LoginResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LoginResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const LoginResponse& from) { + LoginResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LoginResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.LoginResponse"; + } + protected: + explicit LoginResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kResultFieldNumber = 1, + kSuccessFieldNumber = 2, + }; + // .fixbug.ResultCode result = 1; + bool has_result() const; + private: + bool _internal_has_result() const; + public: + void clear_result(); + const ::fixbug::ResultCode& result() const; + PROTOBUF_NODISCARD ::fixbug::ResultCode* release_result(); + ::fixbug::ResultCode* mutable_result(); + void set_allocated_result(::fixbug::ResultCode* result); + private: + const ::fixbug::ResultCode& _internal_result() const; + ::fixbug::ResultCode* _internal_mutable_result(); + public: + void unsafe_arena_set_allocated_result( + ::fixbug::ResultCode* result); + ::fixbug::ResultCode* unsafe_arena_release_result(); + + // bool success = 2; + void clear_success(); + bool success() const; + void set_success(bool value); + private: + bool _internal_success() const; + void _internal_set_success(bool value); + public: + + // @@protoc_insertion_point(class_scope:fixbug.LoginResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::fixbug::ResultCode* result_; + bool success_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_test_2eproto; +}; +// ------------------------------------------------------------------- + +class GetFriendListsRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.GetFriendListsRequest) */ { + public: + inline GetFriendListsRequest() : GetFriendListsRequest(nullptr) {} + ~GetFriendListsRequest() override; + explicit PROTOBUF_CONSTEXPR GetFriendListsRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetFriendListsRequest(const GetFriendListsRequest& from); + GetFriendListsRequest(GetFriendListsRequest&& from) noexcept + : GetFriendListsRequest() { + *this = ::std::move(from); + } + + inline GetFriendListsRequest& operator=(const GetFriendListsRequest& from) { + CopyFrom(from); + return *this; + } + inline GetFriendListsRequest& operator=(GetFriendListsRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetFriendListsRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetFriendListsRequest* internal_default_instance() { + return reinterpret_cast( + &_GetFriendListsRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(GetFriendListsRequest& a, GetFriendListsRequest& b) { + a.Swap(&b); + } + inline void Swap(GetFriendListsRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetFriendListsRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetFriendListsRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetFriendListsRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetFriendListsRequest& from) { + GetFriendListsRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetFriendListsRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.GetFriendListsRequest"; + } + protected: + explicit GetFriendListsRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUseridFieldNumber = 1, + }; + // uint32 userid = 1; + void clear_userid(); + uint32_t userid() const; + void set_userid(uint32_t value); + private: + uint32_t _internal_userid() const; + void _internal_set_userid(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:fixbug.GetFriendListsRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + uint32_t userid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_test_2eproto; +}; +// ------------------------------------------------------------------- + +class User final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.User) */ { + public: + inline User() : User(nullptr) {} + ~User() override; + explicit PROTOBUF_CONSTEXPR User(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + User(const User& from); + User(User&& from) noexcept + : User() { + *this = ::std::move(from); + } + + inline User& operator=(const User& from) { + CopyFrom(from); + return *this; + } + inline User& operator=(User&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const User& default_instance() { + return *internal_default_instance(); + } + static inline const User* internal_default_instance() { + return reinterpret_cast( + &_User_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(User& a, User& b) { + a.Swap(&b); + } + inline void Swap(User* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(User* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + User* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const User& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const User& from) { + User::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(User* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.User"; + } + protected: + explicit User(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef User_Sex Sex; + static constexpr Sex MAN = + User_Sex_MAN; + static constexpr Sex WOMAN = + User_Sex_WOMAN; + static inline bool Sex_IsValid(int value) { + return User_Sex_IsValid(value); + } + static constexpr Sex Sex_MIN = + User_Sex_Sex_MIN; + static constexpr Sex Sex_MAX = + User_Sex_Sex_MAX; + static constexpr int Sex_ARRAYSIZE = + User_Sex_Sex_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Sex_descriptor() { + return User_Sex_descriptor(); + } + template + static inline const std::string& Sex_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Sex_Name."); + return User_Sex_Name(enum_t_value); + } + static inline bool Sex_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Sex* value) { + return User_Sex_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kAgeFieldNumber = 2, + kSexFieldNumber = 3, + }; + // bytes name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // uint32 age = 2; + void clear_age(); + uint32_t age() const; + void set_age(uint32_t value); + private: + uint32_t _internal_age() const; + void _internal_set_age(uint32_t value); + public: + + // .fixbug.User.Sex sex = 3; + void clear_sex(); + ::fixbug::User_Sex sex() const; + void set_sex(::fixbug::User_Sex value); + private: + ::fixbug::User_Sex _internal_sex() const; + void _internal_set_sex(::fixbug::User_Sex value); + public: + + // @@protoc_insertion_point(class_scope:fixbug.User) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + uint32_t age_; + int sex_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_test_2eproto; +}; +// ------------------------------------------------------------------- + +class GetFriendResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:fixbug.GetFriendResponse) */ { + public: + inline GetFriendResponse() : GetFriendResponse(nullptr) {} + ~GetFriendResponse() override; + explicit PROTOBUF_CONSTEXPR GetFriendResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetFriendResponse(const GetFriendResponse& from); + GetFriendResponse(GetFriendResponse&& from) noexcept + : GetFriendResponse() { + *this = ::std::move(from); + } + + inline GetFriendResponse& operator=(const GetFriendResponse& from) { + CopyFrom(from); + return *this; + } + inline GetFriendResponse& operator=(GetFriendResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GetFriendResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GetFriendResponse* internal_default_instance() { + return reinterpret_cast( + &_GetFriendResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(GetFriendResponse& a, GetFriendResponse& b) { + a.Swap(&b); + } + inline void Swap(GetFriendResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetFriendResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GetFriendResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetFriendResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const GetFriendResponse& from) { + GetFriendResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetFriendResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "fixbug.GetFriendResponse"; + } + protected: + explicit GetFriendResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFriendListFieldNumber = 2, + kResultFieldNumber = 1, + }; + // repeated .fixbug.User friend_list = 2; + int friend_list_size() const; + private: + int _internal_friend_list_size() const; + public: + void clear_friend_list(); + ::fixbug::User* mutable_friend_list(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::fixbug::User >* + mutable_friend_list(); + private: + const ::fixbug::User& _internal_friend_list(int index) const; + ::fixbug::User* _internal_add_friend_list(); + public: + const ::fixbug::User& friend_list(int index) const; + ::fixbug::User* add_friend_list(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::fixbug::User >& + friend_list() const; + + // .fixbug.ResultCode result = 1; + bool has_result() const; + private: + bool _internal_has_result() const; + public: + void clear_result(); + const ::fixbug::ResultCode& result() const; + PROTOBUF_NODISCARD ::fixbug::ResultCode* release_result(); + ::fixbug::ResultCode* mutable_result(); + void set_allocated_result(::fixbug::ResultCode* result); + private: + const ::fixbug::ResultCode& _internal_result() const; + ::fixbug::ResultCode* _internal_mutable_result(); + public: + void unsafe_arena_set_allocated_result( + ::fixbug::ResultCode* result); + ::fixbug::ResultCode* unsafe_arena_release_result(); + + // @@protoc_insertion_point(class_scope:fixbug.GetFriendResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::fixbug::User > friend_list_; + ::fixbug::ResultCode* result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_test_2eproto; +}; +// =================================================================== + +class UserServiceRpc_Stub; + +class UserServiceRpc : public ::PROTOBUF_NAMESPACE_ID::Service { + protected: + // This class should be treated as an abstract interface. + inline UserServiceRpc() {}; + public: + virtual ~UserServiceRpc(); + + typedef UserServiceRpc_Stub Stub; + + static const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* descriptor(); + + virtual void Login(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::LoginRequest* request, + ::fixbug::LoginResponse* response, + ::google::protobuf::Closure* done); + virtual void GetFriendLists(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::GetFriendListsRequest* request, + ::fixbug::GetFriendResponse* response, + ::google::protobuf::Closure* done); + + // implements Service ---------------------------------------------- + + const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* GetDescriptor(); + void CallMethod(const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method, + ::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::PROTOBUF_NAMESPACE_ID::Message* request, + ::PROTOBUF_NAMESPACE_ID::Message* response, + ::google::protobuf::Closure* done); + const ::PROTOBUF_NAMESPACE_ID::Message& GetRequestPrototype( + const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const; + const ::PROTOBUF_NAMESPACE_ID::Message& GetResponsePrototype( + const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const; + + private: + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(UserServiceRpc); +}; + +class UserServiceRpc_Stub : public UserServiceRpc { + public: + UserServiceRpc_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel); + UserServiceRpc_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel, + ::PROTOBUF_NAMESPACE_ID::Service::ChannelOwnership ownership); + ~UserServiceRpc_Stub(); + + inline ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel() { return channel_; } + + // implements UserServiceRpc ------------------------------------------ + + void Login(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::LoginRequest* request, + ::fixbug::LoginResponse* response, + ::google::protobuf::Closure* done); + void GetFriendLists(::PROTOBUF_NAMESPACE_ID::RpcController* controller, + const ::fixbug::GetFriendListsRequest* request, + ::fixbug::GetFriendResponse* response, + ::google::protobuf::Closure* done); + private: + ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel_; + bool owns_channel_; + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(UserServiceRpc_Stub); +}; + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ResultCode + +// int32 errcode = 1; +inline void ResultCode::clear_errcode() { + _impl_.errcode_ = 0; +} +inline int32_t ResultCode::_internal_errcode() const { + return _impl_.errcode_; +} +inline int32_t ResultCode::errcode() const { + // @@protoc_insertion_point(field_get:fixbug.ResultCode.errcode) + return _internal_errcode(); +} +inline void ResultCode::_internal_set_errcode(int32_t value) { + + _impl_.errcode_ = value; +} +inline void ResultCode::set_errcode(int32_t value) { + _internal_set_errcode(value); + // @@protoc_insertion_point(field_set:fixbug.ResultCode.errcode) +} + +// bytes errmsg = 2; +inline void ResultCode::clear_errmsg() { + _impl_.errmsg_.ClearToEmpty(); +} +inline const std::string& ResultCode::errmsg() const { + // @@protoc_insertion_point(field_get:fixbug.ResultCode.errmsg) + return _internal_errmsg(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ResultCode::set_errmsg(ArgT0&& arg0, ArgT... args) { + + _impl_.errmsg_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:fixbug.ResultCode.errmsg) +} +inline std::string* ResultCode::mutable_errmsg() { + std::string* _s = _internal_mutable_errmsg(); + // @@protoc_insertion_point(field_mutable:fixbug.ResultCode.errmsg) + return _s; +} +inline const std::string& ResultCode::_internal_errmsg() const { + return _impl_.errmsg_.Get(); +} +inline void ResultCode::_internal_set_errmsg(const std::string& value) { + + _impl_.errmsg_.Set(value, GetArenaForAllocation()); +} +inline std::string* ResultCode::_internal_mutable_errmsg() { + + return _impl_.errmsg_.Mutable(GetArenaForAllocation()); +} +inline std::string* ResultCode::release_errmsg() { + // @@protoc_insertion_point(field_release:fixbug.ResultCode.errmsg) + return _impl_.errmsg_.Release(); +} +inline void ResultCode::set_allocated_errmsg(std::string* errmsg) { + if (errmsg != nullptr) { + + } else { + + } + _impl_.errmsg_.SetAllocated(errmsg, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.errmsg_.IsDefault()) { + _impl_.errmsg_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:fixbug.ResultCode.errmsg) +} + +// ------------------------------------------------------------------- + +// LoginRequest + +// bytes name = 1; +inline void LoginRequest::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& LoginRequest::name() const { + // @@protoc_insertion_point(field_get:fixbug.LoginRequest.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void LoginRequest::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:fixbug.LoginRequest.name) +} +inline std::string* LoginRequest::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:fixbug.LoginRequest.name) + return _s; +} +inline const std::string& LoginRequest::_internal_name() const { + return _impl_.name_.Get(); +} +inline void LoginRequest::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* LoginRequest::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* LoginRequest::release_name() { + // @@protoc_insertion_point(field_release:fixbug.LoginRequest.name) + return _impl_.name_.Release(); +} +inline void LoginRequest::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:fixbug.LoginRequest.name) +} + +// bytes pwd = 2; +inline void LoginRequest::clear_pwd() { + _impl_.pwd_.ClearToEmpty(); +} +inline const std::string& LoginRequest::pwd() const { + // @@protoc_insertion_point(field_get:fixbug.LoginRequest.pwd) + return _internal_pwd(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void LoginRequest::set_pwd(ArgT0&& arg0, ArgT... args) { + + _impl_.pwd_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:fixbug.LoginRequest.pwd) +} +inline std::string* LoginRequest::mutable_pwd() { + std::string* _s = _internal_mutable_pwd(); + // @@protoc_insertion_point(field_mutable:fixbug.LoginRequest.pwd) + return _s; +} +inline const std::string& LoginRequest::_internal_pwd() const { + return _impl_.pwd_.Get(); +} +inline void LoginRequest::_internal_set_pwd(const std::string& value) { + + _impl_.pwd_.Set(value, GetArenaForAllocation()); +} +inline std::string* LoginRequest::_internal_mutable_pwd() { + + return _impl_.pwd_.Mutable(GetArenaForAllocation()); +} +inline std::string* LoginRequest::release_pwd() { + // @@protoc_insertion_point(field_release:fixbug.LoginRequest.pwd) + return _impl_.pwd_.Release(); +} +inline void LoginRequest::set_allocated_pwd(std::string* pwd) { + if (pwd != nullptr) { + + } else { + + } + _impl_.pwd_.SetAllocated(pwd, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.pwd_.IsDefault()) { + _impl_.pwd_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:fixbug.LoginRequest.pwd) +} + +// ------------------------------------------------------------------- + +// LoginResponse + +// .fixbug.ResultCode result = 1; +inline bool LoginResponse::_internal_has_result() const { + return this != internal_default_instance() && _impl_.result_ != nullptr; +} +inline bool LoginResponse::has_result() const { + return _internal_has_result(); +} +inline void LoginResponse::clear_result() { + if (GetArenaForAllocation() == nullptr && _impl_.result_ != nullptr) { + delete _impl_.result_; + } + _impl_.result_ = nullptr; +} +inline const ::fixbug::ResultCode& LoginResponse::_internal_result() const { + const ::fixbug::ResultCode* p = _impl_.result_; + return p != nullptr ? *p : reinterpret_cast( + ::fixbug::_ResultCode_default_instance_); +} +inline const ::fixbug::ResultCode& LoginResponse::result() const { + // @@protoc_insertion_point(field_get:fixbug.LoginResponse.result) + return _internal_result(); +} +inline void LoginResponse::unsafe_arena_set_allocated_result( + ::fixbug::ResultCode* result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.result_); + } + _impl_.result_ = result; + if (result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:fixbug.LoginResponse.result) +} +inline ::fixbug::ResultCode* LoginResponse::release_result() { + + ::fixbug::ResultCode* temp = _impl_.result_; + _impl_.result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::fixbug::ResultCode* LoginResponse::unsafe_arena_release_result() { + // @@protoc_insertion_point(field_release:fixbug.LoginResponse.result) + + ::fixbug::ResultCode* temp = _impl_.result_; + _impl_.result_ = nullptr; + return temp; +} +inline ::fixbug::ResultCode* LoginResponse::_internal_mutable_result() { + + if (_impl_.result_ == nullptr) { + auto* p = CreateMaybeMessage<::fixbug::ResultCode>(GetArenaForAllocation()); + _impl_.result_ = p; + } + return _impl_.result_; +} +inline ::fixbug::ResultCode* LoginResponse::mutable_result() { + ::fixbug::ResultCode* _msg = _internal_mutable_result(); + // @@protoc_insertion_point(field_mutable:fixbug.LoginResponse.result) + return _msg; +} +inline void LoginResponse::set_allocated_result(::fixbug::ResultCode* result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.result_; + } + if (result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(result); + if (message_arena != submessage_arena) { + result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, result, submessage_arena); + } + + } else { + + } + _impl_.result_ = result; + // @@protoc_insertion_point(field_set_allocated:fixbug.LoginResponse.result) +} + +// bool success = 2; +inline void LoginResponse::clear_success() { + _impl_.success_ = false; +} +inline bool LoginResponse::_internal_success() const { + return _impl_.success_; +} +inline bool LoginResponse::success() const { + // @@protoc_insertion_point(field_get:fixbug.LoginResponse.success) + return _internal_success(); +} +inline void LoginResponse::_internal_set_success(bool value) { + + _impl_.success_ = value; +} +inline void LoginResponse::set_success(bool value) { + _internal_set_success(value); + // @@protoc_insertion_point(field_set:fixbug.LoginResponse.success) +} + +// ------------------------------------------------------------------- + +// GetFriendListsRequest + +// uint32 userid = 1; +inline void GetFriendListsRequest::clear_userid() { + _impl_.userid_ = 0u; +} +inline uint32_t GetFriendListsRequest::_internal_userid() const { + return _impl_.userid_; +} +inline uint32_t GetFriendListsRequest::userid() const { + // @@protoc_insertion_point(field_get:fixbug.GetFriendListsRequest.userid) + return _internal_userid(); +} +inline void GetFriendListsRequest::_internal_set_userid(uint32_t value) { + + _impl_.userid_ = value; +} +inline void GetFriendListsRequest::set_userid(uint32_t value) { + _internal_set_userid(value); + // @@protoc_insertion_point(field_set:fixbug.GetFriendListsRequest.userid) +} + +// ------------------------------------------------------------------- + +// User + +// bytes name = 1; +inline void User::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& User::name() const { + // @@protoc_insertion_point(field_get:fixbug.User.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void User::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:fixbug.User.name) +} +inline std::string* User::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:fixbug.User.name) + return _s; +} +inline const std::string& User::_internal_name() const { + return _impl_.name_.Get(); +} +inline void User::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* User::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* User::release_name() { + // @@protoc_insertion_point(field_release:fixbug.User.name) + return _impl_.name_.Release(); +} +inline void User::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:fixbug.User.name) +} + +// uint32 age = 2; +inline void User::clear_age() { + _impl_.age_ = 0u; +} +inline uint32_t User::_internal_age() const { + return _impl_.age_; +} +inline uint32_t User::age() const { + // @@protoc_insertion_point(field_get:fixbug.User.age) + return _internal_age(); +} +inline void User::_internal_set_age(uint32_t value) { + + _impl_.age_ = value; +} +inline void User::set_age(uint32_t value) { + _internal_set_age(value); + // @@protoc_insertion_point(field_set:fixbug.User.age) +} + +// .fixbug.User.Sex sex = 3; +inline void User::clear_sex() { + _impl_.sex_ = 0; +} +inline ::fixbug::User_Sex User::_internal_sex() const { + return static_cast< ::fixbug::User_Sex >(_impl_.sex_); +} +inline ::fixbug::User_Sex User::sex() const { + // @@protoc_insertion_point(field_get:fixbug.User.sex) + return _internal_sex(); +} +inline void User::_internal_set_sex(::fixbug::User_Sex value) { + + _impl_.sex_ = value; +} +inline void User::set_sex(::fixbug::User_Sex value) { + _internal_set_sex(value); + // @@protoc_insertion_point(field_set:fixbug.User.sex) +} + +// ------------------------------------------------------------------- + +// GetFriendResponse + +// .fixbug.ResultCode result = 1; +inline bool GetFriendResponse::_internal_has_result() const { + return this != internal_default_instance() && _impl_.result_ != nullptr; +} +inline bool GetFriendResponse::has_result() const { + return _internal_has_result(); +} +inline void GetFriendResponse::clear_result() { + if (GetArenaForAllocation() == nullptr && _impl_.result_ != nullptr) { + delete _impl_.result_; + } + _impl_.result_ = nullptr; +} +inline const ::fixbug::ResultCode& GetFriendResponse::_internal_result() const { + const ::fixbug::ResultCode* p = _impl_.result_; + return p != nullptr ? *p : reinterpret_cast( + ::fixbug::_ResultCode_default_instance_); +} +inline const ::fixbug::ResultCode& GetFriendResponse::result() const { + // @@protoc_insertion_point(field_get:fixbug.GetFriendResponse.result) + return _internal_result(); +} +inline void GetFriendResponse::unsafe_arena_set_allocated_result( + ::fixbug::ResultCode* result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.result_); + } + _impl_.result_ = result; + if (result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:fixbug.GetFriendResponse.result) +} +inline ::fixbug::ResultCode* GetFriendResponse::release_result() { + + ::fixbug::ResultCode* temp = _impl_.result_; + _impl_.result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::fixbug::ResultCode* GetFriendResponse::unsafe_arena_release_result() { + // @@protoc_insertion_point(field_release:fixbug.GetFriendResponse.result) + + ::fixbug::ResultCode* temp = _impl_.result_; + _impl_.result_ = nullptr; + return temp; +} +inline ::fixbug::ResultCode* GetFriendResponse::_internal_mutable_result() { + + if (_impl_.result_ == nullptr) { + auto* p = CreateMaybeMessage<::fixbug::ResultCode>(GetArenaForAllocation()); + _impl_.result_ = p; + } + return _impl_.result_; +} +inline ::fixbug::ResultCode* GetFriendResponse::mutable_result() { + ::fixbug::ResultCode* _msg = _internal_mutable_result(); + // @@protoc_insertion_point(field_mutable:fixbug.GetFriendResponse.result) + return _msg; +} +inline void GetFriendResponse::set_allocated_result(::fixbug::ResultCode* result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.result_; + } + if (result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(result); + if (message_arena != submessage_arena) { + result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, result, submessage_arena); + } + + } else { + + } + _impl_.result_ = result; + // @@protoc_insertion_point(field_set_allocated:fixbug.GetFriendResponse.result) +} + +// repeated .fixbug.User friend_list = 2; +inline int GetFriendResponse::_internal_friend_list_size() const { + return _impl_.friend_list_.size(); +} +inline int GetFriendResponse::friend_list_size() const { + return _internal_friend_list_size(); +} +inline void GetFriendResponse::clear_friend_list() { + _impl_.friend_list_.Clear(); +} +inline ::fixbug::User* GetFriendResponse::mutable_friend_list(int index) { + // @@protoc_insertion_point(field_mutable:fixbug.GetFriendResponse.friend_list) + return _impl_.friend_list_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::fixbug::User >* +GetFriendResponse::mutable_friend_list() { + // @@protoc_insertion_point(field_mutable_list:fixbug.GetFriendResponse.friend_list) + return &_impl_.friend_list_; +} +inline const ::fixbug::User& GetFriendResponse::_internal_friend_list(int index) const { + return _impl_.friend_list_.Get(index); +} +inline const ::fixbug::User& GetFriendResponse::friend_list(int index) const { + // @@protoc_insertion_point(field_get:fixbug.GetFriendResponse.friend_list) + return _internal_friend_list(index); +} +inline ::fixbug::User* GetFriendResponse::_internal_add_friend_list() { + return _impl_.friend_list_.Add(); +} +inline ::fixbug::User* GetFriendResponse::add_friend_list() { + ::fixbug::User* _add = _internal_add_friend_list(); + // @@protoc_insertion_point(field_add:fixbug.GetFriendResponse.friend_list) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::fixbug::User >& +GetFriendResponse::friend_list() const { + // @@protoc_insertion_point(field_list:fixbug.GetFriendResponse.friend_list) + return _impl_.friend_list_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace fixbug + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::fixbug::User_Sex> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::fixbug::User_Sex>() { + return ::fixbug::User_Sex_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_test_2eproto diff --git a/mprpc/test/protobuf/test.proto b/mprpc/test/protobuf/test.proto new file mode 100644 index 0000000..ec995ae --- /dev/null +++ b/mprpc/test/protobuf/test.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; //声明protobuf版本 + +package fixbug; // 声明了代码所在的包(对于C++来说是namesapce) + +// 定义如下选项表示生成service服务类和rpc方法描述,否则默认不生成 +option cc_generic_services = true; + +message ResultCode +{ + int32 errcode = 1; + bytes errmsg = 2; +} + + +// 数据 列表 映射表 +// 定义登录请求消息类型 name pwd +message LoginRequest +{ + bytes name = 1; + bytes pwd = 2; +} + +// 定义登录响应消息类型 +message LoginResponse +{ + ResultCode result = 1; + bool success = 2; +} + +message GetFriendListsRequest +{ + uint32 userid = 1; +} + +message User +{ + bytes name = 1; + uint32 age = 2; + enum Sex + { + MAN = 0; + WOMAN = 1; + } + Sex sex = 3; +} + +message GetFriendResponse +{ + ResultCode result = 1; + repeated User friend_list = 2; // Repeated重复表示可以有多个用户,相当于定义了一个列表类型 +} + +// 在protobuf里面定义描述rpc方法的类型 -device +service UserServiceRpc +{ + rpc Login(LoginRequest) returns(LoginResponse); + rpc GetFriendLists(GetFriendListsRequest) returns(GetFriendResponse); +} \ No newline at end of file